RagCode MCP - Make Your Codebase AI-Ready
The privacy-first MCP server that transforms any repository into an AI-ready codebase with semantic search and RAG.
RagCode is a Model Context Protocol (MCP) server that instantly makes your project AI-ready. It enables AI assistants like GitHub Copilot, Cursor, Windsurf, and Claude to understand your entire codebase through semantic vector search, bridging the gap between your code and Large Language Models (LLMs).
Built with the official Model Context Protocol Go SDK, RagCode provides 9 powerful tools to index, search, and analyze code, making it the ultimate solution for AI-ready software development.
β‘ One-Command Installation
No Go, no build tools, no configuration needed. Just Docker.
| Linux (amd64) |
curl -fsSL https://github.com/doITmagic/rag-code-mcp/releases/latest/download/rag-code-mcp_linux_amd64.tar.gz | tar xz && ./ragcode-installer -ollama=docker -qdrant=docker
|
| macOS (Apple Silicon) |
curl -fsSL https://github.com/doITmagic/rag-code-mcp/releases/latest/download/rag-code-mcp_darwin_arm64.tar.gz | tar xz && ./ragcode-installer -ollama=docker -qdrant=docker
|
| macOS (Intel) |
curl -fsSL https://github.com/doITmagic/rag-code-mcp/releases/latest/download/rag-code-mcp_darwin_amd64.tar.gz | tar xz && ./ragcode-installer -ollama=docker -qdrant=docker
|
| Windows (PowerShell) |
Invoke-WebRequest -Uri "https://github.com/doITmagic/rag-code-mcp/releases/latest/download/rag-code-mcp_windows_amd64.zip" -OutFile "ragcode.zip"; Expand-Archive ragcode.zip -DestinationPath . -Force; .\ragcode-installer.exe -ollama=docker -qdrant=docker
|
That's it! The installer automatically:
- β
Downloads and installs the
rag-code-mcp binary
- β
Sets up Ollama and Qdrant in Docker containers
- β
Downloads required AI models (
phi3:medium, nomic-embed-text)
- β
Configures your IDE (VS Code, Cursor, Windsurf, Claude Desktop)
- β
Adds binaries to your PATH
π Full Installation Guide β | Windows WSL Setup β
π― Zero-Config Usage
Once installed, you don't need to configure anything:
- Open your project in your IDE (VS Code, Cursor, Windsurf)
- Ask your AI assistant a question about your code
- That's it! RagCode automatically indexes and answers
π¬ "How does the authentication system work?"
π¬ "Find all API endpoints in this codebase"
π¬ "Show me the User model and its relationships"
First query triggers background indexing. Subsequent queries are instant.
π Table of Contents
π Privacy-First: 100% Local AI
Your code never leaves your machine. RagCode runs entirely on your local infrastructure:
- β
Local AI Models - Uses Ollama for LLM and embeddings (runs on your hardware)
- β
Local Vector Database - Qdrant runs in Docker on your machine
- β
Zero Cloud Dependencies - No external API calls, no data transmission
- β
No API Costs - Free forever, no usage limits or subscriptions
- β
Offline Capable - Works without internet (after initial model download)
Perfect for: Enterprise codebases, proprietary projects, security-conscious teams.
5-10x Faster Code Understanding
| Task |
Without RagCode |
With RagCode |
Speedup |
| Find authentication logic |
30-60s (read 10+ files) |
2-3s (semantic search) |
10-20x |
| Understand function signature |
15-30s (grep + read) |
1-2s (direct lookup) |
15x |
| Find all API endpoints |
60-120s (manual search) |
3-5s (hybrid search) |
20-40x |
98% Token Savings
- Without RagCode: AI reads 5-10 files (~15,000 tokens) to find a function
- With RagCode: AI gets exact function + context (~200 tokens)
RagCode vs Cloud-Based Solutions
| Feature |
RagCode (Local) |
Cloud AI Search |
| Privacy |
β
100% local |
β Code sent to cloud |
| Cost |
β
$0 forever |
β $20-100+/month |
| Offline |
β
Works offline |
β Requires internet |
| Data Control |
β
You own everything |
β Vendor controls data |
RagCode vs Generic RAG
| Aspect |
Generic RAG |
RagCode |
| Chunking |
Arbitrary text splits |
Semantic units (functions, classes) |
| Metadata |
Filename only |
Name, type, params, dependencies, lines |
| Results |
May return partial code |
Always complete, runnable code |
| Tool |
Description |
Use When |
search_code |
Semantic search by meaning |
First choice for exploration |
hybrid_search |
Keyword + semantic for exact matches |
Need exact identifiers |
get_function_details |
Complete function source code |
Know exact function name |
find_type_definition |
Type/class with fields and methods |
Understand data models |
find_implementations |
All usages and callers |
Before refactoring |
list_package_exports |
All exported symbols |
Explore unfamiliar packages |
search_docs |
Search Markdown documentation |
Setup, architecture info |
get_code_context |
Code snippet with context |
Have file:line reference |
index_workspace |
Reindex codebase |
After major changes |
π Full Tool Reference β
π Multi-Language Code Intelligence
| Language |
Support Level |
Features |
Docs |
| Go |
β
Full |
Functions, types, interfaces, methods, AST analysis |
π Go Analyzer |
| PHP |
β
Full |
Classes, methods, interfaces, traits, PHPDoc |
π PHP Analyzer |
| PHP + Laravel |
β
Full |
Eloquent models, routes, controllers, middleware |
π Laravel Analyzer |
| Python |
β
Full |
Classes, functions, decorators, type hints, mixins |
π Python Analyzer |
| JavaScript/TypeScript |
π Planned |
Coming soon (tree-sitter based) |
- |
Multi-Workspace Support
RagCode automatically detects and manages multiple workspaces with isolated indexes.
π Workspace Detection β - Auto-detection, stable IDs, caching
π» IDE Integration
RagCode works with all major AI-powered IDEs:
| IDE |
Status |
Setup |
| Windsurf |
β
Auto-configured |
Just install |
| Cursor |
β
Auto-configured |
Just install |
| VS Code + Copilot |
β
Auto-configured |
Requires VS Code 1.95+ |
| Claude Desktop |
β
Auto-configured |
Just install |
| Antigravity |
β
Auto-configured |
Just install |
π Manual IDE Setup β | VS Code + Copilot Guide β
π¦ System Requirements
| Component |
Minimum |
Recommended |
| CPU |
4 cores |
8+ cores |
| RAM |
16 GB |
32 GB |
| Disk |
10 GB free |
20 GB SSD |
| GPU |
Not required |
NVIDIA 8GB+ VRAM (faster) |
| Docker |
Required |
Required |
π Full Requirements β
π Documentation
Getting Started
Configuration & Operations
Language Analyzers
Technical Reference
External Resources
π€ Contributing
We welcome contributions! Here's how you can help:
- π Report Bugs
- π‘ Request Features - Share ideas for new tools or languages
- π§ Submit PRs - Improve code, docs, or add features
- β Star the Project - Show your support
Development Setup
git clone https://github.com/doITmagic/rag-code-mcp.git
cd rag-code-mcp
go mod download
go run ./cmd/rag-code-mcp
π License
RagCode MCP is open source software licensed under the MIT License.
π·οΈ Keywords & Topics
semantic-code-search rag retrieval-augmented-generation mcp-server model-context-protocol ai-code-assistant vector-search code-navigation ollama qdrant github-copilot cursor-ai windsurf go php laravel python django flask fastapi code-intelligence ast-analysis embeddings llm-tools local-ai privacy-first offline-ai self-hosted on-premise zero-cost no-cloud private-code-search enterprise-ai secure-coding-assistant