Labsco
MCP SERVER

Mnemory

by fpytloun

Self-hosted long-term memory that resolves contradictions instead of stacking them — "I drive a Skoda" followed by "I bought a Tesla" becomes an update, not a second fact.

Agent Memory
Summary
Memory that maintains itself.

The hard part of agent memory is not writing facts down, it is what happens on the hundredth conflicting one. Here deduplication and contradiction resolution happen inside the same LLM call that does extraction, and a scheduled fsck sweeps for the duplicates, contradictions and injected content that got through anyway. Everything runs on your infrastructure, which is the other half of the pitch.

What it is

An MCP memory server you run yourself. Storing a message is a single LLM call that extracts individual facts, classifies each one, and checks them against what is already stored for duplicates and contradictions. Retrieval runs several generated queries in parallel and reranks, with enough temporal awareness to answer "what did I decide last week".

What you get
  • Facts extracted, classified and deduplicated on the way in, with contradictions resolved as updates rather than added as new memories — `add_memory`, `add_memories`
  • Three levels of search: filtered semantic search, an AI search that generates multiple queries and reranks them, and a question that returns a written answer synthesised from the matches — `search_memories`, `find_memories`, `ask_memories`
  • A session-start payload of pinned core memories plus recent context, in one call — `get_core_memories`, `initialize_memory`, `get_recent_memories`
  • Two-tier storage: searchable summaries in the vector store, with full artifacts — reports, code, research — fetched only when needed, including a signed download URL for large ones — `save_artifact`, `get_artifact`, `get_artifact_url`, `list_artifacts`
  • Full editing of what is remembered, not just adding — `update_memory`, `delete_memory`, `delete_all_memories`, `list_memories`, `list_categories`
  • A three-phase consistency checker (fsck) that finds duplicates, contradictions, quality problems and prompt injection, runnable on a schedule with auto-fix
  • Configurable TTL so context expires and frequently accessed memories are reinforced rather than the store growing without bound
  • A built-in management UI with a dashboard, semantic search, full CRUD over memories, a relationship graph and the health-check interface
  • A `/metrics` endpoint in Prometheus format with operation counters and memory gauges, and a Grafana dashboard to go with it
Requirements

An OpenAI-compatible API key for the LLM and embeddings — `OPENAI_API_KEY` is picked up from the environment automatically, and `LLM_API_KEY` overrides it. `uvx mnemory` starts it on `http://localhost:8050/mcp` with data under `~/.mnemory/`; clients connect over streamable-http. A production setup adds Qdrant for vectors and S3 or MinIO for artifacts, with API key or Cognis JWT authentication (`MNEMORY_JWT_PUBLIC_KEY` or `MNEMORY_JWKS_URL`) and `REDIS_URL` for session persistence across instances. Licensed Apache 2.0.

Setup effort

One command plus a key — uvx mnemory, then supply credentials