MCP Servers

模型上下文协议服务器、框架、SDK 和模板的综合目录。

Semantic code navigation MCP server using RAG (Retrieval-Augmented Generation). Features multi-language support (Go, PHP, Python, JS), local LLMs (Ollama), and vector search (Qdrant) for IDEs like Cursor, Windsurf, Copilot and Claude.

创建于 11/23/2025
更新于 22 days ago
Repository documentation and setup instructions
RagCode MCP - Semantic Code Navigation with AI

License: MIT Go Version Go Report Card MCP AI Ready Privacy No Cloud Zero Cost GitHub Stars

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:

  1. Open your project in your IDE (VS Code, Cursor, Windsurf)
  2. Ask your AI assistant a question about your code
  3. 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

| Section | Description | |---------|-------------| | 🔒 Privacy & Security | 100% local, zero cloud dependencies | | 🚀 Why RagCode? | Performance benefits, comparisons | | 🛠️ MCP Tools | All 9 tools explained | | 🌐 Supported Languages | Go, PHP, Python support | | 💻 IDE Integration | Windsurf, Cursor, VS Code, Claude | | ⚙️ Configuration | Advanced settings, models, env vars | | 🐛 Troubleshooting | Common issues and solutions | | 📚 Documentation | All guides and references |


🔒 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.


🚀 Why RagCode? Performance Benefits

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 |


🛠️ 9 Powerful MCP Tools

| 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

Minimum Requirements

| Component | Requirement | Notes | |-----------|-------------|-------| | CPU | 4 cores | For running Ollama models | | RAM | 16 GB | 8 GB for phi3:medium, 4 GB for nomic-embed-text, 4 GB system | | Disk | 10 GB free | ~8 GB for models + 2 GB for data | | OS | Linux, macOS, Windows | Docker required for Qdrant |

Recommended (for better performance)

| Component | Requirement | Notes | |-----------|-------------|-------| | CPU | 8+ cores | Better concurrent operations | | RAM | 32 GB | Comfortable multi-workspace indexing | | GPU | NVIDIA 8GB+ VRAM | Significantly speeds up Ollama (optional) | | Disk | 20 GB SSD | Faster indexing and search |

📖 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


Built with ❤️ for developers who want smarter AI code assistants

Star us on GitHub if RagCode helps your workflow!

Questions? Open an IssueRead the DocsJoin Discussions

快速设置
此服务器的安装指南

安装命令 (包未发布)

git clone https://github.com/doITmagic/rag-code-mcp
手动安装: 请查看 README 获取详细的设置说明和所需的其他依赖项。

Cursor 配置 (mcp.json)

{ "mcpServers": { "doitmagic-rag-code-mcp": { "command": "git", "args": [ "clone", "https://github.com/doITmagic/rag-code-mcp" ] } } }