Skip to main content
mcpSource-backedReview first Safety Privacy

CodeGraphContext MCP Server

MCP server and CLI toolkit that indexes local code into a graph database so Claude can query functions, call chains, dependencies, and repository structure.

by CodeGraphContext·added 2026-06-05·
Claude CodeClaude Desktop
HarnessClaude CodeClaude Desktop
Review first review before installing

Open the source and read safety notes before installing.

Safety notes

  • CodeGraphContext indexes repository contents and can expose code structure, symbols, dependencies, comments, filenames, and relationships to Claude.
  • Live file watching can keep graph data updated as files change, so verify the watched tree before enabling it on private workspaces.
  • External graph databases can retain indexed source metadata after the MCP session ends.
  • Generated graph context may include prompt-injection text from comments, documentation, fixtures, tests, or vendored files.
  • Review database credentials, ignored paths, and repository scope before connecting the server to an MCP client.

Privacy notes

  • Source code, file paths, symbol names, comments, dependency names, call graphs, class hierarchies, search terms, prompts, graph queries, and tool outputs may be visible to the MCP client and model provider.
  • Indexing proprietary repositories can reveal architecture, product plans, credentials accidentally committed to code, internal package names, or security-sensitive paths.
  • If using a remote graph backend, review its authentication, retention, backups, logging, and access controls before indexing private code.
  • Remove or ignore secrets, customer data, generated dumps, logs, and vendor directories before building code graphs for model access.

Prerequisites

  • Python 3.10 or newer available for the CodeGraphContext package.
  • A local repository you are allowed to index and share with an MCP client.
  • Optional graph database backend reviewed if you use Neo4j, FalkorDB, KuzuDB, LadybugDB, or another supported backend.
  • Optional SCIP indexers configured if you need more precise language-specific call and inheritance data.
  • Sensitive files, generated artifacts, credentials, and ignored paths reviewed before indexing.

Schema details

Install type
cli
Troubleshooting
No
Source repository stats
Scope
Source repo
Collection metadata
Estimated setup
15 minutes
Difficulty
advanced
Full copyable content
{
  "mcpServers": {
    "codegraphcontext": {
      "command": "codegraphcontext",
      "args": ["mcp", "start"],
      "env": {
        "NEO4J_URI": "YOUR_GRAPH_DATABASE_URI",
        "NEO4J_USER": "YOUR_GRAPH_DATABASE_USER",
        "NEO4J_PASSWORD": "YOUR_GRAPH_DATABASE_PASSWORD"
      }
    }
  }
}

About this resource

Content

CodeGraphContext is an MCP server and CLI toolkit for turning repositories into queryable code graphs. Claude can use it to ask about callers, callees, class hierarchies, call chains, complexity, dead code, search results, and repository structure after a project has been indexed.

The upstream README documents both CLI mode and MCP server mode. The Python package exposes the codegraphcontext command, with codegraphcontext mcp setup for client configuration and codegraphcontext mcp start for launching the MCP server.

Source Review

These sources were reviewed on 2026-06-05. Prefer the live repository, README, security policy, and PyPI metadata for current package version, supported commands, database backend options, language support, and MCP setup behavior.

Features

  • Index local repositories into a graph database.
  • Query callers, callees, class hierarchies, dependencies, and call chains.
  • Search code and inspect complexity or dead-code signals.
  • Watch directories and update graph data as files change.
  • Use embedded or external graph database backends.
  • Support multiple programming languages through tree-sitter and optional SCIP indexing.
  • Configure MCP clients through the built-in setup wizard or manual server config.

Installation

Install the Python package:

pip install codegraphcontext

Run the setup wizard, then start the MCP server:

codegraphcontext mcp setup
codegraphcontext mcp start

For MCP clients that launch stdio servers manually:

{
  "mcpServers": {
    "codegraphcontext": {
      "command": "codegraphcontext",
      "args": ["mcp", "start"]
    }
  }
}

Restart the MCP client after adding the server.

Use Cases

  • Ask Claude which functions call a risky API before refactoring.
  • Trace call chains across modules in a large repository.
  • Explore class hierarchies and dependency relationships.
  • Search for feature-specific code and understand nearby symbols.
  • Find complexity hotspots or possible dead code.
  • Keep a code graph updated while working on an active branch.

Safety and Privacy

CodeGraphContext is useful because it indexes real source trees. That also means it can expose private code, filenames, architecture, comments, fixtures, test data, generated files, and accidentally committed secrets to an MCP client and model provider.

Limit indexing to repositories and directories approved for model access. Review ignore rules before enabling live file watching, and avoid indexing broad workspace roots that contain unrelated private projects.

If you use an external graph database, treat it as a secondary copy of source metadata. Review authentication, network access, backups, and retention before using it with proprietary code.

Duplicate Check

No CodeGraphContext/CodeGraphContext entry, codegraphcontext package entry, or matching source URL was found in content/mcp.

#code-analysis#graph#repository#static-analysis#developer-tools

Source citations

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.