mnemory MCP
A self-hosted MCP memory server that keeps preferences and decisions across conversations in Claude Code, Cursor and other clients
- 282 ★ on the repository
- Last commit
Extended access
Why this level
- Conversation text goes to the chosen model provider for fact extraction and is stored on disk in `~/.mnemory/`
- By default the server accepts HTTP connections on a local port, and exposing it outside requires an API key or JWT
Install
- Works in
Manual install
uvx mnemoryNeeds OPENAI_API_KEY. The server starts on port 8050.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Conversation text goes to the chosen model provider for fact extraction and is stored on disk in `~/.mnemory/`
- By default the server accepts HTTP connections on a local port, and exposing it outside requires an API key or JWT
This is third-party code. Review the repository files before installing.
What it does
mnemory starts with `uvx mnemory` and listens on `http://localhost:8050/mcp`. Data is stored in `~/.mnemory/`. The server connects to a client over MCP and exposes 16 memory tools, and the same backend is available as a REST API with an OpenAPI spec. A language model with an OpenAI-compatible API takes part when messages are saved. In a single call it extracts individual facts, assigns a type, category and importance, compares them with what is already stored and resolves contradictions. If you first mention a Skoda and later a Tesla, the entry is updated instead of duplicated. Search builds several queries from different angles, runs them in parallel and ranks results with time in mind, so questions like what did I decide last week about the database work. Memory has two tiers: short summaries sit in a vector store while detailed material such as reports and code is stored separately and fetched on demand. Entries have a lifetime: context lasts 7 days, episodes 90. Frequently used ones live longer. A built-in consistency check finds duplicates, contradictions and signs of prompt injection. A web interface with search, a relationship graph and Prometheus metrics ships in the box.
Who it is for. Developers and teams who want to give agents memory about people and projects and keep the data on their own servers.
Good fit when
- The agent forgets your coding conventions every day and you want them kept across sessions
- You want one memory for several clients: Claude Code, Cursor and ChatGPT talking to one server
- Data must not go to external memory clouds, so you run the server yourself in Docker or Kubernetes
- Stale facts should expire on their own and new ones should replace the ones they contradict
- You want memories saved and recalled automatically without extra tool calls, which Claude Code hooks provide
Not a fit when
- You have no key for an OpenAI-compatible API: without it the server cannot extract facts or build vectors
- You need memory with no language model in the chain: the README has no such mode, and other catalog servers work offline
- You need deletion guarantees for a regulator: the author calls deletion best effort and does not promise verified erasure
- A CLAUDE.md or AGENTS.md instructions file in the repository is enough
Example request
Remember that in this project we use pnpm and strict TypeScript, and remind me of these conventions at the start of a new sessionMCP
- Transport
- http
- Authentication
- API key
Environment variables
OPENAI_API_KEYrequired, secret- Key of an OpenAI-compatible API used for fact extraction and embeddings
Limitations
- Fact extraction and vectors need a key for an OpenAI-compatible API, and the server reads `OPENAI_API_KEY` by default. Every save costs a model request.
- Deletion is best effort: ordinary deletion retracts an entry and preserves history, and physical cleanup is a separate operation that does not guarantee erasure.
- Older uv versions on Alpine may fail with `No module named 'mcp.server.fastmcp'`; in that case run `uvx --with "mcp<2" mnemory`.
- A production setup needs Qdrant, S3 or MinIO and key or JWT authentication, while the quick start keeps everything local.
How to disable. Remove the mnemory block from your client's MCP configuration and stop the `uvx mnemory` process. Remove the Claude Code hooks from settings if you connected that integration. Stored memories live in `~/.mnemory/` and can be deleted by hand or from the web interface.
FAQ
How do I connect mnemory to Claude Code?
Run `uvx mnemory` and add a server to the MCP config with type streamable-http, URL `http://localhost:8050/mcp` and the header `X-Agent-Id: claude-code`. After a new conversation memory works with no system prompt changes. Automatic saving through hooks lives in integrations/claude-code.
Do I need a separate database?
Not for the quick start: data is stored in `~/.mnemory/`. For production the project recommends Qdrant for vectors and S3 or MinIO for large materials, with Docker, pip and Kubernetes instructions.
Which clients are supported?
Any MCP client: Claude Code, Claude Desktop, Cursor, Windsurf, Cline, Continue.dev, Codex CLI, ChatGPT and Open WebUI. Dedicated plugins with automatic saving exist for Claude Code, Hermes Agent, Open WebUI, OpenCode and OpenClaw.
How is mnemory different from shodh-memory and yourmemory?
mnemory adds a full REST API to MCP, a web interface with a relationship graph, a consistency check and two-tier storage with materials in S3. It calls a language model to extract facts, whereas shodh-memory by its description works offline without one.
How do I check that memory is not cluttered?
Run the built-in consistency check: three phases look for duplicates, contradictions, low-quality entries and prompt injection attempts. You can run it manually or on a schedule with auto-fix from the web interface.
Discussion
No questions or reviews yet.
Related
MCP serversA self-hosted MCP server for long-term agent memory: structured records, versioned rollback and a visual dashboard
Self-hosted long-term memory for agents: semantic search, a knowledge graph and autonomous consolidation over MCP and a REST API
Agent memory as a graph of linked facts: decisions and errors outlive the session, with no vector database or paid API calls
A long-term memory MCP server for agents: one Rust binary that runs offline and never calls a language model
A long-term memory MCP server for AI agents: facts fade along a forgetting curve and related records are compressed into a summary
A long-term memory MCP server for agents: search, store and correct facts across sessions in the cloud or a local core
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| mnemory (this card) | no | API key | 282 | |
| Shodh-Memory | no | key is optional | 322 | a single Rust binary that works offline and calls no language model, while mnemory extracts facts through a model |
| YourMemory | no | key is optional | 271 | memory with a forgetting curve and summaries, while mnemory focuses on a REST API, a web interface and two-tier storage |
README in short
The page opens with a caveat about deletion and a link to Cognis, the author's cloud workspace. Next come features, a one-command quick start, dashboard screenshots, a table of twelve clients with guides, an explanation of storage, search and lifetimes, and a LoCoMo benchmark comparison with other memory systems.