An MCP server that indexes local code into a graph database to provide context to AI assistants.
CodeGraphContext provides 17 tools with complete input schemas and descriptions. Naming follows verb_noun conventions (add_code_to_graph, find_code, analyze_code_relationships). Descriptions are substantive (100-300 chars typical), explaining WHAT and WHEN. However, output schemas are entirely undocumented, no tool specifies what fields are returned, forcing LLMs to infer structure. Error handling is absent: no guidance on retryability, user-fixable vs fatal errors, or recovery paths. Parameter descriptions lack constraints (e.g., edit_distance 0-2 is mentioned but not enforced in schema). Tool composition is reasonable but some tools overlap (find_code + analyze_code_relationships both search code). No tool annotations (readOnlyHint, destructiveHint) despite clear risk levels (WRITE, DESTRUCTIVE, READ_ONLY marked in metadata but not in schema).
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 infer what fields are returned (e.g., does find_code return file_path, line_number, snippet, confidence?). Forces agents to guess structure and wastes tokens on trial-and-error parsing.
No error handling guidance. Tools like delete_repository (DESTRUCTIVE) and add_code_to_graph (WRITE) provide no recovery hints. LLMs cannot distinguish retryable failures from user-fixable ones.
Tool annotations missing from schemas. Risk levels (READ_ONLY, WRITE, DESTRUCTIVE) are metadata but not exposed in JSON Schema via readOnlyHint/destructiveHint. Agents cannot infer safety properties from the schema alone.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 65 | 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.
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.
Parameter constraints not enforced in schema. edit_distance described as '0-2' but no minimum/maximum in JSON Schema. Agents may pass invalid values; no validation feedback.
Overlapping tool responsibilities. find_code and analyze_code_relationships both search code; unclear when to use each. LLMs waste reasoning cycles deciding between similar tools.