An MCP server that indexes local code into a graph database to provide context to AI assistants.
CodeGraphContext provides 18 tools with mostly complete schemas and descriptions. Naming follows verb_noun conventions (add_, check_, find_, etc.). Descriptions average ~150 chars and explain purpose clearly. However, several critical gaps reduce quality: (1) No output schemas documented for any tool, LLMs cannot predict response structure for chaining; (2) Error handling is absent, no guidance on retryability, user-fixable vs fatal errors, or recovery paths; (3) Parameters lack validation constraints (e.g., edit_distance 0-2 is mentioned but not enforced in schema); (4) No idempotency or confirmation patterns for destructive operations (delete_repository, load_bundle with clear_existing=true); (5) Composition issues, tools like add_code_to_graph and watch_directory both modify state but lack dry-run or confirmation support. Strengths: consistent naming, parameter descriptions present, enum constraints used (query_type, language). Baseline: 549 production tools average 18-char names (this server: 15-27 chars, good); 94% of A+ tools have docstrings (this server: 100% present but quality varies).
Performs a one-time scan of a local folder to add its code to the graph. Ideal for indexing libraries, dependencies, or projects not being actively modified. Returns a job ID for background processing.
Add a package to the graph by discovering its location. Supports multiple languages. Returns immediately with a job ID.
Analyze code relationships like 'who calls this function' or 'class hierarchy'. Supported query types include: find_callers, find_callees, find_all_callers, find_all_callees, find_importers, who_modifies, class_hierarchy, overrides, dead_code, call_chain, module_deps, variable_scope, find_complexity, find_functions_by_argument, find_functions_by_decorator.
Calculate the cyclomatic complexity of a specific function to measure its complexity.
Check the status and progress of a background job.
Delete an indexed repository from the graph.
No output schemas documented for any tool. LLMs cannot predict response structure, field names, or types. This breaks tool chaining, e.g., add_code_to_graph returns a job_id, but the response schema is not documented, forcing LLMs to guess whether it's {job_id: string} or {id: string, status: string}.
Destructive operations (delete_repository, load_bundle with clear_existing=true) lack confirmation or dry-run patterns. No guidance on retryability or error recovery. Agents could accidentally delete indexed repositories without safeguards.
Parameter constraints mentioned in descriptions but not enforced in JSON Schema. E.g., edit_distance described as '0-2' but schema shows {type: number} with no minimum/maximum. LLMs may pass invalid values.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | 2026-07-28+ | v2 |
Fallback tool to run a direct, read-only Cypher query against the code graph. Use this for complex questions not covered by other tools. The graph contains nodes representing code structures and relationships between them. **Schema Overview:** - **Nodes:** `Repository`, `File`, `Module`, `Class`, `Function`. - **Properties:** Nodes have properties like `name`, `path`, `cyclomatic_complexity` (on Function nodes), and `source`. - **Relationships:** `CONTAINS` (e.g., File-[:CONTAINS]->Function), `CALLS` (Function-[:CALLS]->Function or File-[:CALLS]->Function), `IMPORTS` (File-[:IMPORTS]->Module), `INHERITS` (Class-[:INHERITS]->Class).
Find relevant code snippets related to a keyword (e.g., function name, class name, or content).
Find potentially unused functions (dead code) across the entire indexed codebase, optionally excluding functions with specific decorators.
Find the most complex functions in the codebase based on cyclomatic complexity.
List all indexed repositories.
List all background jobs and their current status.
Lists all directories currently being watched for live file changes.
Load a pre-indexed .cgc bundle into the database. Can load from local file or automatically download from registry if not found locally. Bundles are portable snapshots of indexed code that load instantly without re-indexing.
Search for available pre-indexed bundles in the registry. Returns bundles matching the search query with details like repository, version, size, and download information.
Stops watching a directory for live file changes.
Generates a URL to visualize the results of a Cypher query in the Neo4j Browser. The user can open this URL in their web browser to see the graph visualization.
Performs an initial scan of a directory and then continuously monitors it for changes, automatically keeping the graph up-to-date. Ideal for projects under active development. Returns a job ID for the initial scan.
No error handling guidance. Tools lack descriptions of what errors can occur, whether they are retryable, or what the LLM should do next. E.g., add_code_to_graph could fail if path is invalid, but no recovery hint is provided.
List tools (list_jobs, list_indexed_repositories, list_watched_paths) lack pagination parameters (limit, offset, cursor). Large result sets could exhaust context window. No documented result limits.