codebase-mcp
Allows indexing and retrieving a GitHub repository's docs, closed issues, and source code through hybrid and reranked search.
Click on "Install 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., "@codebase-mcpfind relevant issues and docs about database connection pooling"
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.
codebase-mcp
MCP server that indexes one repo's docs, closed issues, and source code across three differential chunking strategies, and exposes hybrid + reranked retrieval as MCP tools.
The chunking comparison is the point of this project — never cut it, even under time pressure. Everything else has a defined fallback below.
Build order
Scaffold: project layout, Docker Compose (Qdrant + Ollama), CI skeleton
Ingestion: pull docs / closed issues / source for the target repo →
data/raw/Chunking (the core contribution) →
data/chunks/docs: heading-boundary splitting
issues: thread-level (not comment-level)
code: AST boundaries via tree-sitter — fallback if short on time: file-level chunks
baseline: naive fixed-size, for the comparison
Indexing: BGE-small embeddings → Qdrant; BM25 index in parallel
Eval ground truth: mine closed issues with maintainer answers → labelled pairs (do this before tuning retrieval, not after)
Retrieval: hybrid BM25 + dense, RRF fusion, BGE-reranker-base cross-encoder rerank
Query router: LLM classifier (docs / issues / code / mixed) → per-source weights - [ ] stretch: distill into a small trained model for millisecond routing — fallback if short on time: keep the LLM classifier
MCP server (MCP Python SDK) + FastAPI/Swagger front door
CI/CD: GitHub Actions → GHCR image
Related MCP server: PAMPA
Evaluation
Recall@k and MRR, reported per source (docs / issues / code)
All three chunking strategies vs. the naive fixed-size baseline, head to head
Routing accuracy, reported separately from end-to-end answer quality
Ablation table:
baseline → +hybrid → +rerank → +routing
Stack
Python 3.11 · LangChain/LangGraph · tree-sitter · Qdrant · sentence-transformers (BGE-small-en-v1.5) · rank_bm25 · BGE-reranker-base · Ollama (dev) / Groq (hosted demo) · MCP Python SDK · FastAPI + Swagger · Docker Compose · GitHub Actions → GHCR
Getting started
cp .env.example .env # fill in TARGET_REPO, GITHUB_TOKEN, GROQ_API_KEY
docker compose --profile dev up -d qdrant ollama
pip install -e ".[dev]"
codebase-mcp ingest --repo owner/name
codebase-mcp chunk --strategy all
codebase-mcp index
codebase-mcp eval-mine
codebase-mcp eval-run --ablation
codebase-mcp serveThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Ask any GitHub repository a question. Get source-backed answers.
Search your knowledge bases from any AI assistant using hybrid RAG.
A cited wiki of your GitHub repo: search, read pages, find symbols and ask, with line citations.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables semantic search across indexed documents using vector embeddings. Index GitHub repositories and URLs to perform natural language queries with AI-enhanced contextual results.32MIT
- AlicenseNot gradedqualityCmaintenanceProvides semantic code search and retrieval capabilities for AI agents, enabling them to query codebases using natural language with automatic learning, hybrid search, and intelligent chunking of functions and classes.1629ISC
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to search and retrieve context from GitHub issues, pull requests, releases, and documentation using hybrid semantic search and time-ordered activity scans.103Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI coding assistants to search and retrieve information from a locally ingested knowledge base using hybrid search, grounded in user-curated documentation.17MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/HEMAHARENI/codebase-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server