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: thoughtgraph-mcp
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.
Persistent working memory for AI agents: a knowledge graph with semantic search and decay.
- GoMindOAuthcom.gominddb
Persistent knowledge graph for AI agents. Remember, recall, and forget facts.
Shared long-term memory for AI agents: save and recall context as a searchable knowledge graph.
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.3 npmMIT
- 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-
- AlicenseNot gradedqualityCmaintenanceEnables LLM agents to maintain structured long-term memory and knowledge using SQLite, with graph storage and relational query tools for persistent context.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to store, query, and trace a time-aware memory graph of nodes and edges in a single SQLite file, supporting weighted recall, temporal queries, and provenance-aware writes over MCP.8 npm1MIT