Git repository documentation indexer with MCP server, CLI, and library interfaces
repo-ctx presents a comprehensive MCP server with 18 tools covering repository analysis, code search, and documentation. Strengths: all tools have descriptions (100-300 chars, well-structured), complete input schemas with type definitions, and clear enum constraints. Weaknesses: output schemas are NOT documented anywhere in the visible code, LLMs cannot predict return types or structure; error handling guidance is absent; tool names use 'ctx-' prefix which adds prefix overhead without verb-noun clarity ('ctx-index' is clear but 'ctx-query' and 'ctx-export' lack action clarity); parameters like 'include' accept free-form array items ['code', 'symbols', 'diagrams', ...] without strict validation; no response field documentation means agents cannot chain tools effectively (e.g., does ctx-index return a repository_id that ctx-docs accepts?). Security: no mention of secret handling, API key injection, or permission gates. Composition: tools are well-separated by concern (index, search, analyze, graph, metrics) but missing idempotence guarantees and batch variants.
Analyze code and extract symbols. Auto-detects whether target is a local path or indexed repository (use /owner/repo format for indexed repos).
Analyze architecture with rules to identify violations, patterns, and structural issues.
Detect circular dependencies and dependency cycles in code architecture.
Get documentation for an indexed repository. Supports topic filtering, code analysis inclusion, and multiple output formats including compact llms.txt.
Generate Design Structure Matrix (DSM) to visualize architectural dependencies and identify coupling issues.
Export complete repository analysis including symbols, dependencies, documentation, and metadata.
Output schemas not documented. Tools define inputs rigorously but return types are invisible to LLMs. Agents cannot predict response structure or chain tools effectively (e.g., does ctx-index return repository_id for ctx-docs to accept?). Critical for tool composition.
No error handling guidance. Tools silently fail or return generic errors without actionable recovery steps. E.g., if ctx-index fails on a private repo, LLM gets no guidance on what to try next. Violates recovery-guide pattern.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 59 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 14 | 1.0.0+ | v1 |
Export Code Property Graph (CPG) in various formats (requires Joern).
Generate dependency graph for code. Shows relationships between symbols, classes, modules, or files.
Index a repository or group for documentation search and code analysis. Auto-detects provider from path format. Use `group: true` to index all repositories in a group/organization.
Detect architectural layers (presentation, business, data, etc.) in code structure.
List all indexed repositories with metadata. Optionally filter by provider.
Generate compact llms.txt summary suitable for LLM context windows. Includes repository structure, key documentation, and code snippets.
Calculate XS (Excessive Specification) complexity metrics and code quality measurements.
Run CPGQL query on Code Property Graph (requires Joern to be installed and running).
Unified search for repositories or symbols. By default searches repositories with fuzzy matching. Use `mode: 'symbols'` to search for code symbols in a specific target.
Show system status and capabilities including Joern availability, supported languages, and indexed repositories.
Get detailed symbol information from code. Can query indexed repos or local code.
List all symbols (functions, classes, methods, etc.) in a file or directory.
Parameter 'include' in ctx-docs and ctx-dump accepts free-form array ['code', 'symbols', 'diagrams', ...] without strict enum constraint. LLM could pass 'include: ["source_code"]' (wrong key) and fail silently. Should be strict enum or validate with clear error messages.
No security documentation for API key/token injection. Tools index GitHub and GitLab repos, how are credentials passed? If via parameters, secrets leak into logs. If via environment, document this clearly.
Tool names lack verb-noun clarity. 'ctx-query' and 'ctx-export' are vague, export to what? query on what? Better: 'analyze_cpg' or 'export_cpg', 'run_cpgql_query'. Names should convey action without requiring description lookup.
No idempotence guarantees. ctx-index indexes a repo, calling it twice: does it skip or re-analyze? Agents retry on ambiguous failures. Non-idempotent tools risk duplicate analysis or state corruption.
Missing batch variants. Agents iterating over 10 repos must call ctx-index 10 times. A 'ctx-index-batch' accepting array of repos would halve API calls, latency, and context overhead.
Pagination missing. ctx-search, ctx-symbols, ctx-list accept 'limit' but no 'offset' or 'cursor' for fetching results 11-20. Large result sets could blow context windows without pagination.
Parameter 'type' in ctx-search, ctx-analyze, ctx-symbols filters by symbol type but lacks format constraint. Should clarify: are these case-sensitive? Can LLM pass 'Function' (capital F) or must be 'function'? Add constraint in description.