jalipata-mcp-memory
Provides persistent, multi-tenant knowledge graph memory for MCP-capable AI tools, allowing them to recall and store entities, observations, and relations across sessions with keyword search.
README
jalipata-mcp-memory
Persistent long-term memory for AI tools, over MCP. Give Claude Code, OpenCode, or any MCP-capable client a shared knowledge graph it can read and write across sessions — like Claude's memory, but tool-agnostic.
Features
- Knowledge graph memory — entities, atomic observations, and directed relations (compatible with
@modelcontextprotocol/server-memory). - Model-driven — the model recalls and saves via MCP tools, guided by an injected prompt. No host-specific integration required.
- Multi-tenant — memory is scoped by
namespace(user:alice,user:alice:project:frontend), so users, projects, and agents never mix. - SQLite storage — transactional, WAL mode, zero-setup, single portable file.
- Keyword search — SQLite FTS5 with a substring fallback; no external services.
- Live updates — mutation tools notify subscribed clients via MCP resources.
- Two transports — stdio (default, local) and Streamable HTTP (remote).
Quick start
Wire memory into Claude Code and/or OpenCode with one interactive command:
npx -y @jalipata/mcp-memory init
The wizard asks which tools, where to set it up, the database path, and a memory namespace — then writes the MCP config and injects usage guidance into CLAUDE.md / AGENTS.md. Restart your AI tool and start chatting.
Run it outside a project (e.g. from $HOME)? It detects that and defaults to a user/global setup instead of cluttering your home directory. Re-running is safe — existing files are merged, never overwritten.
What the wizard writes
| Scope | Claude Code | OpenCode |
|---|---|---|
| Project | .mcp.json + CLAUDE.md |
opencode.json + AGENTS.md |
| User / global | ~/.claude.json + ~/.claude/CLAUDE.md |
~/.config/opencode/opencode.json + ~/.config/opencode/AGENTS.md |
For Claude Code, the injected guidance makes the model treat the memory MCP server as its primary long-term memory, instead of Claude's built-in memory.
Running the server
The server is a normal MCP process. stdio is the default transport — most clients spawn it themselves from your MCP config, so you rarely run it directly. HTTP is for remote setups.
stdio (default):
npx -y @jalipata/mcp-memory
HTTP (remote):
MEMORY_TRANSPORT=http MEMORY_HTTP_PORT=3000 npx -y @jalipata/mcp-memory
Web dashboard
Visualize and inspect your memories in the browser — a read-only graph view with entity details, observations, relations, and search:
npx -y @jalipata/mcp-memory serve
Then open http://127.0.0.1:4824. Pick a namespace from the dropdown, click nodes to inspect them, and search across names/types/observations.
| Env var | Description | Default |
|---|---|---|
MEMORY_WEB_HOST |
Host the dashboard binds to | 127.0.0.1 |
MEMORY_WEB_PORT |
Port the dashboard listens on | 4824 |
Environment
| Env var | Description | Default |
|---|---|---|
MEMORY_DB_PATH |
SQLite database file | ~/.jalipata/memory.db |
MEMORY_TRANSPORT |
stdio or http |
stdio |
MEMORY_HTTP_PORT |
Port when transport is http |
3000 |
MEMORY_SERVER_NAME |
Server name advertised over MCP | jalipata-memory |
The web dashboard adds MEMORY_WEB_HOST (127.0.0.1) and MEMORY_WEB_PORT (4824).
Memory is centralized in one database (
~/.jalipata/memory.dbby default). Projects stay isolated through namespaces, not separate files. Set an absoluteMEMORY_DB_PATHin client configs if you move it — the default is resolved from your home directory.
Manual MCP client setup
Skipped the wizard? Add the server to your client's MCP config. On Windows, prefix npx with cmd /c.
Most clients (Claude Code .mcp.json, Claude Desktop claude_desktop_config.json, Cursor .cursor/mcp.json) — mcpServers format:
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@jalipata/mcp-memory"],
"env": { "MEMORY_DB_PATH": "/absolute/path/to/memory.db" }
}
}
}
OpenCode (opencode.json):
{
"mcp": {
"memory": {
"type": "local",
"command": ["npx", "-y", "@jalipata/mcp-memory"],
"enabled": true,
"environment": { "MEMORY_DB_PATH": "/absolute/path/to/memory.db" }
}
}
}
VS Code / Copilot (.vscode/mcp.json) — uses the servers key:
{
"servers": {
"memory": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@jalipata/mcp-memory"],
"env": { "MEMORY_DB_PATH": "/absolute/path/to/memory.db" }
}
}
}
Remote HTTP:
{
"mcpServers": {
"memory": { "url": "http://localhost:3000/mcp" }
}
}
How memory works
Memories form a knowledge graph of entities, atomic observations, and directed relations:
{ "name": "Alfian", "entityType": "person", "observations": ["Prefers TypeScript"] }
{ "from": "Alfian", "to": "jalipata", "relationType": "works_on" }
The guidance injected into CLAUDE.md / AGENTS.md (or the bundled memory-guidance prompt) tells the model to:
- Recall relevant context at the start of a conversation with
search_nodes/open_nodes. - Save durable facts with
create_entities,create_relations, andadd_observations. - Stay clean — atomic observations, reuse existing entities, delete stale memory — always under a consistent
namespace.
MCP tools
All tools accept an optional namespace argument (defaults to default).
| Tool | Description |
|---|---|
create_entities |
Create entities; duplicates by name are ignored |
create_relations |
Create directed relations; missing endpoints are auto-created |
add_observations |
Append atomic facts to entities (fails if entity is missing) |
delete_entities |
Delete entities — cascades to relations & observations |
delete_observations |
Delete specific observations |
delete_relations |
Delete specific relations |
read_graph |
Read the full knowledge graph for a namespace |
search_nodes |
Keyword search over names, types, and observations (FTS5 + LIKE) |
open_nodes |
Retrieve specific nodes plus their connected relations |
list_namespaces |
List all memory namespaces |
MCP resources
memory://namespaces— all known namespaces (JSON)memory://graph/{namespace}— full graph of a namespace (JSON), subscribable
Development
npm run typecheck # tsc --noEmit
npm test # vitest run (unit tests)
npm run dev # tsx watch
Stack: Node.js ≥ 22 · TypeScript · @modelcontextprotocol/sdk · better-sqlite3 · SQLite FTS5 · zod · @clack/prompts
Project layout
src/
├── index.ts # entry point: stdio + HTTP transports + `init`/`serve` dispatch
├── config.ts # env configuration
├── prompts.ts # LLM memory-guidance prompt
├── resources.ts # MCP resources + subscribe notifications
├── db/
│ ├── schema.ts # SQLite DDL + FTS5 triggers
│ ├── connection.ts # better-sqlite3 bootstrap
│ └── knowledgeGraph.ts # namespace-aware CRUD + search
├── cli/
│ ├── config.ts # setup wizard logic (tool targets, scopes, merge)
│ └── init.ts # interactive `init` wizard
├── web/
│ ├── server.ts # web dashboard HTTP server + read-only JSON API
│ └── static/ # frontend (index.html, styles.css, app.js)
└── tools/
└── index.ts # MCP tool registration (zod schemas)
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。