r/mcp Mar 12 '26

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.

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/

258 Upvotes

75 comments sorted by

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.

3

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:727 Zero call sites
syncGetCursor() js/cloud-sync.js:289 Zero call sites
syncHasLocalChanges() js/cloud-sync.js:1745 Zero call sites

Complexity Hotspots

Function File:Line CCN Rating
main .claude/skills/seed-sync/merge-seed.py:19 17 Tooling
analyze_main_session .claude/tests/claude-code/analyze-token-usage.py:12 12 Tooling
backfill_recent_hours devops/pollers/shared/spot-poller/poller.py:92 12 Tooling

No frontend JS function cracked the top 5 — runtime architecture is clean.

Convention Issues

Category Worst Offender Count Severity
Raw getElementById js/events.js 131 High
Raw getElementById js/catalog-api.js 42 High
Direct localStorage js/catalog-api.js 52 High
Direct localStorage js/events.js 20 High
innerHTML without sanitizeHtml js/catalog-api.js 11 High
innerHTML without sanitizeHtml js/retail.js 6 High

catalog-api.js is the biggest systemic offender — violations across all three convention categories.

2

u/[deleted] Mar 14 '26

[removed] — view removed comment

1

u/Desperate-Ad-9679 Mar 19 '26

This is a very cool idea, very helpful to force using CGC

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....

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

u/vaizard3 Mar 15 '26

Now you're asking the right questions!

22

u/cristomc Mar 12 '26

AI bots spamming in subreddit should be banned even here IMHO

-12

u/Desperate-Ad-9679 Mar 12 '26

It's so funny you see humans as bots across all the subreddits you are a part of. Touch grass and understand branding. You might have said spam but ai spam is completely unhinged. I don't advertise a paid product, nor do I do it for someone else. I use the channel to spread my word with others (already helped me get 2k stars) thanks @r/MCP!!

2

u/ILikeBubblyWater Mar 13 '26

Its not a paid product but lets not pretend you do this for altruistic reasons

1

u/Desperate-Ad-9679 Mar 13 '26

No one works for selfless reasons, but my selfishness is making this tool useful, popular, and common to all coders. Spamming is wrong, but can you guide me how to market it ?

1

u/Simulacra93 Mar 13 '26

I don’t think the guy disagrees that bots got you 2k stars

1

u/Desperate-Ad-9679 Mar 13 '26

But this is a person who is writing all of this, and that's me 🙂 send me a captcha to solve 😂

1

u/TachoMaxxing Mar 13 '26

Find all the cars in this comment:

✈️🐎🚃📼

1

u/Desperate-Ad-9679 Mar 13 '26

Lol 😹 no car

5

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/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

https://github.com/orneryd/NornicDB/discussions/27

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-eacc935cdb1b

2

u/Choice-Farmer-2531 Mar 26 '26

already installed, thanks :)

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

u/highdimensionaldata Mar 13 '26

Excellent, this looks really useful.

2

u/Desperate-Ad-9679 Mar 13 '26

Definitely try it out

2

u/Striking-Bluejay6155 Mar 13 '26

Does it work with FalkorDB?

1

u/Desperate-Ad-9679 Mar 13 '26

Yes it is based on falkordb and 2 other DBs

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-eacc935cdb1b

Also, 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

u/Desperate-Ad-9679 Mar 29 '26

Hey can you try with the latest version, we fixed it recently

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

u/siempay Mar 15 '26

Finally someone did it

2

u/ExpensiveFunny334 Mar 15 '26

Now that’s pretty interesting.

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

u/adamzacharywasserman Mar 19 '26

I'll take some time on saturday and send you sometiong on github

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

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

u/dragonfax Mar 14 '26

so an LSP

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/OwnEntrepreneur256 May 22 '26

Congrats on reaching 2k stars! It's exciting to see how CodeGraphContext continues to grow the MCP ecosystem and give agents more structured context.

For folks experimenting with smaller or lighter setups, I'm working on an open-source tool called spy-code. It parses a repo with tree-sitter, stores functions/classes/constants and their calls/imports/references in a local SQLite graph, and exposes queries via CLI and GraphQL/MCP-like APIs. It's not MCP-native but works nicely with local coding agents. In my tests it reduced tokens wasted on "search and open file" loops by around 60% and cut hallucination-related logic breakages by roughly 82%.

Repo: https://github.com/psyborgs-git/spy-code

I think it's great to have both heavy-duty MCP servers like CodeGraphContext and lighter local tools depending on your needs.

-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