Kemory
概览
作者提供的说明(英文原文)
Persistent memory for AI agents: connects MCP clients to your Kemory memory vault
PopNx MCP 的三大支柱
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
- 用户评价i暂无评价评价功能将在后续阶段与账户功能一起开放
- 我们的基础检查i1 项中通过 1 项依据公开信息检查;尚未扫描代码
- 使用情况i非常新↓ 214/周 · ★ –
它能帮你做什么
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
- 连接方式: 在你的电脑上运行
- 传输方式: stdio
- 分类: 搜索与 AI 记忆
- 你需要填写:KEMORY_API_KEY
安装
选择你使用的 AI 应用,然后复制设置。
安装之前
- 基础检查:1 项中通过 1 项
- 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
- 需要你自己填写:
KEMORY_API_KEY
标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你需要
- npm已安装 Node.js(用于 npx 命令)
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"kemory": {
"command": "npx",
"args": [
"-y",
"kemory",
"mcp",
"serve"
],
"env": {
"KEMORY_API_KEY": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add kemory --env KEMORY_API_KEY=your-value -- npx -y kemory mcp serve运行前请先填写空着的值。
或者自己复制设置
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"kemory": {
"command": "npx",
"args": [
"-y",
"kemory",
"mcp",
"serve"
],
"env": {
"KEMORY_API_KEY": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
或者自己复制设置
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"kemory": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"kemory",
"mcp",
"serve"
],
"env": {
"KEMORY_API_KEY": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
需要你填写的值
- Kemory API key; when unset, mcp serve uses the sign-in from `kemory login`
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它能做什么
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日
- ✓ 通过
作者与仓库一致
注册名称已通过 GitHub 账户 SeKondBrainAILabs 验证,该账户拥有此仓库
- … 尚未检查
仍在维护
我们还没有从 GitHub 读取这个仓库
- … 尚未检查
有许可证
我们还没有从 GitHub 读取这个仓库
- – 不适用
端点有响应
它在你的电脑上运行,没有互联网端点
- – 不适用
使用 OAuth 登录
在你的电脑上运行,改用本地设置
- … 尚未检查
工具描述中没有隐藏指令
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与“搜索与 AI 记忆”中的其他服务器比较i
- 星标数多于此分类中其他 5686 个服务器的 0%
- 发布到注册中心的时间比此分类中其他 5686 个服务器的 76% 更新
- 基础检查结果等于或优于此分类中其他 5686 个服务器的 100%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
Kemory 安全吗?
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
你需要填写:KEMORY_API_KEY
它在我的电脑上运行还是在云端?
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
它还在维护吗?
GitHub 仓库最后更新于–,最新版本(0.19.0)于12天前进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。
有什么可以替代它?
同一分类中有:Context7, Codebase Memory, Exa
替代选择
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Codebase Memory
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Exa
Connect AI agents to Exa for web search, content fetching, and multi-step research.
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
kemory
The command-line client for Kemory, a persistent memory vault for AI agents. It signs you in, connects MCP clients such as Claude Code, Codex, Cursor and VS Code to your vault, and runs the MCP bridge they use.
Quick start
You need a Kemory account; sign up at kemory.sekondbrain.ai.
- Connect your AI clients. Nothing to install first:
npx -y kemory connect # Node.js 18+
uvx kemory connect # or with uv
Your browser opens to sign in. kemory then lists the AI clients on this machine, [ready] or [connected], and asks once: connect every ready client, choose some, or cancel. Claude Code and Grok Build get the Kemory plugin; Codex, Copilot CLI, Cursor, Gemini CLI, OpenCode and VS Code an MCP entry plus automatic memory; the others an MCP entry. Then the connection is checked. A summary lists what is left to do, such as which clients to restart.
- Restart the clients it lists. Warp picks the change up without a restart.
- Check the setup end to end at any time with
kemory doctor.
--dry-run shows what would change without changing anything. In scripts, name the clients instead: --host all, or --host claude-code, --host codex and so on (MCP clients lists them); kemory then asks nothing.
Install
brew install sekondbrainailabs/s9n/kemory
npm install -g kemory uv tool install kemory
Builds exist for macOS (Apple silicon and Intel), Linux (arm64 and x64) and Windows (x64). They are attached to each GitHub release with checksums and build provenance (gh attestation verify --repo SeKondBrainAILabs/kemory-cli). kemory upgrade tells you whether a newer release exists and how to update the copy you installed.
Commands
| Command | What it does |
|---|---|
kemory login | Sign in through your browser (OAuth device flow), or --local with an API key |
kemory logout | Remove the cached sign-in for the selected environment |
kemory whoami | Show your account, active organisation and teams |
kemory mcp serve | The stdio MCP bridge an MCP client launches |
kemory hook session-start, hook capture | What a coding agent's hooks run: load your Kemory context when a session starts, save the session when it ends (Hooks) |
kemory connect | Sign in if needed, wire an MCP client and check the connection |
kemory connect copilot-cloud | Give GitHub Copilot's cloud agent automatic memory in the current repository (Copilot cloud agent) |
kemory mcp install | Write the kemory entry into MCP clients (--host all for every installed one) |
kemory doctor | Check sign-in, network, API and MCP clients; --fix wires or cleans them |
kemory orgs, kemory use | List your organisations and switch the active one |
kemory remember, recall, ls, show, forget | Store, search, read and delete memories |
kemory ask | Ask your vault a question and get an answer with its evidence |
kemory namespaces, kemory export | List namespaces, export the whole vault as JSON |
kemory stats | Recall usage and its token cost; stats memories for what is never recalled or rated down |
kemory keys | Create, rotate, approve, revoke, delete and list API keys for agents |
kemory upgrade, telemetry, completion | Check for a newer CLI, set your analytics preference, shell completion |
Every command accepts --output json for scripts and agents (stdout then carries only the JSON payload), --quiet, --no-color and --env .
MCP clients
kemory connect --host and kemory mcp install --host connect one client, and --host all connects every client installed on this machine.
For Claude Code and Grok Build they install the Kemory plugin through the client's own claude or grok command. Its hooks save each session to Kemory, and in Claude Code also load your memory when a session starts. Without that command, or for an environment other than prod, they write the MCP entry instead.
For Codex they also add hooks to ~/.codex/hooks.json that load your memory when a session starts and save the session as it goes (Hooks). Codex runs a new hook only after you approve it, so open Codex once and approve them with /hooks. Your other hooks in that file are left as they are.
For Cursor they add the same hooks to ~/.cursor/hooks.json, and for Gemini CLI to the hooks in ~/.gemini/settings.json. Both run them without asking, and your other hooks are left as they are.
For VS Code and the Copilot CLI they write ~/.copilot/hooks/kemory.json, which both run (in VS Code through the chat.useHooks setting, on by default). kemory owns that file and rewrites it on every connect.
For OpenCode they add the opencode-kemory plugin to the plugin list in opencode.json, which OpenCode installs from npm. It does the same: it adds your memory to the system prompt when a session starts and saves your prompts as the session goes. Connected to an environment other than the default, they write the plugin as ~/.config/opencode/plugins/kemory.js instead, which connecting again replaces, so keep your own plugins in other files.
For every other client they write an MCP entry. The entry only starts kemory mcp serve; no token or key is written into the client's config, and everything else in the file is left as it was.
--host | Client | Config file (macOS and Linux) |
|---|---|---|
claude-code | Claude Code | ~/.claude.json |
claude-desktop | Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json |
codex | OpenAI Codex | ~/.codex/config.toml, plus memory hooks in ~/.codex/hooks.json (or under $CODEX_HOME) |
cursor | Cursor | ~/.cursor/mcp.json, plus memory hooks in ~/.cursor/hooks.json |
vscode | VS Code (Copilot agent mode) | ~/Library/Application Support/Code/User/mcp.json, ~/.config/Code/User/mcp.json, plus memory hooks in ~/.copilot/hooks/kemory.json |
copilot-cli | GitHub Copilot CLI | ~/.copilot/mcp-config.json (or under $COPILOT_HOME), plus memory hooks in ~/.copilot/hooks/kemory.json |
copilot-jetbrains | GitHub Copilot in JetBrains IDEs | ~/.config/github-copilot/intellij/mcp.json (%LOCALAPPDATA%\github-copilot\intellij\mcp.json on Windows) |
junie | Junie, in JetBrains IDEs and the Junie CLI | ~/.junie/mcp/mcp.json |
gemini-cli | Gemini CLI | ~/.gemini/settings.json, with the memory hooks in the same file |
antigravity | Google Antigravity | ~/.gemini/config/mcp_config.json |
windsurf | Windsurf / Devin Desktop | ~/.config/devin/mcp_config.json, or ~/.codeium/windsurf/mcp_config.json for older installs |
cline | Cline | the VS Code extension's cline_mcp_settings.json, or ~/.cline/data/settings/cline_mcp_settings.json |
kiro | Kiro | ~/.kiro/settings/mcp.json |
grok | Grok CLI | ~/.grok/config.toml |
continue | Continue (discontinued in 2026; kept working where it is still installed) | ~/.continue/mcpServers/kemory.json |
droid | Factory Droid | ~/.factory/mcp.json, plus memory hooks in ~/.factory/hooks.json (or the hooks in ~/.factory/settings.json when you keep yours there) |
zed | Zed | ~/.config/zed/settings.json (%APPDATA%\Zed\settings.json on Windows), under context_servers; your comments in the file are kept |
warp | Warp | ~/.warp/.mcp.json |
opencode | OpenCode | ~/.config/opencode/opencode.json, plus opencode-kemory in its plugin list |
On Windows the files under Library/Application Support and .config live in %APPDATA% instead, except OpenCode's, which stay in ~\.config\opencode. Grok also reads ~/.claude.json, so the claude-code entry reaches it too.
One connection per client
Each client should reach Kemory one way. Two ways give it every Kemory tool twice, which costs context in every session.
| Client | Connect it with |
|---|---|
| claude.ai, Claude Desktop and Claude mobile | The claude.ai connector, added from the Kemory dashboard |
| Claude Code and Grok Build | The Kemory plugin, which kemory connect installs |
| Everything else in the table above | kemory connect --host |
connect and mcp install write nothing for a client that already has Kemory: Claude Code or Grok Build with the Kemory plugin enabled, or Claude Desktop when your account has a claude.ai connector in use. kemory doctor reports a kemory entry that duplicates either one, and kemory doctor --fix removes it.
Claude Desktop rewrites its config file from memory while it runs, which drops an entry added or removed in the meantime. When its config has to change while it is open, connect, mcp install and doctor --fix offer to quit it, make the change and open it again (doctor --fix --yes does so without asking). Run from the terminal inside the Claude app, which would close with it, they offer to open Terminal and continue there instead (macOS).
Copilot cloud agent
GitHub Copilot's cloud agent works in a sandbox where no one signs in, so it reaches Kemory with an API key. Run kemory connect copilot-cloud in the repository it works on, with gh signed in. It:
- writes
.github/hooks/kemory.json, the hooks that load your memory when a session starts and save the session (commit and push it); - creates an API key for the repository, or a new one on a re-run, and stores it as the repository's Agents secrets
KEMORY_API_KEY(for the hooks) andCOPILOT_MCP_KEMORY_API_KEY(for the MCP server); - prints the MCP configuration to paste in the repository's Settings → Copilot → MCP servers, and the Kemory host to add to Settings → Copilot → Internet access, so the hooks can reach it.
Without gh it prints the key once, to add as both secrets yourself. The hooks also take KEMORY_API_KEY anywhere else no one signs in.
Exit codes
Scripts and agents can act on why a command failed:
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Failure that fits no category below |
| 2 | Invalid invocation |
| 3 | Not signed in, or the sign-in was rejected — run kemory login |
| 4 | Kemory could not be reached; nothing ran on the server |
| 5 | Signed in but not allowed (403) |
| 6 | Not found (404) |
| 7 | Conflict with existing state (409) |
| 8 | Rate limited (429) |
| 9 | Kemory is up but temporarily unavailable (503) |
Configuration
| Variable | Effect |
|---|---|
KEMORY_ENV | Environment to use: prod (default), india, local, or one from the environments file |
KEMORY_URL | Use this Kemory API host instead of the environment's |
KEMORY_OIDC_ISSUER, KEMORY_CLI_CLIENT_ID | Identity provider and client for self-hosted Kemory |
KEMORY_API_KEY | mcp serve authenticates with this key instead of your sign-in |
KEMORY_HTTP_TIMEOUT | Seconds mcp serve waits for Kemory (default 120) |
KEMORY_OUTPUT | text or json, like --output |
NO_COLOR | Disable colour |
| KEMORY_ACCESSIBLE=1 | Plain numbered p
只显示了开头部分;其余内容请在仓库中阅读