codebase-mcp
Enables AI agents to semantically search and navigate code repositories using natural language, with support for multiple repos, incremental indexing, and no local install needed.
README
codebase-mcp
Remote MCP server that indexes your repos and lets AI agents search them semantically.
Developers connect by adding a URL — no local install needed.
Quick Start
1. Configure repos
Edit config.yaml:
repos:
- name: my-backend
path: /path/to/local/repo
extensions: [".py", ".ts", ".java"]
- name: my-frontend
url: https://github.com/your-org/frontend.git
branch: main
extensions: [".ts", ".tsx"]
2. Run
With Docker:
docker compose up --build
Without Docker:
python -m venv .venv && source .venv/bin/activate
pip install mcp chromadb sentence-transformers tree-sitter tree-sitter-python tree-sitter-javascript tree-sitter-typescript tree-sitter-java pyyaml gitpython pydantic pydantic-settings structlog uvicorn
python -m src.server
First run downloads the embedding model (~80MB) and indexes all repos. Subsequent runs are incremental (only changed files).
3. Connect your IDE
Claude Desktop — edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"codebase": {
"url": "http://localhost:8080/mcp"
}
}
}
Cursor — edit .cursor/mcp.json:
{
"mcpServers": {
"codebase": {
"url": "http://localhost:8080/mcp"
}
}
}
Claude Code — edit .mcp.json:
{
"mcpServers": {
"codebase": {
"url": "http://localhost:8080/mcp"
}
}
}
Replace localhost:8080 with your server's actual address when hosting remotely.
Tools
| Tool | What it does |
|---|---|
semantic_search(query) |
Natural language search: "how does auth work" |
get_entity(name) |
Exact lookup: "show me UserService" |
get_file_skeleton(file_path) |
File structure without bodies (saves tokens) |
list_repos() |
What's indexed |
reindex() |
Trigger re-indexing |
All tools accept an optional repo_name parameter to filter by repo.
Architecture
IDE (Claude/Cursor) → Streamable HTTP → MCP Server → ChromaDB
↑
tree-sitter AST chunking
+ sentence-transformers embeddings
+ git clone/pull on schedule
- Chunking: tree-sitter parses code into functions, classes, methods (not character splits)
- Embeddings: sentence-transformers (default
all-MiniLM-L6-v2, orjina-embeddings-v2-base-codefor better code search) - Storage: ChromaDB with cosine similarity
- Incremental: file MD5 hashes tracked, only changed files re-embedded
- Scheduled: auto git pull + re-index every N minutes (configurable)
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.