codebase-qa-mcp

v0.1.0
codebase-qa-mcp Checked 5 hours ago Published 9 months ago

MCP server for codebase Q&A powered by RAG — index any git repo and ask questions about the code

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

index_repository

Full-index a git repository into the vector store. Reads all supported source files, splits them into chunks, generates embeddings, and stores them in ChromaDB. This replaces any existing index for the same repo. Sets this repo as the active project for queries. Args: repo_path: Absolute path to the git repository to index.

ParameterTypeDescription
repo_path *string

update_index

Incrementally update the index using git diff. Only re-indexes files that changed since the last index. Much faster than a full re-index for large repos. Falls back to full index if no previous index exists. Args: repo_path: Absolute path to the git repository.

ParameterTypeDescription
repo_path *string

query_codebase

Search the indexed codebase for code chunks relevant to a question. Returns the most relevant source code chunks with file paths, ordered by similarity. Use this to find code related to a topic, understand how something is implemented, or locate specific functionality. Args: question: Natural language question about the codebase. top_k: Number of results to return (default 5). file_filter: Optional substring to filter by file path (e.g. "auth" to only search auth-related files).

ParameterTypeDescription
question *string
file_filter
top_kinteger

switch_project

Switch the active project without re-indexing. Use this when you want to query a previously indexed repo. The repo must have been indexed before with index_repository. Args: repo_path: Absolute path to a previously indexed repository.

ParameterTypeDescription
repo_path *string

list_indexed_files

List all file paths currently indexed in the active project. Useful for understanding what's in the index and verifying that the right files were captured.

get_index_stats

Get statistics about the active project's index. Returns total chunks, total files, last indexed commit, etc.

list_projects

List all previously indexed projects. Shows all repos that have been indexed, with their paths and last indexed commit. Use switch_project to activate one.