Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🧠 GraphMemory (LocalRAG)

Zero-Latency Graph Memory Engine for AI Agents & MCP Server

A persistent, graph-connected memory engine for AI coding agents that never forgets your codebase design decisions.

License: MIT Vite React MCP Standard PRs Welcome

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


🌟 Overview

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.


✨ Key Features

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

🏗️ Architecture

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"]
Loading

🚀 Quickstart

Option 1: Run via npx

npx graphmemory

Option 2: Clone & Run Locally

# Clone repository
git clone https://github.com/Nithinfgs/graphmemory.git
cd graphmemory

# Install dependencies
npm install

# Start development server
npm run dev

Open http://localhost:3002 in your browser.


🔌 Model Context Protocol (MCP) Tools

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "graphmemory": {
      "command": "npx",
      "args": ["-y", "graphmemory", "mcp"]
    }
  }
}

Supported MCP Tools:

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

📄 License

Distributed under the MIT License. See LICENSE for details.

Maintained by @Nithinfgs and the Graph RAG Open Source Community.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages