Repo Interrogator
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., "@Repo Interrogator search for 'BM25' in the codebase"
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.
Repo Interrogator
Repo Interrogator is a local-first, deterministic MCP server that helps AI tools inspect one code repository safely.
It is for repository interrogation, not code modification.
What it does:
indexes files inside one
repo_rootruns deterministic BM25 search
outlines code structure via pluggable language adapters
builds context bundles with citations
writes sanitized audit logs
What it does not do:
no LLM calls in v1
no code writes or patching
no multi-repo routing
no HTTP/SSE transport in v1
Supported Environments
Python:
>=3.11Tested in this project: Linux and WSL paths, with explicit Windows path normalization tests
Expected to run on: Linux, macOS, Windows (with Python 3.11+)
Related MCP server: mcplens
Quick Start
Clone this repository and enter it:
git clone https://github.com/taggedzi/Repo-Interrogator
cd repomapInstall (end-user style):
python -m pip install .This installs the console command repo-mcp.
Run against a local repository:
repo-mcp --repo-root /absolute/path/to/target/repoThe server uses STDIO. It waits for newline-delimited JSON requests and writes newline-delimited JSON responses.
Verify it responds:
printf '%s\n' \
'{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}' \
'{"id":2,"jsonrpc":"2.0","method":"tools/call","params":{"name":"repo.status","arguments":{}}}' \
| repo-mcp --repo-root /absolute/path/to/target/repoYou should get two JSON-RPC 2.0 response lines (the notification produces no output):
Line 1:
initializeresult —{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05",...}}Line 2: tool result —
{"jsonrpc":"2.0","id":2,"result":{"content":[{"type":"text","text":"{\"index_status\":...}"}]}}
Developer Quick Start
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .
python -m pip install ruff mypy pytest buildRun checks:
python -m ruff format .
python -m ruff check .
python -m mypy src
python -m pytest -qTool Surface (Current)
repo.statusrepo.list_filesrepo.open_filerepo.outlinerepo.searchrepo.referencesrepo.find_definitionrepo.build_context_bundlerepo.refresh_indexrepo.audit_log
Optional Semantic Search
Install the semantic extra (pip install repo-interrogator[semantic]) to
enable mode="semantic"/"hybrid" on repo.search and retrieval_mode on
repo.build_context_bundle. The core package has zero runtime dependencies
and is unaffected when this extra isn't installed. See ADR-0018 and
docs/USAGE.md for details.
Language Adapter Support
repo.outline currently supports these adapters:
Python:
python(AST-based)TypeScript/JavaScript:
ts_js_lexical(lexical)Java:
java_lexical(lexical)Go:
go_lexical(lexical)Rust:
rust_lexical(lexical)C++:
cpp_lexical(lexical)C#:
csharp_lexical(lexical)Fallback:
lexical(empty structural outline for unsupported files)
Important limits:
Non-Python adapters are lexical. They are deterministic and fast, but conservative.
Macro/generated code and advanced language features can be partially represented.
Search, references, and context bundle coverage depend on indexed extensions/excludes.
Start from
examples/repo_mcp.tomlfor stack-aware include/exclude defaults and override guidance.
Documentation
Installation:
docs/INSTALL.mdUsage and request/response examples:
docs/USAGE.mdConfiguration and limits:
docs/CONFIG.mdAI client integration (MCP over STDIO):
docs/AI_INTEGRATION.mdTroubleshooting:
docs/TROUBLESHOOTING.mdIssue labels and triage workflow:
docs/TRIAGE.mdSecurity policy and vulnerability reporting:
SECURITY.mdSecurity model and blocked behavior:
docs/SECURITY.mdRelease process:
docs/release.md
Docs Verification Checklist
Run these commands to validate docs examples against the current codebase:
python -m ruff format .
python -m ruff check .
python -m mypy src
python -m pytest -q
# quick server smoke
printf '%s\n' \
'{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0"}}}' \
'{"id":2,"jsonrpc":"2.0","method":"tools/call","params":{"name":"repo.status","arguments":{}}}' \
| python -m repo_mcp.server --repo-root .Available Tools
9 toolsrepo.audit_logA
Read sanitized audit log entries for all tool calls made in this session. Useful for diagnostics and verifying what was called and whether it succeeded.
Inputs: limit, since.
repo.build_context_bundleA
Build a compact, ranked, cited context bundle for a coding task. Combines search, outline, and cross-file references into a budget-bounded excerpt set. Each selection includes why_selected explaining which signals drove it. Requires the index to be built first (repo.refresh_index).
Inputs: budget (required), prompt (required), strategy, include_tests.
repo.list_filesA
List readable source files under the repository root. Supports glob filtering. Use to discover what files exist before searching or opening.
Inputs: glob, max_results, include_hidden.
repo.open_fileB
Read a line range from a source file. Returns numbered lines. Specify start_line and end_line to read a focused range rather than the entire file.
Inputs: path (required), end_line, start_line.
repo.outlineA
Return the declaration structure of a file using AST (Python) or lexical analysis. Shows classes, functions, and other symbols with line ranges and parent context.
Inputs: path (required).
repo.referencesA
Find all cross-file references to a named symbol using AST (Python) or lexical analysis. Returns file paths, line numbers, strategy, and confidence level per reference.
Inputs: symbol (required), path, top_k.
repo.refresh_indexA
Build or incrementally refresh the BM25 search index. Run this before searching or bundling if the index is stale or not yet built. Use force=true to rebuild from scratch.
Inputs: force.
repo.searchA
Run BM25 full-text search over indexed repository chunks. Returns ranked hits with file path, line range, snippet, and matched terms. Run repo.refresh_index first if the index is not yet built.
Inputs: query (required), mode, top_k, file_glob, +1 more.
repo.statusA
Return index state, active limits, enabled adapters, and effective config. Call this first to verify the server is connected and the index is ready.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose: from indexing and search to file operations, references, outline, and audit. No overlap exists between tools.
All tools follow the 'repo.verb_noun' pattern using snake_case, providing a predictable and consistent naming scheme throughout.
With 9 tools, the set is well-scoped for repository interrogation. Each tool serves a specific function without redundancy or excess.
The tool surface covers the full workflow: indexing, searching, listing, opening, outlining, referencing, and building context bundles. No obvious gaps for the stated purpose.
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Capability registry for the agentic economy. Semantic search over verified MCP server listings.
Related MCP Servers
- AlicenseBqualityDmaintenanceA local-first MCP server that provides AI agents with safe codebase access through file discovery, hybrid lexical-semantic search, and project introspection. It features durable local memory and semantic indexing while keeping all data and processing entirely on your local machine.7487 npm6MIT
- AlicenseNot gradedqualityBmaintenanceA local MCP server that provides AI coding assistants with semantic search capabilities over codebases. It indexes code using local embeddings and exposes tools for efficient code retrieval, saving tokens and improving response quality.31 npm4MIT
- AlicenseNot gradedqualityDmaintenanceA self-hosted MCP server that indexes your codebase and provides AI assistants with deep context including file tree, full-text search, git history, dependencies, and stack detection, all without sending your code to third parties.2 npm1MIT
- AlicenseAqualityDmaintenanceAn MCP server that indexes reference repositories and provides tools for AI coding agents to retrieve lossless code context, enabling reasoning over codebases larger than the agent's context window.82Apache 2.0