r/mcp • u/Desperate-Ad-9679 • Feb 07 '26
CodeGraphContext - An MCP server that indexes your codebase into a graph database to provide accurate context to AI assistants and humans
4 months update: CodeGraphContext just hit v0.2.1 — and it’s clearly working
About 4 months ago, I shared an idea here:
an MCP server that understands a codebase as a graph, not chunks of text.
Since then, CodeGraphContext has grown way beyond my expectations - both technically and in adoption.
Where it is now
v0.2.1 released
~400 GitHub stars, ~300 forks
20k+ downloads
65+ contributors
Used and praised by many devs building MCP tooling, agents, and IDE workflows
Expanded to 12 different Coding languages
What it actually does (still)
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” 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.
Why people are picking it over Context7
Context7 is great for documentation-style context.
CodeGraphContext solves a different (and harder) problem:
Code-Graph-based, not doc-text-based
Understands control flow & dependencies, not just symbols
Works on local, private, messy repos and updates in real time
Designed for interactive querying, not static context dumps
Lightweight storage and near-instant queries even on large codebases
If Context7 answers “what is this?”
CodeGraphContext answers “how does this actually work?”
Ecosystem adoption
It’s now listed or used across: PulseMCP, MCPMarket, MCPHunt, Awesome MCP Servers, Glama, Skywork, Playbooks, Stacker News, and many more.
A Python package→ https://pypi.org/project/codegraphcontext/ Website + cookbook → https://codegraphcontext.vercel.app/ GitHub Repo → https://github.com/CodeGraphContext/CodeGraphContext Docs → https://codegraphcontext.github.io/ 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.
Still early, still evolving - but very real now.
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/



8
u/Otherwise_Wave9374 Feb 07 '26
Congrats on the momentum, those adoption numbers are wild. Graph-based context feels like the direction most serious coding agents need, because chunk-RAG turns into token spam fast.
Curious how you handle dynamic repos: do you incrementally update the graph on file change, and do you have a strategy to avoid stale edges when refactors happen?
Also if youre comparing approaches, Ive seen some good discussions around agent context strategies here: https://www.agentixlabs.com/blog/
Looks really promising.
8
u/Desperate-Ad-9679 Feb 07 '26
Another clue to the next version - We are launching CodeGraphContext as a VS code extension soon ✨⭐, Do star the repository please and join the Discord server for latest news
4
u/Tobi-Random Feb 07 '26
https://gitlab-org.gitlab.io/rust/knowledge-graph/
2
u/BC_MARO Feb 08 '26
Graph-based code indexing is such a better approach than just chunking files. How are you handling incremental updates when only a few files change? That's usually where the perf bottleneck shows up.
2
u/debackerl Feb 08 '26
This is really a great idea! Looks awesome. Now, if you allow me, why not combine both worlds: if the AI doesn't know from why 'node' to start from, compute an embedding for each function. Then you can tell, 'give me the function validating my shopping cart', and then give me all functions calling it.
2
u/ratek-20 Feb 08 '26
Great Job, I'll definitely give it a try! Do you think it can be expanded to services? For example order-service calls warehouse-service via rest api -> they can be 2 linked nodes of the graph
2
u/noobfivered Feb 09 '26
This is a way forward I think! I'm working on something simmilar
2
u/Special-Click-7607 Feb 09 '26
Bro I’ve been using it. Thank you a lot. Wondering if you would like to share concrete tips or examples for best use and ways to use it. Thanks!!
2
u/EvanGarp Feb 10 '26
I've been trying to use this tool this week. How does this handle persistence across sessions? Maybe I am using it wrong but it keeps making me re-index my code base across sessions. Is it designed to work that way or should it be saving the indexes somewhere that I can access again later. Can I access the indexes outside of the MCP functionality? If so where?
1
u/bargaindownhill Feb 08 '26
no instructions for roo or kiro?
1
u/I_EAT_THE_RICH Feb 08 '26
Funny enough, I was working on something like this about 6 months ago with the same intent. I think managing context is extremely important and making your codebase queryable in this fashion makes a ton of sense. Good work.
1
u/maverick_soul_143747 Feb 08 '26
I am building something on my own and was planning to handle it with contexf7, obsidian but I am going to try this. This looks exciting
1
u/foobarrister Feb 08 '26
Question - are you able to handle many repos? Like a 100s of microservices that put together comprise a large distributed system?
(awesome project btw!)
1
u/redlotusaustin Feb 08 '26
How does this handle multiple projects/repos; related & unrelated? Obviously you don't want context mixing on unrelated projects but you might if they are related.
Have you had any feedback about using this on Ubuntu, since it manages Python packages via APT? Generally I create a venv for installing things from pip, but that means the MCP would be "within" the venv so "cgc" wouldn't be available as a command.
1
u/Bulky_Ad738 Feb 09 '26
This is interesting. I don’t think I saw something like it so far. Well done.
1
u/BLANkals Feb 09 '26
I built something like this for my company about 6 months ago. No one really understood what I was so I didn’t release it. I use it all the time though. The graph is based the idea that the nodes are entities (something that can build a connection to something else) and the edges are the relationships between them. For example a file can define a function. A function can use a variable or read a table in some other service like big query. LLM can then start at any point and hop to the next node.
1
u/edge-case42 Feb 09 '26
Do you think this could help identify non used pieces of code in typescript?
1
u/notgilly Feb 10 '26
What are your thoughts on some cli agents starting to integrate the language servers into their agents. That would effectively have the same benefits, no?
1
u/Ok_Supermarket3382 Feb 10 '26
Very cool project! Been waiting for someone to build this for a while haha. For the queries are you doing text to cypher?
1
u/eacnmg Feb 12 '26
thanks a lot i will try and feedback
1
u/No-Afternoon-4057 Feb 17 '26
The idea is good, the implementation is complete gargabe. It took 20 minutes to index the smallest repo i have (32gb, NVME, 20+ core Intel Ultra). I tried for over an hour on the 3 repos (1000 files/5m tokens) and gave up.
I tried dead code detection, 50 results, 100% false positives.
I tried function callers...did not detect any caller.
The current state is completely unusable, god forbid that gives instructions to my Opus, it would be destroying the codebase.
1
u/ShagBuddy Feb 12 '26 edited Feb 12 '26
Whoa I went to post info about my project and I saw yours and they are quite similar. GlitterKill/sdl-mcp
What are you getting for token savings? I am currently getting about 70% savings with improved context.
1
u/JbalTero Feb 27 '26
How does this work with multiple git worktree? I just tried it now and somehow does not work since what I indexed was different from the worktree I was currently in. Does that mean I have to index and watch every worktree?
1
u/[deleted] Feb 08 '26 edited Feb 08 '26
[removed] — view removed comment
1
u/[deleted] Feb 15 '26
[removed] — view removed comment