code-rag-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@code-rag-mcpsearch codebases for how JWT auth is validated across repos"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
⚡ Multi-Repository Code Search Engine
Search across multiple code repositories at once, built for AI coding assistants. Connect over MCP and call tools such as search_codebases, get_symbol_definition, get_call_hierarchy and read_file; results are ranked code chunks with repo, file, lines, symbol and caller/callee context. Repositories are registered and indexed with the CLI or the web UI. Specs live in openspec/ (OpenSpec).
Quick Start
Requires Python 3 (standard library only) and Ollama for embeddings.
Pull the embedding model:
ollama pull qwen3-embedding:0.6bRegister and index your repositories, from a local directory or a git URL:
# Local directory python3 main.py add my-app /abs/path/to/my-app # Git repository (add --branch <name> for a non-default branch) python3 main.py add nest git@github.com:nestjs/nest.git --type gitCheck that search works:
python3 main.py search "login user authenticate"Start the server and keep it running (MCP endpoint and web UI at
http://127.0.0.1:8000):python3 main.py serveAdd the server to your AI assistant's MCP config (Claude Code, Cursor, Windsurf, Antigravity, etc.) and restart the assistant:
{ "mcpServers": { "multi-repo-code-rag": { "url": "http://127.0.0.1:8000/mcp" } } }Ask the assistant a question about your code, e.g. "Use multi-repo-code-rag to find where users are authenticated."
Related MCP server: Synapse
MCP
The assistant gets these tools from POST /mcp on the running serve process. Only one process may use the data directory at a time, so CLI commands fail while serve is running.
Tool | Description |
| Hybrid search: |
| Definition, file, lines, docstring, code: |
| Callers and callees: |
| Frontend API calls linked to backend route handlers |
| Repositories with counts, branch, sync status and nullable |
| Change branch, URL, name or assignment, optionally re-sync: |
| Incremental index: |
|
|
| Relations for |
| Full file content: |
To require MCP authentication, start the server with --mcp-token <token> (or set MCP_AUTH_TOKEN) and send Authorization: Bearer <token> on every request. When binding a non-localhost host, use a token and put the server behind TLS or an SSH tunnel.
CLI
The CLI manages repositories, groups, dependencies and search. Run python3 main.py --help (or <command> --help) for all commands and options.
Embedding Model
The default model is qwen3-embedding:0.6b (override with --embedding-model or $OLLAMA_EMBEDDING_MODEL). Pull it with ollama pull, or pass --auto-pull to serve / sync. If Ollama is offline, a built-in encoder is used.
Memory: the model loads on first use and is released after 30s idle. Change this with
--keep-alive(0, a duration like5m, oralways), or release it now withpython3 main.py unload.Changing models: affected repositories are re-embedded automatically, and searches are rejected until that finishes.
Configuration
Flags apply to the CLI and serve; environment variables are the fallback.
Variable | Purpose |
| Data directory (default: project |
|
|
| Ollama server (default |
| Required for |
| OpenAI-compatible embedding server for |
| Model residency policy; |
| Bearer token required on |
| Debug logging |
Tests
python3 -m unittest discover -s tests -p "test_*.py" -vBrowser UI checks (no dependencies; requires Chrome):
node tests/test_web_repo_sync.mjs # macOS (default Chrome path)
CHROME_BIN=/usr/bin/google-chrome node tests/test_web_repo_sync.mjs # Linux / custom Chrome path
$env:CHROME_BIN="C:\Program Files\Google\Chrome\Application\chrome.exe"; node tests/test_web_repo_sync.mjs # Windows (PowerShell)This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted code graph over MCP: exact callers, dependencies, and cross-repo blast radius for AI agents.
Search indexed code, trace dependencies, assess change impact, and recall repository memory.
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to search code by meaning, explore codebase structure, store and query knowledge with temporal facts, and read source code through a set of MCP tools.194 npm7MIT
- FlicenseNot gradedqualityDmaintenanceProvides structural code intelligence via 26 MCP tools, enabling AI assistants to query code symbols, dependencies, and call graphs accurately without file-pasting.-
- AlicenseNot gradedqualityDmaintenanceEnables AI coding assistants to semantically search and retrieve relevant code patterns, documentation, and implementations from a codebase via MCP tools.8MIT
- AlicenseAqualityAmaintenanceEnables AI assistants to search, analyze, and understand multi-language codebases by providing indexed code intelligence via MCP.16679 npm8MIT