I've been using Claude Code for quite some time now, and one thing I noticed while working on larger projects was that a lot of time was spent rediscovering the repository. Even though Claude is excellent at reasoning, it still has to search through files repeatedly to understand how everything connects.
Recently, I came across Codebase Memory MCP, and after using it on one of my larger projects, I can confidently say it has improved the way Claude understands my codebase.
This isn't a sponsored post—just me sharing what I learned while setting it up and how it's been working so far.
What is Codebase Memory MCP?
Codebase Memory MCP is an MCP (Model Context Protocol) server that indexes your repository into a knowledge graph.
Instead of treating your project as a collection of unrelated files, it builds relationships between:
- Functions
- Classes
- Methods
- Files
- Modules
- Routes
- Imports
- Function calls
- Dependencies
Once the repository is indexed, Claude can query this graph instead of repeatedly searching through the project from scratch.
One of the nicest parts is that it also provides an interactive graph visualization.
When I indexed one of my repositories, it generated a graph with more than 2,000 nodes and 4,300+ relationships, which was fascinating to explore.
Why I Decided to Try It
I work on projects that aren't tiny anymore.
Once a repository grows, I often ask questions like:
- Where is this endpoint implemented?
- What depends on this service?
- Which modules use this function?
- How does this feature actually work end-to-end?
Claude usually finds the answer, but it spends time searching the repository every time.
I wanted something that would let Claude build a persistent understanding of the project instead of rediscovering it repeatedly.
That's exactly what Codebase Memory is designed to do.
Installing It
Installation was surprisingly straightforward.
I used the official installer:
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash -s -- --ui
Or, if you've already downloaded it:
codebase-memory-mcp install
The installer automatically:
- installs the binary
- configures Claude Code
- installs the required hooks
- creates the MCP configuration
- enables the Graph UI
There wasn't much manual work involved.
Verify the Installation
To make sure everything was installed correctly:
codebase-memory-mcp --version
Mine returned:
codebase-memory-mcp 0.9.0
So far, so good.
Connecting It to Claude Code Desktop
This was the part that confused me initially.
The installer creates a configuration file:
~/.claude/.mcp.json
Mine looks like this:
{
"mcpServers": {
"codebase-memory-mcp": {
"command": "/Users/shoaib/.local/bin/codebase-memory-mcp"
}
}
}
If your file looks similar, Claude Code is already configured to use Codebase Memory.
No manual editing was needed.
The One Thing That Confused Me
After installing everything, I opened Claude Desktop and went to:
Settings → Local MCP Servers
It showed:
No servers added
I assumed something had gone wrong.
After digging into the documentation and verifying the installation, I realized that this page is not what Claude Code uses.
Codebase Memory is configured through:
~/.claude/.mcp.json
The "Local MCP Servers" section inside Claude Desktop is meant for manually adding MCP servers for desktop chat workflows, so it's completely normal for it to remain empty even when Codebase Memory is working with Claude Code.
That little detail probably saved me an hour of confusion, so I thought it was worth mentioning.
Restart Claude Desktop
After the installation finishes:
- Quit Claude Desktop completely.
- Open it again.
- Open your project in Claude Code.
That's it.
From there, Claude automatically starts using the configured MCP server.
Building the Code Graph
Once my project was open, I asked Claude to index the repository.
After the first indexing pass, it built the graph database that powers future lookups.
The initial indexing naturally takes a little while depending on the size of the repository, but after that the graph is reused, so Claude doesn't have to rediscover everything every time.
The Graph Visualization
This ended up being one of my favorite features.
Opening the Graph UI gives you a visual representation of your entire project.
Being able to actually see:
- clusters of related modules
- heavily connected services
- isolated components
- dependency relationships
made it much easier to understand the overall architecture.
It's one of those features you don't realize you'll use until you have it.
Questions I've Been Asking Claude
Since adding Codebase Memory, I've been using prompts like:
Explain the authentication flow.
Trace the lifecycle of this API request.
Which modules depend on this service?
Find every place Stripe is used.
Show me the dependency chain for the payment module.
Explain this feature across the entire repository.
These kinds of architectural questions feel much smoother because Claude has access to the repository graph instead of relying entirely on repeated file searches.
Has It Made a Difference?
From my experience, yes.
The biggest improvements I've noticed are:
- Faster architectural explanations
- Better cross-file reasoning
- Less repetitive searching
- Easier navigation through large repositories
- A much better understanding of how everything connects
It's not that Claude suddenly becomes a different assistant, it already does a great job. What Codebase Memory adds is persistent structural context, which becomes increasingly valuable as your codebase grows.
Final Thoughts
If you're already using Claude Code and regularly work on medium or large repositories, I think Codebase Memory MCP is worth trying.
The installation was straightforward, the graph visualization is genuinely useful, and it gives Claude a much stronger understanding of the project structure.
One thing I'd recommend is not skipping the documentation if something looks odd—like the "No Local MCP Servers" screen. In my case, everything was actually configured correctly; I was just looking in the wrong place.
Overall, it's been a nice addition to my workflow, and I'll definitely keep using it on larger projects.
Resources
- Codebase Memory MCP: https://github.com/DeusData/codebase-memory-mcp
- Claude Code: https://www.anthropic.com/claude-code
Have you tried Codebase Memory or any other MCP servers with Claude Code? I'm always interested in seeing how other developers are improving their AI-assisted workflows.


Top comments (0)