MCP Codebase Graph
Turn your project into a smart, searchable map — and give your AI assistant a super-memory!
Crafted by DecentCoders — Building simple tools for smart developers.
🌟 What is this extension?
Usually, when you ask an AI assistant (like Claude, Cursor, or Continue) for help, you have to manually copy and paste your code files into the chat. MCP Codebase Graph stops that hassle. It automatically runs in the background and builds a "map" of how every file, function, and class in your project connects to each other.
It then safely shares this map with your AI using a standard called MCP (Model Context Protocol).
The result? You can just ask your AI questions like:
- "Where is the login function used?"
- "Are there any unused functions I can delete?"
- "Find the code that handles payments."
And the AI will answer instantly, without you needing to paste a single line of code!
🚀 Why will you love it?
1. Works across popular languages
The extension indexes declarations and builds a local code graph for JavaScript, TypeScript, React/JSX/TSX, Python, Go, Rust, Java, C++, C#, Ruby, and PHP.
Language compatibility guide
These ratings describe cross-file reference and dead-code analysis—not whether a file can simply be indexed. The dead-code tool is intentionally conservative: when a language/framework cannot be resolved with enough confidence, it avoids calling code unused.
| Language / framework |
Symbol search & navigation |
Reference / dead-code compatibility |
Best use today |
| JavaScript / TypeScript |
★★★★★ |
★★★★★ |
Search, dependencies, impact analysis, and conservative unused-code review |
| React / JSX / TSX |
★★★★★ |
★★★★★ |
Components, imports, JSX usage, callbacks, and prop handlers |
| Angular |
★★★★☆ |
★★★☆☆ |
TypeScript graphing; component members are protected conservatively when template coverage is uncertain |
| Python |
★★★★☆ |
★★★★☆ |
Functions, classes, relative imports, aliases, and conservative private-helper review |
| Go |
★★★☆☆ |
★★☆☆☆ |
Symbol search and local call relationships; no complete package resolver yet |
| Rust |
★★★☆☆ |
★★☆☆☆ |
Symbol search and local call relationships; no complete crate resolver yet |
| Java |
★★★☆☆ |
★★☆☆☆ |
Symbol search and local call relationships; no complete build/classpath resolver yet |
| C# |
★★★☆☆ |
★★☆☆☆ |
Symbol search and local call relationships; no complete solution/project resolver yet |
| C / C++ |
★★★☆☆ |
★★☆☆☆ |
Symbol search and local call relationships; no include/build resolver yet |
| Ruby / PHP |
★★★☆☆ |
★★☆☆☆ |
Symbol search and local call relationships; dynamic framework patterns are preserved conservatively |
What the stars mean: ★★★★★ is ready for the listed graph features; ★★★☆☆ is useful for navigation and local relationships; ★★☆☆☆ means the extension deliberately avoids strong unused-code claims until its language-specific resolver is available.
2. "Smart" Meaning Search
You don't need to remember the exact name of a function anymore. You can search for the idea. If you search for "user password check", the extension can find VerifyAuthToken() because it understands the meaning of your code using built-in, local AI embeddings.
3. Find "Dead Code" to Delete Safely
Afraid to delete code because you don't know if it's being used somewhere else? Just ask your AI! The extension can mathematically prove if a function is completely ignored by the rest of your app.
4. Git Intelligence (New!)
Need to know who wrote the code or when it was last changed? Ask your AI "Who is the expert on the payment gateway?" or "When was this function last modified?" The extension directly hooks into your local Git history.
5. Zero Setup, Zero Errors
There is nothing to configure. Just install it. It uses pure, crash-proof technology (WebAssembly) that works instantly on Windows, Mac, and Linux without any complex build tools.
6. 100% Private and Free
Your code never leaves your computer. The map of your code is saved right inside your project folder (.vscode/mcp_graph.db). It respects your .gitignore file and completely skips heavy folders like node_modules automatically.
📦 How to Install and Use
Step 1: Install
- Open VS Code.
- Go to the Extensions tab (
Ctrl+Shift+X or Cmd+Shift+X).
- Search for MCP Codebase Graph.
- Click Install.
Step 2: Let it work its magic
- Open your project folder in VS Code.
- Look at the bottom-left corner of your screen. You will see it say
Syncing... and then Base Memory: Ready.
- That’s it! Every time you save a file, it quietly updates the map in the background.
Reindex the entire codebase
Use a full reindex after installing/updating the extension, switching branches, pulling a large change set, or when graph results look stale.
- Open the project folder in VS Code or Cursor (not an individual file).
- Open the Command Palette:
- Windows/Linux:
Ctrl+Shift+P
- macOS:
Cmd+Shift+P
- Run
Decent Coders: Reindex Workspace.
- Wait for the status bar to return to
Base Memory: Ready. You can follow progress in View → Output → Decent Coders - MCP Codebase Graph.
- In an AI agent, call
get_codebase_summary to confirm the indexed file and symbol counts before relying on graph or dead-code results.
A reindex rebuilds the local graph database at .vscode/mcp_graph.db. It respects .gitignore and skips generated/heavy folders such as node_modules, dist, and build.
Step 3: Use the graph with an AI agent
VS Code with GitHub Copilot
- Open the Chat view and select Agent mode (MCP tools are not used in Ask mode).
- Select Configure Tools in the chat input and enable MCP Codebase Graph.
Cursor
- Open Cursor Agent and open its MCP/Tools settings.
- Enable mcp-code-graph if it is disabled.
The extension registers a dedicated local MCP process with the editor and exposes 12 graph tools automatically. Try these prompts with Copilot Agent or Cursor Agent:
"Summarize my codebase."
"Find the code that handles email sending."
"If I change the createUser function, what other files will break?"
"Are there any unused functions in this project that I can delete?"
"Who is the expert on the handleLogin function?"
"Who wrote most of the code in this repository?"
✅ How do I know it's working?
Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) and type:
"Decent Coders: Show Summary & Stats"
A pop-up will appear showing you exactly how many files, functions, and classes it successfully mapped out!
🔧 Troubleshooting
- Nothing is happening: Make sure you opened a Folder in VS Code, not just a single file. The extension needs a whole folder to build a map!
- It ignores my code: The extension automatically reads your
.gitignore file. If a file is ignored by Git, or inside a node_modules or dist folder, it will be skipped.
👨💻 About DecentCoders
DecentCoders is a developer-first group. We believe in building simple, highly effective tools that respect your privacy and make programming more joyful.
Made with care by DecentCoders.
Enjoy writing great code!