Claude Graph

•
1
•

Builds a local knowledge graph of your codebase for Claude Code, enabling structural queries without sending any code to the cloud.

Claude Graph is an essential local MCP server designed to empower Claude Code with a deep, structural understanding of your codebase without ever exposing your sensitive code to the cloud. It meticulously parses your repository using Tree-sitter, building a detailed knowledge graph of functions, classes, calls, imports, and test-coverage links stored in a local SQLite database. This innovative approach allows Claude Code to answer complex structural queries about your project, such as identifying function callers or understanding impact radii, by issuing a single, efficient MCP tool call. This not only keeps your data secure but also drastically reduces LLM token consumption—demonstrated by benchmarks showing up to 449x token reduction on large codebases like Django—making advanced code analysis feasible even within stringent context window limits.

Key Features

01Local-only code analysis with zero network calls for maximum security and privacy.
02Parses codebases using Tree-sitter to build a structural knowledge graph.
03Provides interactive graph visualization and command-line querying of code relationships.
04Exposes code intelligence to Claude Code via the Model Context Protocol (MCP).
05Stores call graphs, imports, and test-coverage links in a fast, local SQLite database.
060 GitHub stars

Use Cases

01Answering structural questions about a codebase (e.g., function callers/callees, module imports) using Claude Code.
02Significantly reducing token usage for AI code analysis within Claude Code's context window.
03Performing secure, local-only code analysis in sensitive corporate or private environments.