A persistent, graph-connected memory engine for AI coding agents that never forgets your codebase design decisions.
Stop wasting millions of tokens re-explaining architecture. GraphMemory parses codebase ASTs into local SQLite graph memory and connects to Claude Desktop, Cursor, and Ollama.
Quickstart · Features · Architecture · MCP Tools
Standard Vector RAG (Retrieval-Augmented Generation) fails at understanding global codebase architecture (e.g. "how does authentication middleware connect to Stripe payment webhooks?").
GraphMemory is a local-first, zero-latency graph database and Model Context Protocol (MCP) server. It parses code symbols (functions, classes, endpoints, schemas) into relationship nodes and edges stored in lightweight SQLite, giving AI agents permanent long-term context.
- 🧠 AST Code Symbol Mapping: Extracts functions, classes, interfaces, webhooks, and database models into connected graph nodes.
- ⚡ Zero-Latency Local Graph Traversal: 100x faster than cloud vector databases using local SQLite index queries (
< 15ms). - 🔌 Native MCP Server: Ships with standard Model Context Protocol tools (
graph_search_nodes,graph_get_neighbors,graph_remember_decision) ready for Claude Desktop and Cursor. - 🎨 Interactive 2D Graph Inspector: Visual canvas view displaying node relationships, code snippets, and dependency paths.
- 🛡️ Persistent Architectural Memory: Record immutable design choices and rules (e.g. "Validate Stripe webhook signature before calling auth middleware") that agents respect across sessions.
graph TD
A["💻 Local Codebase Files"] --> B["⚡ AST Symbol Extractor (codeParser)"]
B --> C["📦 Local SQLite Graph Database"]
C --> D1["🧠 Persistent Graph Memory Engine"]
D1 --> E1["🎨 Interactive 2D Graph Inspector"]
D1 --> E2["🔌 Model Context Protocol (MCP) Server"]
E2 --> F1["🤖 Claude Desktop (claude_desktop_config.json)"]
E2 --> F2["💻 Cursor (.mcp.json)"]
E2 --> F3["🦙 Ollama Local Agents"]
npx graphmemory# Clone repository
git clone https://github.com/Nithinfgs/graphmemory.git
cd graphmemory
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:3002 in your browser.
Add to your claude_desktop_config.json:
{
"mcpServers": {
"graphmemory": {
"command": "npx",
"args": ["-y", "graphmemory", "mcp"]
}
}
}graph_search_nodes: Search entity nodes by query or symbol type.graph_get_neighbors: Traverse N-hop relationship neighborhoods.graph_index_codebase: Index codebase code snippets into AST graph tables.graph_remember_decision: Store persistent architectural design decisions.
Distributed under the MIT License. See LICENSE for details.