jalipata-mcp-memory
This server is a persistent, multi-tenant knowledge graph memory service for AI tools via MCP. It stores entities, relations, and observations in a SQLite database with transactional support and WAL mode.
Create and Manage Entities: Create entities with names, types, and atomic observations (duplicates are ignored). Add observations to existing entities.
Relations: Establish directed relations between entities, automatically creating missing endpoint entities.
Delete Data: Remove entities (cascading to relations and observations), delete specific observations, and delete specific relations.
Retrieve and Search: Read the entire knowledge graph for a namespace; search nodes by keyword across names, types, and observations (using FTS5 with substring fallback); open specific nodes along with their relations.
Namespace Isolation: All operations accept an optional namespace argument (e.g.,
user:alice) to separate memories per user, project, or agent. List all namespaces.Live Updates: Mutation tools notify subscribed clients via MCP resources for real-time sync.
Persistence and Backend: Uses SQLite for durable storage, supporting multiple transports: stdio (default) for local use and Streamable HTTP for remote access. Configurable database path and server name.
Visualization and Integration: Includes a web dashboard for read-only graph visualization and search. Integrates with MCP-capable AI clients through an interactive init wizard or manual configuration.
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., "@jalipata-mcp-memory Remember that the deploy happens every Friday."
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.
jalipata-mcp-memory
Persistent long-term memory for AI tools, over MCP. Give Claude Code, OpenCode, Cursor, Antigravity, Codex — 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).
Related MCP server: Mnemosyne
Quick start
Wire memory into Claude Code, OpenCode, Cursor, Antigravity, or Codex with one interactive command:
npx -y @jalipata/mcp-memory initThe wizard asks which tools, where to set it up, the database path, and a memory namespace — then writes the MCP config, injects usage guidance, and optionally installs an auto-inject hook/plugin. 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.
Generated configs pin a specific version (@jalipata/mcp-memory@<version>). After publishing a new release, bump the pinned version in all existing configs with one command:
npx -y @jalipata/mcp-memory updateIt scans every configured tool (project + user scope) and rewrites only the pinned version — no interactive prompts.
What the wizard writes
Config and guidance cells show the project path / user-global path. The auto-inject column shows the project path — user scope mirrors it under your home directory.
Tool | Config file | Guidance file | Auto-inject |
Claude Code |
|
|
|
OpenCode |
|
|
|
Cursor |
|
| none — rules auto-applied ( |
Antigravity |
|
|
|
Codex |
|
|
|
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.
Auto-inject memory guidance (hooks / plugin)
File guidance (CLAUDE.md / AGENTS.md / GEMINI.md) is advisory — the model reads it but is free to ignore it. The wizard can go one step further and make the memory guidance automatically injected on every session, so you never have to tell the model to use mcp-memory again:
Claude Code —
SessionStarthook returningadditionalContext(system reminder before the first prompt); disables Claude's built-in auto memory.OpenCode — plugin tapping
experimental.chat.system.transform(guidance appended to the system prompt before every LLM request).Antigravity —
PreInvocationhook emittinginjectSteps[].ephemeralMessagebefore every model call.Codex —
SessionStarthook returningadditionalContext(same contract as Claude) withmatcher: startup|resume.
Pick project, user/global, or both when prompted; existing settings and hooks are merged, never overwritten.
Adding a new AI tool
Integrations are adapters, not scattered patches. The wizard (init.ts) is a single generic loop that only talks to the ToolAdapter contract (src/cli/adapters/types.ts); it contains zero per-tool logic. Adding a tool means two steps:
Create
src/cli/adapters/<tool>.ts— aToolAdapterimplementing:hasExistingConfig— pre-select the tool when its config already declares the memory servertargets(scope, ctx)— resolve config + guidance file paths for project/user/bothautoInject?— anAutoInjectMechanism, orundefinedfor rules-only tools
Register it — one line in
src/cli/adapters/registry.ts(TOOL_ADAPTERS).
Reusable building blocks:
Config formats —
CONFIG_FORMATS(mcpServers/servers/mcp/mcpServersToml) insrc/cli/config.ts. Most tools reusemcpServers; Codex's TOML[mcp_servers.*]shape usesmcpServersToml(serialized by the built-insrc/cli/toml.tsparser). A genuinely new shape needs only a new format entry.Plugin mechanisms —
createFilePluginMechanism(adapters/pluginMechanism.ts) covers any tool that auto-injects guidance by writing a plugin file (OpenCode uses it; a future Cursor extension would too). Supply file paths + a content renderer, get install/uninstall/isInstalled for free.Hook mechanisms —
adapters/hookMechanism.tsprovidescreateSessionStartHookMechanismfor any client whose session-start hook returnsadditionalContext(Claude Code, Codex — matcher/handler-fields/extra-settings per spec) andcreatePreInvocationHookMechanismfor Antigravity'sinjectSteps.Guidance variants —
buildGuidanceBlock(scope, variant)wording is per-target (claudevsgeneric); rule-file formats get YAML frontmatter (e.g. Cursor.mdcalwaysApply: true).
Cursor ships as a reference adapter: it reuses the mcpServers format and .cursor/rules/memory.mdc with alwaysApply: true, so it needs no auto-inject mechanism at all.
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-memoryHTTP (remote):
MEMORY_TRANSPORT=http MEMORY_HTTP_PORT=3000 npx -y @jalipata/mcp-memoryWeb 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 serveThen open http://127.0.0.1:4824 (default). Pick a namespace from the dropdown, click nodes to inspect them, and search across names/types/observations.
Environment
Env var | Description | Default |
| SQLite database file |
|
|
|
|
| Port when transport is |
|
| Host the web dashboard binds to |
|
| Port the web dashboard listens on |
|
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, Antigravity .agents/mcp_config.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" }
}
}
}Codex (.codex/config.toml or ~/.codex/config.toml) — TOML:
[mcp_servers.memory]
command = "npx"
args = ["-y", "@jalipata/mcp-memory"]
env = { 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 / GEMINI.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; duplicates by name are ignored |
| Create directed relations; missing endpoints are auto-created |
| Append atomic facts to entities (fails if entity is missing) |
| Delete entities — cascades to relations & observations |
| Delete specific observations |
| Delete specific relations |
| Read the full knowledge graph for a namespace |
| Keyword search over names, types, and observations (FTS5 + LIKE) |
| Retrieve specific nodes plus their connected relations |
| 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 watchStack: 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 # format registry (mcpServers/servers/mcp/mcpServersToml), merge/write engine, guidance
│ ├── toml.ts # minimal TOML parser/serializer (Codex config.toml)
│ ├── init.ts # interactive `init` wizard — one generic loop, no per-tool logic
│ ├── plan.ts # pure planner: selection + scope → targets & mechanism installs
│ ├── hooks.ts # Claude Code hook file layout + script renderer
│ └── adapters/ # pluggable AI-tool integrations
│ ├── types.ts # ToolAdapter / AutoInjectMechanism / WizardContext contracts
│ ├── registry.ts # static registry (TOOL_ADAPTERS) — the only wiring point
│ ├── pluginMechanism.ts # generic "write a plugin file" mechanism factory
│ ├── hookMechanism.ts # generic SessionStart (additionalContext) + PreInvocation (injectSteps) hooks
│ ├── claudeCode.ts # Claude Code adapter (SessionStart hook + auto memory disable)
│ ├── opencode.ts # OpenCode adapter (system-transform plugin mechanism)
│ ├── cursor.ts # Cursor adapter (rules-only, reuses mcpServers format)
│ ├── antigravity.ts # Antigravity adapter (PreInvocation hook, mcp_config.json)
│ └── codex.ts # Codex adapter (SessionStart hook, TOML config)
├── 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
Available Tools
10 toolsadd_observationsAdd ObservationsA
Add new observations (atomic facts) to existing entities in the knowledge graph. Fails if an entity does not exist.
Inputs: observations (required), namespace. Returns: results, namespace
create_entitiesCreate EntitiesA
Create multiple new entities in the knowledge graph. Entities with an existing name are ignored.
Inputs: entities (required), namespace. Returns: entities, namespace
create_relationsCreate RelationsA
Create multiple new relations between entities. Relations should be in active voice. Missing endpoint entities are created automatically.
Inputs: relations (required), namespace. Returns: namespace, relations
delete_entitiesDelete EntitiesADestructiveIdempotent
Delete entities and their associated relations and observations from the knowledge graph (cascading). Silent if an entity does not exist.
Inputs: entityNames (required), namespace. Returns: message, success
delete_observationsDelete ObservationsADestructiveIdempotent
Delete specific observations from entities in the knowledge graph. Silent if an observation does not exist.
Inputs: deletions (required), namespace. Returns: message, success
delete_relationsDelete RelationsADestructiveIdempotent
Delete specific relations from the knowledge graph. Silent if a relation does not exist.
Inputs: relations (required), namespace. Returns: message, success
list_namespacesList NamespacesARead-onlyIdempotent
List all memory namespaces (scopes) stored in this server.
Inputs: no named parameters. Returns: namespaces
open_nodesOpen NodesARead-onlyIdempotent
Retrieve specific nodes by name, along with relations connected to them. Silently skips non-existent nodes.
Inputs: names (required), namespace. Returns: entities, namespace, relations
read_graphRead GraphARead-onlyIdempotent
Read the entire knowledge graph for a namespace, including all entities and relations.
Inputs: namespace. Returns: entities, namespace, relations
search_nodesSearch NodesARead-onlyIdempotent
Keyword search for nodes in the knowledge graph by entity names, entity types, and observation content. Returns matching entities and their connected relations.
Inputs: query (required), namespace. Returns: entities, namespace, relations
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct operation: creating entities, creating relations, adding observations, and deleting each of those, plus distinct retrieval methods (read graph, search, open by name) and namespace listing. No two tools have overlapping purposes.
All tool names follow a consistent verb_noun snake_case pattern (create_entities, delete_relations, open_nodes, etc.). The only slight variation is 'add_observations' versus 'create_*', but 'add' is still a clear active verb in the same style.
With 10 tools, the server is well-scoped for a knowledge graph memory system. Each tool covers a essential operation without redundancy, and the count is within the ideal range for a focused server.
The surface covers the full CRUD lifecycle for entities, relations, and observations, plus retrieval and namespace listing. Minor gaps exist such as no update/rename operation for entities or relations, but these are not critical for typical memory graph workflows.
Maintenance
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Hosted agent memory: store, search, and recall facts across sessions from any MCP client.
Hosted memory for AI agents over MCP. One memory shared by all your agents.
Personal knowledge graph as an AI memory layer over MCP - read, save, and link your memories.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides AI agents with persistent knowledge storage, enabling them to store, search, and retrieve text, documents, and files using semantic and keyword search via MCP tools.34Apache 2.0
- AlicenseAqualityBmaintenanceProvides persistent, graph-based memory for AI agents via MCP, enabling semantic search, wikilink traversal, reminders, and injection protection.934Apache 2.0
- FlicenseNot gradedqualityCmaintenanceEnables AI coding agents and IDEs to capture conversations, extract structured knowledge into a queryable graph database, and recall past decisions, patterns, files, and errors across all projects and workspaces. Provides persistent memory tools for saving, searching, and cleaning up knowledge via MCP.2-
- AlicenseNot gradedqualityBmaintenanceProvides a self-hosted shared memory service that lets AI agents capture and recall durable facts, decisions, and context across multiple tools and MCP-capable clients.3MIT