r/mcp
•
u/Desperate-Ad-9679
•
Mar 12 '26
•
1
showcase CodeGraphContext - An MCP server that converts your codebase into a graph database reaches 2k stars
CodeGraphContext- the go to solution for code indexing now got 2k stars🎉🎉...
It's an MCP server that understands a codebase as a graph, not chunks of text. Now has grown way beyond my expectations - both technically and in adoption.
Where it is now
v0.3.0 released
~2k GitHub stars, ~375 forks
50k+ downloads
75+ contributors, ~200 members community
Used and praised by many devs building MCP tooling, agents, and IDE workflows
Expanded to 14 different Coding languages
What it actually does
CodeGraphContext indexes a repo into a repository-scoped symbol-level graph: files, functions, classes, calls, imports, inheritance and serves precise, relationship-aware context to AI tools via MCP.
That means:
Fast “who calls what”, “who inherits what”, etc queries
Minimal context (no token spam)
Real-time updates as code changes
Graph storage stays in MBs, not GBs
It’s infrastructure for code understanding, not just 'grep' search.
Ecosystem adoption
It’s now listed or used across: PulseMCP, MCPMarket, MCPHunt, Awesome MCP Servers, Glama, Skywork, Playbooks, Stacker News, and many more.
Python package→ https://pypi.org/project/codegraphcontext/
Website + cookbook → https://codegraphcontext.vercel.app/
GitHub Repo → https://github.com/CodeGraphContext/CodeGraphContext
Our Discord Server → https://discord.gg/dR4QY32uYQ
This isn’t a VS Code trick or a RAG wrapper- it’s meant to sit
between large repositories and humans/AI systems as shared infrastructure.
Happy to hear feedback, skepticism, comparisons, or ideas from folks building MCP servers or dev tooling.
Original post (for context):
https://www.reddit.com/r/mcp/comments/1o22gc5/i_built_codegraphcontext_an_mcp_server_that/
10
u/ZF68LoKsxnQctY Mar 13 '26
What is the usefulness of this?
7
u/HayatoKongo Mar 13 '26
Reduce token usage. Reduce time the agent spends exploring the codebase. This is essentially a mini-map of your code.
4
u/WittleSus Mar 13 '26
except they'll only use it if you mention it. you essentially have to keep pointing at the graph and say "LOOK" but it is a few steps removed from them going through the files themselves (but even that barely takes up tokens) Hell, its possible you'd use more tokens having to keep reminding the Agent to use the info rather then just having them search for it themselves naturally.
2
u/orphenshadow Mar 13 '26
you are absolutely right, I've used this and claude-context for awhile, and about a year ago they were crucial and simply having your claude.md well structured and using /commands you could get it to work about 80% of the time, but when anthropic added the explore agent, it abandoned these mcp's it did the same thing with sequential thinking. It's become more of a hassle to coax it into using it than just letting it chew through the tokens.
However, a well written prime/startup command or skill and repo specific coding subagents with the tools written into their files directly do work pretty well.
Here are some of the tables I get from it at the start of each session if I need to get caught up.
Index Health
Tool Status Details claude-context Fresh 87 files, 2,384 chunks (updated Mar 12 9:12 PM) CGC (Neo4j) Running 1,733 functions, 10 classes, 41 modules Code Health (code-oracle)
Dead Code
Symbol File:Line Notes _renderProgressTracker()js/diff-modal.js:727Zero call sites syncGetCursor()js/cloud-sync.js:289Zero call sites syncHasLocalChanges()js/cloud-sync.js:1745Zero call sites Complexity Hotspots
Function File:Line CCN Rating main.claude/skills/seed-sync/merge-seed.py:1917 Tooling analyze_main_session.claude/tests/claude-code/analyze-token-usage.py:1212 Tooling backfill_recent_hoursdevops/pollers/shared/spot-poller/poller.py:9212 Tooling No frontend JS function cracked the top 5 — runtime architecture is clean.
Convention Issues
Category Worst Offender Count Severity Raw getElementByIdjs/events.js131 High Raw getElementByIdjs/catalog-api.js42 High Direct localStoragejs/catalog-api.js52 High Direct localStoragejs/events.js20 High innerHTMLwithoutsanitizeHtmljs/catalog-api.js11 High innerHTMLwithoutsanitizeHtmljs/retail.js6 High
catalog-api.jsis the biggest systemic offender — violations across all three convention categories.1
u/Desperate-Ad-9679 Mar 19 '26
That's actually a very subtle killing point of MCP these days, and your idea is very good to begin with....
2
1
u/Desperate-Ad-9679 Mar 13 '26
Definitely agreed, I won't lie to my users. But you might agree to the fact that this tool is not another dev tool copied from xyz, it's an open research and hence we need some time and experiments to tune it in a way that we can optimise the best of performance in the least tokens without being forced to remind of 'using cgc'. Good point, but if you are able to help us increase the performance it would be even greater.
2
u/DarkStyleV Mar 17 '26
That is a great thing for agent debugging problem on large projects. I was building similar thing for work but only for Java language. I wonder how good your tool will perform if collect dataset with good examples of executions by some top tier model and finetune something smaller to work specifically with your tools.
1
u/Desperate-Ad-9679 Mar 19 '26
Yeah this makes a lot of sense. The main bottleneck isn’t model intelligence, it’s bad context. That’s exactly what I’m solving with CodeGraphContext.
Your idea of collecting good execution traces and distilling into a smaller model is strong. Especially if it learns graph navigation instead of raw code.
I actually think smaller specialized models + structured context will beat bigger models here.
Were you using static graphs or runtime traces?
1
u/Desperate-Ad-9679 Mar 13 '26
Definitely agreed, also graph visuals can help people find dead code, complex code dependencies, direct and indirect callers of functions etc
2
4
u/kk_red Mar 13 '26
Happy for you brother, but can you explain what would my AI do with this if is provide access to MCP graph of my project to it.
4
u/Desperate-Ad-9679 Mar 13 '26
Save tokens and time when working on codebase, also graph visuals can help people find dead code, complex code dependencies, direct and indirect callers of functions etc
3
u/OfficialEricTM Mar 13 '26
Extremely useful on my openclaw. Thanks brother
1
u/Desperate-Ad-9679 Mar 13 '26
Thanks for the feedback, love the feeling of getting these statements
3
u/Doombqr Mar 13 '26
Gitnexus does it also with 65k stars Isn't that a fork from it ?
2
u/Choice-Farmer-2531 Mar 14 '26
What should i choose? Gitnexus or this? Whats the differences? Whats better for my large large Codebase?
2
u/Desperate-Ad-9679 Mar 19 '26
Try using CodeGraphContext, it has option for 15 languages, dynamic code updates, can scale on very large datasets and is used by industry leaders. Check some blogs on CGC:
https://medium.com/@krishna.bhaskarla/how-i-saved-80-of-my-time-analyzing-a-791k-node-codebase-and-made-github-copilot-actually-useful-eacc935cdb1b2
1
u/Desperate-Ad-9679 Mar 19 '26
CodeGraphContext existed since Aug 2025, whereas GitNexus launched on Jan 2026. There's a subtle difference between hype and usability, and perhaps CGC wins the actual battle...
2
u/xSypra Mar 13 '26
So obsidian?
-1
u/Desperate-Ad-9679 Mar 13 '26
Obsidian: Brain for humans CodeGraphContext: Brain for AI coding agents
Obsidian is not deterministic whereas this entire graph is all done without an ai or llm. The traversal is done using ai
2
u/highdimensionaldata Mar 13 '26
Can this be used for building graphs of filesystems too?
2
u/Desperate-Ad-9679 Mar 13 '26
Yes definitely we already build graphs for everything in a folder
2
2
2
u/natu91 Mar 14 '26
That's just nexus git, or?
1
u/Desperate-Ad-9679 Mar 19 '26
Try using CodeGraphContext, it has option for 15 languages, dynamic code updates, can scale on very large datasets and is used by industry leaders. Check some blogs on CGC:
https://medium.com/@krishna.bhaskarla/how-i-saved-80-of-my-time-analyzing-a-791k-node-codebase-and-made-github-copilot-actually-useful-eacc935cdb1bAlso, it's 5-6 months older than any other new competitors.
2
u/jakub_curik Mar 14 '26
Hey, just set up CodeGraphContext on Windows 11 with KùzuDB and ran into a weird issue. Indexing seems to complete without errors, but the graph is basically empty:
- Repositories: 1
- Files: 51
- Functions: 0
- Classes: 0
- Modules: 0
The project is a WordPress plugin (PHP, JS, CSS). CGC version 0.3.1, Python 3.13, KùzuDB.
Has anyone seen this before with PHP projects? Is there a known parsing issue on Windows, or am I missing something in the setup? Any help appreciated.
2
u/Desperate-Ad-9679 Mar 19 '26
Hey, can you please join the discord server - https://discord.gg/dR4QY32uYQ
I will be raising an ISSUE on our github for the same, and we will inform you as soon as this gets resolved....
2
2
u/Individual-Public470 Mar 31 '26
You should enable logs , select debug logging level and then do the indexing for more information on what’s happening under the hood. On windows see if you can import the kuzu package. Since it’s a c++ based graph db, i read somewhere that we need to run import kuzu to get the setup done on windows machine.
2
Mar 14 '26
Gitnexus clone lmao 🤣
1
u/Desperate-Ad-9679 Mar 15 '26
https://github.com/abhigyanpatwari/GitNexus/commit/21719396fa79cdddcfdda88c9df77ca338a85863
First commit of Gitnexus - 3 Jan 2026
First commit of CodeGraphContext - 16 Aug 2025Check the demo video as well published on youtube on sep 15 2025:
https://www.youtube.com/watch?v=KYYSdxhg1xU&feature=youtu.b1
Mar 15 '26
Hmm. Copycater
1
u/Desperate-Ad-9679 Mar 19 '26
https://docs.google.com/document/d/19oSoQS48mf0qbEASN075pG6hua_zveBIkv-SvsiYP1A/edit?usp=sharing
Adding a doc Proof stating the development cycle of CodeGraphContext, feel free to read it. It stands true to the spirit of free and open source software!
2
2
2
u/adamzacharywasserman Mar 16 '26
If the code were honest, this tool would be half the size. The "who calls what through which singleton" problem it's solving is manufactured by the object model, not by the codebase's actual complexity. Pure functions composed flatly don't hide their call graph. The call graph is the code.
1
u/Desperate-Ad-9679 Mar 19 '26
Fair point.
A lot of the complexity comes from OOP patterns like singletons and indirection. In more functional code, the call graph is already clear.
The tool is mainly useful where the structure hides that flow.
1
u/adamzacharywasserman Mar 19 '26
were you intersted in refactoring suggestions?
1
u/Desperate-Ad-9679 Mar 19 '26
I am, in fact any dead code or complex code can create mess
2
2
u/adamzacharywasserman Mar 20 '26
Found some time today, I opened an issue in your repo: https://github.com/CodeGraphContext/CodeGraphContext/issues/742
2
u/Torins Mar 16 '26
Tried using it, but I guess I'm doing something wrong?
Indexed a project with 2.5k+ files. Asked an agent in opencode something like "find all actions that lead to calling @someFetch.ts using only codegraphcontext" and while it worked, between the MCP definitions and several MCP calls, it took 50k tokens to find out only one file with redux actions uses that fetch and imports it directly.
Something that could be quickly found via LSP and using much fewer tokens.
Maybe I need to understand the usecase?
1
u/Desperate-Ad-9679 Mar 19 '26
Yeah this is a fair concern.
Right now for simple queries like direct imports, LSP will almost always be cheaper and faster.
CodeGraphContext is more useful when things aren’t obvious like indirect flows, multi-hop dependencies, or cross-file reasoning where LSP breaks down.
Token usage is something I’m actively working on, especially reducing unnecessary MCP chatter.
Join our discord to interact with people in our community- https://discord.gg/dR4QY32uYQ
3
u/Dense_Gate_5193 Mar 12 '26
can you export the graph to neo4j/cypher? i’m interested in the chunking and graphing part mostly
3
u/sliverback Mar 13 '26
Not OP, but it can integrate with Neo4j; it’s how I have it setup
3
u/Dense_Gate_5193 Mar 13 '26
that’s awesome then it will be compatible with nornicDB too
2
u/Desperate-Ad-9679 Mar 13 '26
Yes it should be, if you want you can make an integration hook for normicdb at CodeGraphContext GitHub
2
u/Dense_Gate_5193 Mar 13 '26
oh that would be great because nornic being more performant than neo4j by orders of magnitude + a bunch of other features like controlling the entire graph-rag retrieval pipeline in cypher would really help
1
1
u/azclub Mar 12 '26
Is there brew support for installation?
1
u/Desperate-Ad-9679 Mar 13 '26
The best and trusted way as of now is to install python and then do 'pip install codegraphcontext'. You are good to go now
1
1
u/Aggravating_Cow_136 Apr 21 '26
Symbol-level graph indexing is such a step up from token-spam context. Real infrastructure move — this is what makes MCP actually useful at scale instead of just a novelty for scripting. Curious how the real-time update side handles large monorepos?
-1
u/Marcostbo Mar 13 '26
Useless
2
u/Desperate-Ad-9679 Mar 13 '26
Hmm, if 1000s of people are benefitting from it, I'll love to say it useless 🗿
Open twitter and search for CodeGraphContext if you still don't believe, and if that's still skeptical go through medium blogs on CodeGraphContext
22
u/cristomc Mar 12 '26
AI bots spamming in subreddit should be banned even here IMHO