rag-code-mcp

module
v1.1.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2025 License: MIT

README ΒΆ

RagCode MCP - Semantic Code Navigation with AI

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

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


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

⭐ Star us on GitHub if RagCode helps your workflow!

Questions? Open an Issue β€’ Read the Docs β€’ Join Discussions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL