Skip to main content
Glama

๐Ÿง  memory_graph_mcp

An MCP server that gives your AI agent a persistent knowledge graph of your project.

TypeScript MCP Tests License Node

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 files

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

Related MCP server: hive-memory

๐Ÿ›  Tools

Tool

Purpose

graph_query_context

file/symbol โ†’ dependency subgraph + adjacent modules + related sessions

graph_impact_analysis

planned change โ†’ affected nodes, tables, and risk level

graph_get_side_effects

implicit module effects: table reads/writes, calls

graph_record_session

record a discussion/debug session with decisions and bugs, linked to files

graph_stats

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

File, Symbol, Table โ€” journal: Session, Decision, Bug

Edges

imports, calls, contains, reads_table, writes_table

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

@modelcontextprotocol/sdk (stdio)

Parsing

tree-sitter (TypeScript / TSX / JavaScript)

Storage

better-sqlite3 (WAL) in .memory-graph/graph.db

Watching

chokidar (mtime-based incremental re-index)

๐Ÿš€ Development

npm run build   # tsc
npm test        # node --test dist/test/*.test.js
npm run lint    # tsc --noEmit

๐Ÿ“„ License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides AI coding agents with persistent, graph-connected memory across projects, enabling cross-project context retrieval via synaptic connections and hybrid search.
    12
    6
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables persistent, graph-based memory for AI agents, allowing them to store, traverse, and recall relationships between facts, decisions, and context across sessions for efficient reasoning and reduced token usage.
    MIT

Latest Blog Posts

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