mcp-engram
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-engramsearch for nodes related to declarative memory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Engram — Cognitive Knowledge Graph
A Model Context Protocol (MCP) server for building and exploring a cognitive neuroscience-inspired knowledge graph. Models thought, emotion, reasoning, and episodic memory after the structure of the human mind. Backed by SQLite — zero infrastructure, single file on disk, works offline.
Quick Start
npx mcp-engramOr install globally:
npm install -g mcp-engram
mcp-engramThe server stores its database at ~/.mcp-engram/knowledge.db by default. No external services required.
Related MCP server: alaya
Architecture
How It Works
The MCP server exposes 8 tools that let an LLM build, search, and traverse a knowledge graph:
Tool | Purpose |
| Full-text search across all nodes (FTS5) |
| Weighted graph traversal around given nodes |
| Create or merge-update nodes of any type |
| Create edges with context, weight, and confidence |
| Record provenance (Source nodes + DERIVED_FROM links) |
| Follow chronological chains (NEXT, BEFORE, CAUSES) |
| Build structured multi-step reasoning |
| Retrieve reasoning chains by name or topic |
Every tool declares an input schema (validated), an output schema, and behavior
annotations (read-only vs. write), and returns machine-readable
structuredContent alongside a JSON text block. Writes merge: re-creating
an existing node or edge updates the fields you provide and preserves the ones
you don't.
The server also exposes MCP prompts — a system prompt with the overall
tool-usage workflow, plus per-tool usage guidance under each tool's name.
Node Types (15)
Entity, Event, Concept, Attribute, Proposition, Emotion, Agent, ScientificInsight, Law, Location, Thought, ReasoningChain, ReasoningStep, Source, EmotionalEvent
Storage
SQLite with WAL mode for concurrent reads
FTS5 virtual table for full-text search with BM25 ranking
Recursive CTEs for graph traversal
Single
nodestable for all types,edgestable with UNIQUE constraint, plusaliasesandobservationstablesComplex objects stored as JSON in a
propertiescolumn
Installation
Prerequisites
Node.js v18+
A C/C++ toolchain for compiling the
better-sqlite3native module:Mac: Xcode Command Line Tools (
xcode-select --install)Linux:
build-essential(apt install build-essential)Windows: Visual Studio Build Tools
From npm
npx mcp-engramFrom source
npm install
npx nx build mcp-engram
node dist/servers/mcp-engram/main.jsEnvironment Variables
Variable | Required | Default | Description |
| No |
| Path to the SQLite database file |
Integrating with Claude Desktop
Add the server to your Claude Desktop config:
Open your config file:
Mac:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Add the server configuration:
{
"mcpServers": {
"mcp-engram": {
"command": "npx",
"args": ["mcp-engram"]
}
}
}Restart Claude Desktop.
Project Structure
servers/mcp-engram/ # MCP server (TypeScript, ESM)
src/main/ # Server bootstrap, tool handlers, prompts
src/storage/ # SQLite backend, FTS, schema, validation
src/types/ # TypeScript interfaces and enums
libs/graphrag-memory/ # Shared type library (Entity, Relation, etc.)Development
# Build all projects
npx nx run-many -t build
# Test all projects
npx nx run-many -t test
# Lint
npx nx lint mcp-engram
# Build specific project
npx nx build mcp-engram
npx nx build graphrag-memoryLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Shared long-term memory for AI agents: save and recall context as a searchable knowledge graph.
- ContextaOAuthcc.contexta
Persistent memory and knowledge graph for AI assistants — keyword + vector + graph search.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with persistent, searchable memory using a knowledge graph stored in SQLite. Features semantic search, temporal awareness, and workflow-aware prompts for development projects.10 npmMIT
- AlicenseNot gradedqualityCmaintenanceA local memory engine for AI agents. Stores conversation episodes, consolidates knowledge through a neuroscience-inspired lifecycle, and builds a personal knowledge graph — all in a local SQLite database.15MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to persist and retrieve structured thinking graphs using SQLite-backed memory with support for CRUD operations, graph search, and path finding.1-
- AlicenseAqualityAmaintenancePersistent, local-first graph memory for AI coding agents. Provides durable cross-session memory via a local SQLite knowledge graph with typed relationships.61MIT