memory_graph_mcp
๐ง memory_graph_mcp
An MCP server that gives your AI agent a persistent knowledge graph of your project.
AST dependencies ยท DB-schema links ยท debugging sessions ยท side effects
๐ก Why
When a feature is requested, the agent receives a dependency subgraph, not a list of similar files โ protecting adjacent modules from breaking changes.
graph_query_context("src/api/users.ts")
โโโโโโโโโโโโโโโโโโโ imports โโโโโโโโโโโโโโโโโโโ
โ src/db/users.ts โ โโโโโโโโโโโโโโโ โ src/api/users.ts โ
โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ writes_table
โผ
[table: users] โโโ also touched by 2 other filesInstead of "here are 5 files matching users" the agent learns: changing this file affects two other modules, writes to the users table, and a past debug session recorded a missing await bug here.
๐ Tools
Tool | Purpose |
| file/symbol โ dependency subgraph + adjacent modules + related sessions |
| planned change โ affected nodes, tables, and risk level |
| implicit module effects: table reads/writes, calls |
| record a discussion/debug session with decisions and bugs, linked to files |
| index state: nodes, edges, files, last update time |
๐ฆ Installation
Requires Node.js โฅ 18
git clone git@github.com:FuryCow/memory_graph_mcp.git
cd memory_graph_mcp
npm install
npm run build๐ Connecting
The server communicates over stdio. Set the root of the project you want to index as the working directory (cwd) in your MCP client config โ the index is built from process.cwd() and stored in .memory-graph/graph.db.
Claude Desktop / Cursor
The configuration is identical for both clients; only the config file location differs:
Claude Desktop:
claude_desktop_config.json(menu โ Settings โ Developer โ Edit Config)Cursor:
~/.cursor/mcp.json
{
"mcpServers": {
"memory-graph": {
"command": "node",
"args": ["/absolute/path/to/memory_graph_mcp/dist/src/index.js"],
"cwd": "/absolute/path/to/your/project"
}
}
}๐ก On Windows, escape paths (
C:\\path\\to\\...) or use forward slashes (C:/path/to/...).
๐บ Graph model
Nodes |
|
Edges |
|
The indexer (tree-sitter) extracts imports, function definitions and calls, and database access from SQL strings (SELECT/INSERT/UPDATE/DELETE) and ORM patterns (Prisma, drizzle). A watcher (chokidar) incrementally re-indexes the graph on file changes โ typically under a second.
๐งฐ Stack
Layer | Technology |
Server |
|
Parsing |
|
Storage |
|
Watching |
|
๐ Development
npm run build # tsc
npm test # node --test dist/test/*.test.js
npm run lint # tsc --noEmit๐ License
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/FuryCow/memory_graph_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server