MCP server for analyzing code repositories, extracting call graphs, class hierarchies, and enabling natural language queries over code structure via SPARQL
Code Graph MCP has 14 well-named tools with clear verb-noun patterns (get_*, find_*, list_*, run_*, index_*, wait_*, reindex_*, delete_*). Descriptions are present and substantive (avg ~120 chars), exceeding the 10-char minimum. Input schemas are visible with typed parameters and descriptions. However, output schemas are largely undocumented, tools return dicts/lists but field structure is not formally specified. Error handling is minimal; no recovery guidance or actionable error messages. Parameter descriptions lack format constraints (e.g., no regex for URIs, no enum for node_type values). Some tools like natural_language_query and run_sparql accept free-form strings without validation hints. Composition is sound, tools chain well (find_nodes → get_callers → get_blast_radius). Security: no secrets in params, but no permission gates or audit trail declarations.
Delete a project and all its data (graph, wiki, source).
Search for nodes by name substring, type, or language. node_type: one of Function, Method, Constructor, Class, Interface, Field, File, Module, ExternalSymbol, etc. language: e.g. java, python, typescript. Returns uri, name, type, qualified_name, language.
Find all direct and transitive callers of a node, with severity rating. node_uri is the full URI of a function or field (e.g. from get_graph_summary or run_sparql).
Return all functions/methods that a given function directly calls. Each result has: callee_uri, callee_name, callee_type, qualified_name.
Return direct callers of a function or method. Each result has: caller_uri, caller_name, caller_type, qualified_name. Use get_blast_radius for the full transitive call chain.
Return the inheritance ancestry and descendants of a class. ancestors: classes this class inherits from (transitively via SPARQL* if supported, else 1-hop). descendants: classes that inherit from this class. implements: interfaces this class implements.
Output schemas undocumented. Tools return dicts/lists (e.g., get_callers returns list[dict] with caller_uri, caller_name, caller_type, qualified_name) but field structure is not formally specified in tool definitions. LLMs cannot reliably extract nested fields or plan downstream calls.
Parameter constraints missing. find_nodes accepts node_type and language as free-form strings with no enum or validation. run_sparql accepts arbitrary SPARQL with no injection guards. natural_language_query requires ANTHROPIC_API_KEY but does not document format or error if missing.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | 2026-07-28+ | v2 |
Return node and edge counts grouped by type for a project's graph.
Get full metadata for a project by ID.
Start indexing a public GitHub repo. Returns immediately with project_id and status. Call wait_for_indexing(project_id) to block until done.
List all projects: id, name, status, languages, source.
Convert a plain-English question into SPARQL and execute it. Returns both the generated query and the results. Requires ANTHROPIC_API_KEY configured on the backend.
Trigger re-indexing of an existing project. Returns immediately; use wait_for_indexing to track.
Execute a SPARQL SELECT query against the project graph. Use the cg: prefix for ontology terms (e.g. cg:calls, cg:Function). Results are capped at 500 rows.
Poll until indexing completes or fails. Returns final project state plus a progress log.
No error recovery guidance. Tools return HTTP errors or exceptions without actionable next steps. E.g., if index_github_repo fails, no suggestion to check URL format or retry. If run_sparql times out, no guidance on simplifying the query.
Destructive operations lack confirmation. delete_project is marked DESTRUCTIVE but has no dry-run or confirmation step. An agent could accidentally delete a project without user approval.
No permission gates or audit declarations. Tools do not declare required scopes (read:graph, write:project, delete:project). No audit trail mechanism to log who called what tool and when.