code-explorer
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
CodeExplorer provides a deterministic polyglot AST & architecture knowledge graph with OpenCypher querying.
Schema & Parallel Batching:
Call
get_taxonomyorget_architecture_mapfirst (passworkspacePathwhen targeting a specific repository).Batch independent
execute_custom_read_cypherqueries in parallel tool calls within the same turn rather than working sequentially one query or sub-task per turn.
Ontology Semantics (AST-Verified):
Type.attributes,Function.attributes,Member.attributes: exact AST annotations/decorators declared directly on that symbol (comma-separated; not inherited from base types or merged from child methods).Type.extends/Type.implements: declared base type and interface names (including external framework types);(sub:Type)-[:INHERITS_FROM|IMPLEMENTS]->(base:Type)edges connect types defined inside the repository.(caller:Function)-[:CALLS]->(callee:Function)links callers to the resolved overload's declaring workspaceType((Type)-[:HAS_METHOD]->(callee), distinguishing interface methods from static extension/helper methods);(m:Member)-[r:ACCESSED_BY]->(fn:Function)is emitted only when operations are invoked onm(m.data_type, comma-separatedr.operation; unused injections or plain argument passing do not emitACCESSED_BY). Trust AST-verified graph edges without redundant manual file verification.
Inline Response Budget (
<10 KB) & Source Snippets:MCP hosts spill tool outputs above
~10 KB(~120rows) to external files, costing extra read turns. Match exact symbol names (IN [...]instead of broadCONTAINS), filter all hops strictly inWHERE(including transitive inheritance viaEXISTS { MATCH (t)-[:INHERITS_FROM|IMPLEMENTS*1..5]->(b:Type) WHERE ... }), aggregate withcount(...)/collect(DISTINCT ...)per module or class, and omit verboseidorfile_pathcolumns unless fetching snippets.If source line inspection is needed, batch ranges in one
fetch_code_snippetscall (nodesYAML list of{file_path, start_line, end_line},workspacePath) rather than per-file reads.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| save_project_queryB | Save a reusable Cypher query with metadata into .codeexplorer/queries/. |
| find_refactoring_opportunitiesB | Find code health anomalies: dead code (0 incoming edges) and god objects. |
| get_call_chainC | Trace sequential call graph between start and end functions. |
| find_symbolC | Search graph for code symbols (Class, Interface, Function, Variable). |
| get_project_dependenciesC | Project dependency graph with runtime vs build filtering. |
| get_file_outlineB | Extract file structural outline without reading source text. |
| get_architecture_viewC | Architecture view of workspace structure ('c1', 'c2', 'c3', 'project-map', 'tiers'). |
| check_semantic_gatesA | Evaluate Semantic Invariant Gates (SIG) across the workspace or against specific changed files. Returns zero-match status, new vs tolerated violations, and remediation guidance. |
| get_node_definitionC | Get schema and documentation for a specific ontological Node Kind. |
| get_service_contractsC | Ingress and egress contracts for a service (endpoints, RPC, publishers, subscribers). |
| export_architecture_diagramC | Export Mermaid or C4 system architecture diagrams from the knowledge graph. |
| scan_workspaceC | Scan and index source files, projects, ASTs, and dependencies into graph DB. |
| get_affected_testsB | Test Impact Analysis (TIA): finds tests affected by changed files, git diff, or symbols. |
| init_workspaceC | Initialize a new '.codeexplorer' workspace in the target directory. |
| list_project_queriesA | List saved project-specific Cypher queries in .codeexplorer/queries/. |
| fetch_code_snippetsC | Fetch source code snippets for given graph nodes. |
| ingest_graph_dataC | Batch ingest custom nodes and relationships into the graph database. |
| get_architecture_mapC | Infrastructure map: workspace folders, projects, internal folders, and databases. |
| get_architecture_overviewC | High-level architecture overview grouped by semantic layers (Core, Services, UI, Infra, Tests). |
| list_semantic_gatesB | List all available Semantic Invariant Gates (both built-in and workspace-specific) with FOIM coordinates and debt status. |
| get_workspace_statusB | Get workspace health, DB size, indexed project languages, node and edge counts. |
| analyze_code_impactB | Blast-radius impact analysis: all callers, dependents, and references affected by modifying a symbol (Class, Interface, Function, Service, Table). Prioritize over grep. |
| get_project_entry_pointsC | Find entry points (controllers, handlers, endpoints) inside a project. |
| get_test_coverageC | Static test reachability coverage: covered/uncovered classes and methods. |
| get_callersA | Find all callers, inbound references, service consumers, or table/topic accessors for a target (functions, microservices, database tables, messaging topics). Prioritize this tool over grep for discovering callers. |
| execute_custom_read_cypherB | Execute custom read-only Cypher query (MATCH only) against the code graph. |
| clear_workspace_indexC | Clear indexed data from the workspace database. |
| trace_cross_service_flowC | Trace distributed flow across microservices starting from an endpoint or topic. |
| get_taxonomyC | Retrieve active graph schema (node kinds, relationship types, properties). |
| search_identifiersB | Fast hybrid vector and trigram search across code identifiers, routes, tables, and topics. Finds exact or fuzzy matches with sub-millisecond ranking. |
| inspect_data_lineageB | Data lineage: trace SQL/ORM queries, source files, and functions accessing a database table. |
| execute_project_queryC | Execute a saved project-specific Cypher query by name with parameters. |
| resolve_call_targetC | Find concrete implementations of an interface method (DI resolution). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 33 tools
Most tools have distinct graph-analysis purposes, but several clusters overlap heavily: get_architecture_view, get_architecture_map, and get_architecture_overview are easy to confuse, as are get_call_chain, get_callers, analyze_code_impact, and trace_cross_service_flow. The descriptions provide useful distinctions, but an agent still has to reason carefully to choose the right architecture or call-analysis tool.
All tool names use consistent snake_case verb_noun conventions such as get_callers, find_symbol, scan_workspace, and execute_project_query. The pattern is predictable throughout, even across the large surface.
33 tools is heavy for a code graph explorer and includes many closely related architecture, call-analysis, and semantic-gate tools. While the domain is complex, several tools could likely be consolidated or exposed through a smaller, clearer set.
The surface covers workspace lifecycle, indexing, schema inspection, symbol search, call graphs, impact analysis, test coverage, architecture views, service contracts, data lineage, and semantic gates. Minor gaps exist around updating or deleting custom graph data and managing saved queries beyond save/list/execute, but core exploration workflows are well covered.