Memory

Community
modelcontextprotocol

Knowledge-graph memory for cross-session context.

Official reference server that stores entities, relations, and observations in a local graph. Agents can add and query across sessions without a separate vector DB.

63k46k85/100

What it does

  • Creates entities with a stable name and a free-form type ("person", "project", "decision")
  • Creates directional relations between two entities with a typed edge label
  • Adds free-text observations to any entity and queries the graph by name or relation
  • Retrieves the neighbourhood of an entity so the agent can walk connections rather than scan
  • Soft-deletes entities and relations so a full session can be audited after the fact
  • Pluggable storage: in-memory for tests, JSON-L on disk by default, custom driver via a small interface

Best for

Cross-session agent stateProject fact trackingUser profile memoryStructured long-term context
About Memory

Memory is a MCP server categorised under ai / ml, official, memory, knowledge graph. Official reference server that stores entities, relations, and observations in a local graph. Agents can add and query across sessions without a separate vector DB.

How to install

Pick your MCP client from the Install panel on this page to get a one-click install link (Cursor, VS Code) or a ready-to-paste configuration for Claude Desktop, Claude Code, Gemini, Codex, Windsurf, and other MCP-compatible clients. No local setup required for remote servers.

License

Memory is released under the MIT license. This is a permissive open-source license, so you can freely use, modify, and distribute it — subject to its terms.

No reviews yet

Be the first to leave a review after using this server in production.

README

One of the active reference servers in modelcontextprotocol/servers. Stores a small knowledge graph to a single JSON-L file by default, so cross-session memory survives agent restarts without a database. Fits workflows that need structured long-term state — user profiles, project facts — more than fuzzy semantic recall. What it does: - Creates entities with a stable name and a free-form type ("person", "project", "decision") - Creates directional relations between two entities with a typed edge label - Adds free-text observations to any entity and queries the graph by name or relation - Retrieves the neighbourhood of an entity so the agent can walk connections rather than scan - Soft-deletes entities and relations so a full session can be audited after the fact - Pluggable storage: in-memory for tests, JSON-L on disk by default, custom driver via a small interface Example: Launch alongside a coding agent. As the agent works it adds "authored_by" edges between commits and team members and "touches" edges between commits and files. A week later a new question like "who last edited the auth middleware" resolves as a single neighbourhood query. Setup: No required env vars. MCP_MEMORY_FILE_PATH overrides the default storage location when you want to share the graph across two clients. Transport: stdio only. Notes: No embedding model, so retrieval is exact-match rather than semantic. Pair with an embedding MCP if you need similarity search over free-form notes. The on-disk format is plain JSON-L, so a human can grep or diff it — which is useful for debugging and dangerous for sensitive data. Treat the file as you would a small database: back it up, do not commit it.

Alternatives

Filesystem
file system
Verified

Scoped file access with configurable allow-lists.

officialfilesystemnode
94/10063ktypescript
Filesystem
file system
Verified

Scoped file access with configurable allow-lists.

officialfilesystemnode
94/10063ktypescript
GitHub
version control
Verified

GitHub's own MCP server for issues, PRs, and code search.

officialgithubgit
92/10023kgo
Time
productivity
free

Time-zone math and conversions.

officialtimetimezone
91/10063kpython