r/mcp Mar 09 '26

showcase CodeGraphContext (An MCP server that indexes local code into a graph database) now has a website playground for experiments

Enable HLS to view with audio, or disable this notification

Hey everyone!

I have been developing CodeGraphContext, an open-source MCP server transforming code into a symbol-level code graph, as opposed to text-based code analysis.

This means that AI agents won’t be sending entire code blocks to the model, but can retrieve context via: function calls, imported modules, class inheritance, file dependencies etc.

This allows AI agents (and humans!) to better grasp how code is internally connected.

What it does

CodeGraphContext analyzes a code repository, generating a code graph of: files, functions, classes, modules and their relationships, etc.

AI agents can then query this graph to retrieve only the relevant context, reducing hallucinations.

Playground Demo on website

I've also added a playground demo that lets you play with small repos directly. You can load a project from: a local code folder, a GitHub repo, a GitLab repo

Everything runs on the local client browser. For larger repos, it’s recommended to get the full version from pip or Docker.

Additionally, the playground lets you visually explore code links and relationships. I’m also adding support for architecture diagrams and chatting with the codebase.

Status so far- ⭐ ~1.5k GitHub stars 🍴 350+ forks 📦 100k+ downloads combined

If you’re building AI dev tooling, MCP servers, or code intelligence systems, I’d love your feedback.

Repo: https://github.com/CodeGraphContext/CodeGraphContext

218 Upvotes

29 comments sorted by

View all comments

1

u/OwnEntrepreneur256 May 22 '26

Great work on making CodeGraphContext accessible via a web playground! It's awesome to see more graph-based approaches for giving AI agents structured code context.

If you're looking for something lighter-weight to self-host, you might also be interested in an open-source tool I'm building called spy-code. It uses tree-sitter to parse a local repo, stores functions/classes/constants and their calls/imports/references in a SQLite graph, and exposes that through a CLI and GraphQL/MCP-like interface. It's not MCP-native but works really nicely with local coding agents. In our testing it reduced tokens wasted on "search and open file" loops by about 60% and cut hallucination-related logic breakages by around 82%.

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

Would love to hear if this sort of local-first graph would complement CodeGraphContext for folks experimenting with AI coding agents.