rag-code-mcp

doITmagic/rag-code-mcp

3.3

If you are the rightful owner of rag-code-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

RagCode MCP Server is a semantic code navigation server utilizing Retrieval-Augmented Generation (RAG) with multi-language support, designed to enhance code search and navigation efficiency.

Tools
5
Resources
0
Prompts
0

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

📖 |


🎯 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

SectionDescription
🔒 Privacy & Security100% local, zero cloud dependencies
🚀 Why RagCode?Performance benefits, comparisons
🛠️ MCP ToolsAll 9 tools explained
🌐 Supported LanguagesGo, PHP, Python support
💻 IDE IntegrationWindsurf, Cursor, VS Code, Claude
Advanced settings, models, env vars
Common issues and solutions
📚 DocumentationAll 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

TaskWithout RagCodeWith RagCodeSpeedup
Find authentication logic30-60s (read 10+ files)2-3s (semantic search)10-20x
Understand function signature15-30s (grep + read)1-2s (direct lookup)15x
Find all API endpoints60-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

FeatureRagCode (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

AspectGeneric RAGRagCode
ChunkingArbitrary text splitsSemantic units (functions, classes)
MetadataFilename onlyName, type, params, dependencies, lines
ResultsMay return partial codeAlways complete, runnable code

🛠️ 9 Powerful MCP Tools

ToolDescriptionUse When
search_codeSemantic search by meaningFirst choice for exploration
hybrid_searchKeyword + semantic for exact matchesNeed exact identifiers
get_function_detailsComplete function source codeKnow exact function name
find_type_definitionType/class with fields and methodsUnderstand data models
find_implementationsAll usages and callersBefore refactoring
list_package_exportsAll exported symbolsExplore unfamiliar packages
search_docsSearch Markdown documentationSetup, architecture info
get_code_contextCode snippet with contextHave file:line reference
index_workspaceReindex codebaseAfter major changes

📖


🌐 Multi-Language Code Intelligence

LanguageSupport LevelFeaturesDocs
Go✅ FullFunctions, types, interfaces, methods, AST analysis
PHP✅ FullClasses, methods, interfaces, traits, PHPDoc
PHP + Laravel✅ FullEloquent models, routes, controllers, middleware
Python✅ FullClasses, functions, decorators, type hints, mixins
JavaScript/TypeScript🔜 PlannedComing soon (tree-sitter based)-

Multi-Workspace Support

RagCode automatically detects and manages multiple workspaces with isolated indexes.

📖 - Auto-detection, stable IDs, caching


💻 IDE Integration

RagCode works with all major AI-powered IDEs:

IDEStatusSetup
Windsurf✅ Auto-configuredJust install
Cursor✅ Auto-configuredJust install
VS Code + Copilot✅ Auto-configuredRequires VS Code 1.95+
Claude Desktop✅ Auto-configuredJust install
Antigravity✅ Auto-configuredJust install

📖 |


📦 System Requirements

Minimum Requirements

ComponentRequirementNotes
CPU4 coresFor running Ollama models
RAM16 GB8 GB for phi3:medium, 4 GB for nomic-embed-text, 4 GB system
Disk10 GB free~8 GB for models + 2 GB for data
OSLinux, macOS, WindowsDocker required for Qdrant

Recommended (for better performance)

ComponentRequirementNotes
CPU8+ coresBetter concurrent operations
RAM32 GBComfortable multi-workspace indexing
GPUNVIDIA 8GB+ VRAMSignificantly speeds up Ollama (optional)
Disk20 GB SSDFaster indexing and search

📖


📚 Documentation

Getting Started

  • - Install in 5 minutes
  • - Manual IDE configuration

Configuration & Operations

  • - Models, env vars, advanced settings
  • - Common issues and solutions
  • - Docker configuration details

Language Analyzers

  • - Functions, types, interfaces, GoDoc
  • - Classes, traits, PHPDoc
  • - Eloquent, routes, controllers
  • - Classes, decorators, type hints

Technical Reference

  • - Technical deep dive
  • - Complete API documentation
  • - How smart indexing works
  • - Multi-workspace support
  • - Detailed Copilot setup

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 .


🏷️ 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 IssueJoin Discussions