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 / Intel)
# Apple Silicon (M1/M2/M3)
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
# Intel Macs
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-mcpbinary - β Sets up Ollama and Qdrant in Docker containers
- β
Downloads required AI models (
phi3:medium,mxbai-embed-large) - β Configures your IDE (VS Code, Cursor, Windsurf, Claude Desktop)
- β Adds binaries to your PATH
π Keep Updated
The auto-update feature is available starting with v1.1.18.
How to Upgrade:
-
If you are on an older version (< v1.1.18): Your version does not know the update command. You must re-run the installation command (the curl command above) one last time. (Don't worry, your indexes and configuration will be preserved).
-
If you are on v1.1.18 or newer: Simply run:
rag-code-mcp --update
For new installations:
The update system is built-in. Use the installer once, then simply run rag-code-mcp --update anytime to get the latest features.
π 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.
π Why RagCode? Performance Benefits
5-10x Faster Code Understanding
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
RagCode vs Generic RAG
π οΈ 9 Powerful MCP Tools
π Multi-Language Code Intelligence
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:
π Manual IDE Setup β | VS Code + Copilot Guide β
π¦ System Requirements
Minimum Requirements
Recommended (for better performance)
π Documentation
Getting Started
- Quick Start Guide - Install in 5 minutes
- IDE Setup - Manual IDE configuration
Configuration & Operations
- Configuration Guide - Models, env vars, advanced settings
- Troubleshooting - Common issues and solutions
- Docker Setup - Docker configuration details
Language Analyzers
- Go Analyzer - Functions, types, interfaces, GoDoc
- PHP Analyzer - Classes, traits, PHPDoc
- Laravel Analyzer - Eloquent, routes, controllers
- Python Analyzer - Classes, decorators, type hints
Technical Reference
- Architecture Overview - Technical deep dive
- Tool Schema Reference - Complete API documentation
- Incremental Indexing - How smart indexing works
- Workspace Detection - Multi-workspace support
- VS Code + Copilot - Detailed Copilot setup
External Resources
- Model Context Protocol - Official MCP specification
- Ollama - Local LLM and embedding models
- Qdrant - Vector database
π€ 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!
Built and maintained by DO IT MAGIC SOFTWARE, custom software and applied AI from PiteΘti, Romania.
Questions? Open an Issue β’ Read the Docs β’ Join Discussions