# CodeGraphContext MCP
> A community-maintained local MCP server that indexes source repositories into a graph so an assistant can query symbols, calls, dependencies, complexity, and other code relationships.
Canonical: https://www.mcpfolio.com/servers/codegraphcontext
Last updated: 2026-10-28
## Catalog record

- Publisher: CodeGraphContext / Shashank Shekhar Singh (community-maintained)
- Categories: development, database, search, version-control

## Website

https://cgc.codes/

## Repository

https://github.com/CodeGraphContext/CodeGraphContext

## Transports

stdio

## Authentication

No authentication is required for the default embedded database. If configuring an external Neo4j database, credentials are stored by the setup flow in ~/.codegraphcontext/.env; do not put them in the MCP record or chat.

## Tools

- **discover_codegraph_contexts**: Find indexed CodeGraphContext databases below a directory.
- **switch_context**: Select a CodeGraphContext database for the session.
- **add_code_to_graph**: Index a local directory into the graph.
- **add_package_to_graph**: Index an installed dependency package.
- **list_indexed_repositories**: List repositories currently indexed in the graph.
- **delete_repository**: Remove an indexed repository from the graph.
- **get_repository_stats**: Get file, function, class, and module counts.
- **find_code**: Search indexed symbols and content.
- **analyze_code_relationships**: Query callers, callees, imports, hierarchy, and related code.
- **find_dead_code**: Find candidate unused functions.
- **calculate_cyclomatic_complexity**: Calculate complexity for a function.
- **find_most_complex_functions**: Rank functions by cyclomatic complexity.
- **load_bundle**: Load a CodeGraphContext bundle.
- **search_registry_bundles**: Search the public bundle registry.
- **watch_directory**: Index and monitor a directory for changes.
- **list_watched_paths**: List active directory watch roots.
- **unwatch_directory**: Stop monitoring a directory.
- **list_jobs**: List background indexing and scan jobs.
- **check_job_status**: Check the status of an indexing job.
- **execute_cypher_query**: Run read-only Cypher against the active graph backend.
- **visualize_graph_query**: Build a graph-browser URL for a query.
- **generate_report**: Generate a Markdown code graph audit report.
- **find_java_spring_endpoints**: List indexed Spring HTTP endpoints.
- **find_java_spring_beans**: List indexed Spring bean stereotypes.
- **find_datasource_nodes**: Query indexed datasource architecture nodes.

## Sources

- [maintainer_documentation](https://github.com/CodeGraphContext/CodeGraphContext)

## Setup

Use the interactive setup panel on [the detail page](https://www.mcpfolio.com/servers/codegraphcontext) to view instructions for each supported client.