Keymem logo

Keymem

by donggyun112

Associative key-graph memory for MCP agents, supporting multi-hop recall, durable memory, corrections, and local or OpenAI embeddings.

Install Keymem

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "donggyun112-keymem": {
      "command": "npx",
      "args": [
        "-y",
        "keymem"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

donggyun112/keymem is a local MCP server that stores agent memories in an associative key graph rather than relying only on vector similarity. Its tools let agents recall related facts, traverse key-to-memory connections, save durable information, confirm current facts, correct outdated records, and remove incorrect memories. Reach for it when an agent needs project, user, or topic memory that can be explored through connected concepts, including cross-lingual keys and namespace-specific stores. It runs as a CLI over stdio and supports OpenAI embeddings or local embedding models.

Use cases

  • Recall user preferences across conversations
  • Traverse project facts through related concepts
  • Save durable decisions and goals
  • Correct outdated profile or project information
  • Separate memories by namespace

Key features

  • Associative key-graph recall
  • Key-to-memory-to-key traversal
  • Namespace-scoped durable memory
  • Memory confirmation and correction controls
  • OpenAI or local embedding backends
  • Batch memory saving

Tools10

What Keymem lets your agent do. Expand a tool for its parameters.

Verified live~2.4k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

19/19 checks healthy over the last 79d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · keymem (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3Stargazers on the source repository.
npm downloads1.8kPackage downloads in the last 30 days.
Last commit5d agoMost recent push to the default branch.
Tools exposed10Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Keymem works

What donggyun112/keymem does

donggyun112/keymem gives MCP-compatible agents a persistent memory layer organized around concepts and their relationships. Memories occupy a value space, while short concept keys form a separate key space. One memory can be reachable through several keys, and one key can lead to many memories. This structure allows an agent to move through associations such as Newton → apple → fruit → strawberry, even when the starting query and final fact are not embedding-neighbors.

Memory is grouped by namespace, allowing separate project or context scopes. Keys can have aliases, related memories can be explicitly linked, and saved entries can carry expiry or confirmation-freshness policies. Provenance is attached to saved memories, along with server-session metadata and host transcript details when available.

How it works

The normal exploration pattern is Key → Memory → Key. recall searches for relevant key clusters and returns one passive top-ranked memory under the strongest key. If that memory does not contain everything needed, the agent can use read_key to rank memories under a connected concept, then call read_memory for the selected entry. The memory response includes connected key clusters so the agent can continue the walk deliberately.

Only the first memory is inserted automatically by recall. Later branches are loaded through explicit calls, which limits unnecessary context growth. Reading a memory records access and reinforces only the key-to-memory edge used for that traversal. Reading does not establish that the content is still current; confirm_memory requires present evidence such as a user assertion, an authoritative source, or direct observation.

Agents should recall before answering and before changing topics, then save newly revealed durable facts before the turn ends. remember_batch handles several facts more efficiently than separate save calls. Concept keys should be short, atomic terms, and related language forms can be registered together.

Setup and configuration

Run the server with npx -y keymem, or install the CLI globally with npm i -g keymem. It is intended to run as an MCP server rather than as an application dependency. The default process starts a stdio server that an MCP client can spawn.

OpenAI embeddings use OPENAI_API_KEY. For a local setup, set EMBEDDING_BACKEND=local; LOCAL_EMBEDDING_MODEL=bge-m3 is the recommended multilingual option and downloads roughly 570 MB on first use. Omitting the model selects the lighter fast-multilingual-e5-large default. Reranking is enabled in the normal recall path; set KEYMEM_RERANK=false to disable it.

Claude Desktop can launch the server through an mcpServers entry. Claude Code and Codex can use their MCP commands, while the repository plugin also supplies a daemon-backed shim, prompt hook, and memory-use skill. Codex should use the keymem-shim entry point for the plugin push path and explicitly forward environment overrides.

Tools and capabilities

  • recall finds relevant key clusters and a passive top-ranked memory.
  • browse_keys lists active namespace vocabulary and hub keys.
  • read_key ranks memory handles under a concept without returning their content.
  • read_memory loads a selected memory and its connected keys.
  • remember and remember_batch save durable facts with keys, namespaces, links, expiry, and freshness policies.
  • confirm_memory, correct, dismiss, and forget manage validity, changed facts, misplaced links, and permanent deletion.

correct preserves an older version while weakening it. forget is reserved for information that is completely wrong, while dismiss lowers a wrong key-to-memory association without deleting the fact.

Limitations and notes

The graph is navigated intentionally: recall does not expand every connected branch automatically. Scores are meaningful within the ranking produced for a single key or query, rather than as universal values across all searches. Local embedding and reranking models download on first use and may add startup or prompt latency. A recalled or read memory can be aging or stale, so currentness must be checked before presenting it as current.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Keymem

donggyun112/keymem is an MCP server that connects agents to a local associative key-graph memory store. Its main tools include recall, browse_keys, read_key, read_memory, remember, remember_batch, confirm_memory, correct, dismiss, and forget for finding, traversing, saving, and maintaining durable facts.

Install it by running `npx -y keymem` from an MCP client configuration, or install the CLI globally with `npm i -g keymem`. The command starts a stdio MCP server; it should be configured as a server process rather than added as an application dependency.

Yes, donggyun112/keymem works with Claude Desktop through an `mcpServers` configuration entry. You can configure OpenAI embeddings with `OPENAI_API_KEY`, or choose local embeddings with `EMBEDDING_BACKEND=local` and an optional `LOCAL_EMBEDDING_MODEL`.

Yes, it can use local embeddings without an API key by setting `EMBEDDING_BACKEND=local`. The recommended `bge-m3` model downloads about 570 MB on first use; omitting the model uses `fast-multilingual-e5-large`.

Use `correct` when information has changed; it preserves the previous version while weakening it. Use `forget` only when the information is completely wrong, and use `confirm_memory` only when current evidence supports the memory.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewKeymem AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/donggyun112-keymem?style=directory)](https://allmcps.com/mcp/donggyun112-keymem)
HTML Embed
<a href="https://allmcps.com/mcp/donggyun112-keymem"><img src="https://allmcps.com/api/badge/donggyun112-keymem?style=directory" alt="Keymem on AllMCPs" /></a>