Context7
Up-to-date docs for AI agents
作者による説明(英語の原文)
Associative key-graph memory for LLM agents — recall by association, not vector similarity.
この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。
このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。
使っているAIアプリを選んで、設定をコピーしてください。
必要なもの
どのアプリを使っていますか?
上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。
Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます
{
"mcpServers": {
"keymem": {
"command": "npx",
"args": [
"-y",
"keymem"
]
}
}
}ターミナルでこれを実行します
claude mcp add keymem -- npx -y keymemプロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます
{
"mcpServers": {
"keymem": {
"command": "npx",
"args": [
"-y",
"keymem"
]
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
プロジェクトの .vscode/mcp.json に貼り付けます
{
"servers": {
"keymem": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"keymem"
]
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。
選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。
この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月7日にチェック
レジストリ名は、リポジトリを所有するGitHubアカウント donggyun112 で確認済みです
このリポジトリはまだGitHubから読み取っていません
このリポジトリはまだGitHubから読み取っていません
これはパソコンで動くため、インターネット上のエンドポイントはありません
パソコンで動き、代わりにローカルの設定を使います
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
GitHubリポジトリの最終更新は–、最新バージョン(0.17.0)がレジストリに届いたのは4 か月前です。
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。
同じカテゴリには:Context7, Codebase Memory, Exa
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
Up-to-date docs for AI agents
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
The associative memory layer for LLM agents — recall by association, not just similarity.
Most agent memory is a vector store. It surfaces what *sounds like* your query — and misses everything your query is *connected to*.
keymem stores memories in a key graph instead. A search for "Newton" can still reach "strawberries" — Newton → apple → fruit → strawberry. The path lives in the graph, not in embedding space. It runs locally as an MCP server, so any MCP-compatible agent gets human-like associative recall with no external database.
Works with: Claude Desktop · Claude Code · any MCP-compatible LLM agent
Vector-store memory retrieves by embedding similarity. That works until the thing you need *isn't similar to the words you typed*:
Query: "Newton"
Similarity search finds: "Newton discovered gravity" ✅ Similarity search misses: "user likes strawberries" ❌
A person makes the leap anyway — Newton reminds them of the apple, apples are fruit, they like strawberries. keymem makes that same leap because the path exists in the key graph: Newton → apple memory → fruit key → strawberry memory. No embedding distance connects "Newton" and "strawberry"; a chain of shared keys does.
This is the core idea: memories are not islands ranked by distance. They are nodes in an N:M key/value graph that an agent can walk.
Key Space (concepts) Value Space (memories)
[apple] ────────┬─────────→ ↑ same memory [gravity] ────────┘ │ [apple] ────────┼─────────→ "apples are red fruit" [fruit] ──────┬─┘ [red] ──────┤ │ [fruit] ──────┼─────────→ "user likes strawberries" [strawberry]────┘
Memories live in a Value Space, reached through a separate Key Space — one memory reachable via many keys, one key leading to many memories.
recall("Newton") returns matching key clusters such as [Newton] and [apple] plus one passive Top-1 memory under the strongest key. That memory carries matched_key, validity, and connected_keys, so the agent can answer immediately or continue through read_key(fruit).
The default MCP flow remains Key → Memory → Key, but its first Key → Memory hop is completed in one call. Only one memory enters context automatically; later hops remain deliberate.
The animation at the top shows this on a real store: three recall() calls walk from a profile key to a verification philosophy, loading three memories (~2.4k tokens). The branches the agent skipped are still one call away, and auto-expanding the same 12-memory hub would have cost ~8k tokens. The graph knows the roads; the agent decides the steps. Source: docs/demo/chain-walk.html.
keymem is an MCP server (a CLI), not a library. Run it with
npx -y keymem(recommended —
always the latest) or install the command globally with
npm i -g keymem. Do not add it to
your app with
npm i keymemas a dependency: it bundlesopenai,zod, and the MCP SDK, so
inside an existing project it just duplicates those trees (and can clash with your app's
zod/
openaiversions). Thenpm i keymemline npm shows on the package page is for libraries — it
doesn't apply here.
# Optional global install (npx needs none). This puts a `keymem` command on PATH that
keymem (or just use npx -y keymem as shown below).npm i -g keymem
Add to claude_desktop_config.json:
OpenAI embeddings:
{
"mcpServers": { "keymem": { "command": "npx", "args": ["-y", "keymem"], "env": { "OPENAI_API_KEY": "your-openai-api-key" } } } }
Local embeddings (no API key required) — bge-m3 recommended:
{
"mcpServers": { "keymem": { "command": "npx", "args": ["-y", "keymem"], "env": { "EMBEDDING_BACKEND": "local", "LOCAL_EMBEDDING_MODEL": "bge-m3" } } } }
bge-m3(multilingual, recommended) auto-downloads ~570MB on first run, then caches. OmitLOCAL_EMBEDDING_MODELfor the lighter default (fast-multilingual-e5-large). Cross-encoder reranking is part of the core recall path and downloads a second model on first use; set"KEYMEM_RERANK": "false"only to disable it.
The repo is also a plugin marketplace, so one install wires up everything: the MCP server (daemon-backed shim), the UserPromptSubmit hook that passively surfaces related memories on every prompt, and the keymem skill carrying the recall/remember protocol.
Claude Code:
/plugin marketplace add donggyun112/keymem
/plugin install keymem@keymem
Codex CLI:
codex plugin marketplace add donggyun112/keymem
codex plugin add keymem@keymem
Codex prompts once to trust the hook; approve it or the push path stays silent. The plugin defaults to local bge-m3 embeddings (auto-downloads ~570MB on first run, no API key). For OpenAI embeddings, use the manual setup below instead — plugin MCP servers only see the env they declare. The synchronous hook waits up to 9 seconds for /inject (set KEYMEM_HOOK_TIMEOUT_MS to tune it); local embedding and reranking can add several seconds to prompts that trigger recall.
# OpenAI embeddings
claude mcp add keymem -e OPENAI_API_KEY=your-key -- npx -y keymem
claude mcp add keymem -e EMBEDDING_BACKEND=local -e LOCAL_EMBEDDING_MODEL=bge-m3 -- npx -y keymem
# OpenAI embeddings
codex mcp add keymem --env OPENAI_API_KEY=your-key -- npx -y -p keymem@latest keymem-shim
codex mcp add keymem --env EMBEDDING_BACKEND=local --env LOCAL_EMBEDDING_MODEL=bge-m3 -- npx -y -p keymem@latest keymem-shim
Use the keymem-shim entry point (not bare keymem): it runs the shared daemon the push-path hook talks to. For the hook, add to ~/.codex/config.toml:
[[hooks.UserPromptSubmit]]
[[hooks.UserPromptSubmit.hooks]] type = "command" command = "node /absolute/path/to/keymem/hooks/keymem-hook.mjs" timeout = 10
Codex only forwards the env vars declared in its MCP entry, so pass every KEYMEM_* / SUPER_MEMORY_* override with --env.
That's it — recall and remember work immediately. The agent calls recall before its first reply, navigates with read_key/read_memory, and saves with remember.
For reliable proactive saving in Claude Code, add the following to ~/.claude/CLAUDE.md (MCP prompts are not automatically applied as persistent Claude Code instructions):
## keymem
recall silently with short noun-keyword queries.remember or remember_batch silently in the same turn with 3-6 diverse keys. A durable fact left unsaved is a bug.correct when existing information changes. Save nothing only when the turn revealed nothing durable.read_memory as retrieval, not confirmation. Use its validity.status: qualify aging, and never assert stale as current without checking an external source or asking the user.confirm_memory only after an explicit current user assertion, an authoritative current source, or direct observation — never merely because a read succeeded.
In Codex, put the same block in ~/.codex/AGENTS.md. (The plugin install ships this as the keymem skill instead, so you can skip it there.)
For other MCP clients, include the memory_system_prompt MCP prompt in the agent's persistent system instructions. It mandates 3 blind recall() calls before the first reply — appropriate when there's no hook surfacing anything passively. If you *do* wire up a UserPromptSubmit-equivalent push path yourself, set KEYMEM_HOOK_INSTALLED=true so the prompt reacts to what was surfaced instead of blind-guessing on top of it (this is set automatically by the plugin's .mcp.json).
git clone https://github.com/donggyun112/keymem
cd keymem pnpm install
Create .env:
OPENAI_API_KEY=your-openai-api-key
OPENAI_EMBEDDING_MODEL=text-embedding-3-small
Or use local embeddings (no API key required):
EMBEDDING_BACKEND=local
LOCAL_EMBEDDING_MODEL=fast-multilingual-e5-large # default; best fit for Korean/multilingual keys
pnpm dev
pnpm build pnpm start
Requirements:
fastembed for local embeddingsconcept keys match by similarity; name/proper_noun keys match exactly, so "동건" never matches "뉴턴" just for being short.파이썬 and Python collapse into one canonical cluster instead of fragmenting the key space.bge-reranker-v2-m3 re-scores the passive Top-1 pool and compatibility direct-mode candidates.Every memory has a depth score 0.0 → 1.0, but retrieval and confirmation are separate:
| Stage | Depth | Behavior |
|---|---|---|
| Shallow | < 0.3 | Little explicit confirmation; minimal ranking boost. |
| Medium | 0.3–0.7 | Repeatedly confirmed; moderate ranking boost. |
| Deep | > 0.7 | Strongly confirmed; maximum ranking boost, but still correctable and age-sensitive. |
read_memory() increments access metadata and may reinforce the traversed key edge, but it does not change depth, last_confirmed_at, confirmation_count, or freshness. Only confirm_memory(memory_id, evidence) refreshes validity and increases depth +0.05; accepted evidence is an explicit current user assertion, an authoritative current source, or direct observation. A successful read alone is never con
冒頭だけを表示しています。続きはリポジトリで読めます