shaneholloman/mcp-knowledge-graph
Local JSONL knowledge graph for persistent memory across AI sessions via MCP
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
This is a local MCP server that gives AI clients persistent memory without running a separate database service. The repository has a root index.ts and exposes the mcp-knowledge-graph CLI on Node.js 22 or later. Its two declared runtime dependencies are @modelcontextprotocol/sdk and minimist. Claude Code, Claude Desktop, and other MCP-compatible clients use the server through MCP tool calls rather than a database driver.
A tool call selects its storage scope from project detection or an explicit location, then selects the default or named store via context. The selected JSONL file holds a graph of named, typed entities, observations attached to those entities, and relationships between them. A first-line _aim marker identifies the file as a memory store, and writes are refused when the marker is missing. This guards against accidental overwrites; it does not authenticate the file or caller.
Key Capabilities & Differentiators
The ten aim_memory_* tools cover both retrieval and curation. Clients can store entities, add facts, link entities, and remove entities, facts, or links. Retrieval is explicit: aim_memory_search finds records by keyword, aim_memory_get fetches entities by exact name, and aim_memory_read_all returns the selected store in full. This is structured recall, not semantic similarity search or automatic capture of every conversation.
By default, calls target memory.jsonl in the active scope. A context such as work routes calls to a named file such as memory-work.jsonl, which can be created on first use without provisioning a separate database. aim_memory_list_stores reports project and global stores along with the active location, making it the best first check when a conversation appears to have lost its memory.
Trade-offs & Limitations
JSONL is straightforward to inspect and back up, and a project-local store keeps project decisions separate from general memory. The price is a narrower retrieval model: keywords and exact names work well for consistently labeled facts, whereas a vector-backed system is a better fit for recall from paraphrases. Named stores are organizational boundaries, not user permissions, and a synced directory copies files without establishing safe concurrent writes. Validate write behavior before pointing multiple active clients at the same store.
There is no GPU inference workload in the server. Size it by testing with realistic store sizes and access patterns; full-store reads can send more data to the client than a targeted search or lookup. Local storage also does not guarantee end-to-end privacy: retrieved facts can reach the model through the client. The MIT license permits commercial use, but secret handling, client approval policies, and model-side data handling remain deployment decisions.
Hardware & Deployment Guide
Run with Node.js 22 or later and an MCP-compatible client. Configure the client to launch npx -y mcp-knowledge-graph --memory-path /absolute/path/to/memory. That flag sets the global directory; creating an exact .aim directory at the project root enables project-local storage and makes it take precedence by default. The server keeps its files locally and does not need a separate database or model API for storage. The npx launch may still fetch the package if it is not already available, so offline installations should stage it in advance.
Version 1.3.0 renamed the tools to aim_memory_*; 1.3.1 corrected stale names in search and get descriptions; 1.3.2 updated configuration examples and tool references. Pin a tested version when reproducibility matters, and update any tool allowlists or prompt references carried over from pre-1.3 setups.
@modelcontextprotocol/sdk and minimist..aim directory name enables project-local scope, while --memory-path sets the global directory.memory.jsonl; context selects a named file such as memory-work.jsonl._aim marker guards against accidental writes to unrelated JSONL files; it is not an access control.Individual developers who want an MCP client such as Claude Code to recall project decisions, conventions, and named facts across sessions while keeping the files inspectable and under their control.
You need semantic recall over large unstructured corpora, automatic conversation capture, or a shared store with authenticated access and dependable concurrent writes.
Quick Start & Installation
mkdir .aim
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| mcp-knowledge-graph ★ | 885 | — | JavaScript | MIT | Local JSONL knowledge graph for persistent memory across AI sessions via MCP |
| rea | 488.8k | +7.6k | TypeScript | MIT | A local CLI and MCP server for evidence-backed app and binary analysis |
| chrome-devtools-mcp | 60.4k | +760 | TypeScript | Apache-2.0 | Chrome DevTools via MCP and CLI for live browser debugging and performance analy |
| mcp-for-blender | 37.1k | +1.1k | Python | GPL-3.0 | A local MCP bridge for inspecting and editing live Blender scenes with AI |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/shaneholloman/mcp-knowledge-graph.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about mcp-knowledge-graph
How do I connect a client and verify which store it is using?
npx -y mcp-knowledge-graph --memory-path /absolute/path/to/memory. Confirm the effective location with aim_memory_list_stores: a detected project .aim directory takes precedence by default, while location: "global" or location: "project" lets a tool call select the scope explicitly.Does the memory server need a GPU or dedicated inference hardware?
Can we self-host it for commercial use?
When is this a better fit than a vector or shared database-backed memory service?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy