
Kemory
io.github.SeKondBrainAILabs由 GitHub 帳號 SeKondBrainAILabs 發布v0.19.0更新於 Oct 29, 2026
Persistent memory for AI agents: connects MCP clients to your Kemory memory vault
概覽
Kemory 將 MCP 用戶端連接到供 AI 代理使用的持久記憶庫,讓助理能跨工作階段儲存、取回與搜尋記憶。
- 可以做什麼
- 在 Kemory 記憶庫中儲存、搜尋、讀取與刪除記憶,並可向記憶庫提問並取得附證據的回答
- 列出命名空間,並將整個記憶庫匯出為 JSON
- 透過代理鉤子在工作階段開始時載入記憶脈絡,並把工作階段中的提示儲存為記憶
- 查看記憶取用的使用情況與 token 成本,找出從未被取用或被評為不佳的記憶
- 為代理管理 API 金鑰,並切換目前組織
- 適用情境
- 適合希望編碼代理或其他 MCP 用戶端在工作階段之間保留脈絡、不必反覆說明的場合,也適合需要一個可讓助理查詢的個人記憶庫的使用者。前提是已有或願意註冊 Kemory 帳號。
- 執行需求
- 需要 Kemory 帳號(在廠商網站註冊)以及本機執行環境:npx 需 Node.js 18+,或使用 uv;另有適用於 macOS、Linux 與 Windows 的獨立安裝檔。登入透過瀏覽器 OAuth 裝置流程完成,也可用 KEMORY_API_KEY 提供的 API 金鑰。需要能連線到 Kemory API 與登入伺服器。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Kemory,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
kemory
[CI] [npm] [PyPI] [License: MIT] [M8ven Score]
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:
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
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 <file> --repo SeKondBrainAILabs/kemory-cli).
kemory upgrade tells you whether a newer release exists and how to update
the copy you installed.
Commands
Every command accepts --output json for scripts and agents (stdout then
carries only the JSON payload), --quiet, --no-color and --env <name>.
MCP clients
kemory connect --host <name> and kemory mcp install --host <name> 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.
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.
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:
Configuration
Sign-ins are stored per environment in ~/.kemory/credentials-<env>. Extra
environments can be defined in ~/.kemory/environments.json (or the file named
by KEMORY_ENVIRONMENTS_FILE):
Hooks
Coding agents with hooks can give a session your Kemory context when it starts
and save it when it ends. kemory connect sets this up where it can; these are
the commands the hooks call.
Neither can hold up the agent: any error is silent, the exit status is always
0, and each gives up after KEMORY_HOOK_TIMEOUT seconds (default 2).
KEMORY_HOOK_DEBUG=1 prints why a hook did nothing.
Capture sends only your own prompts, never the agent's replies or tool output:
at most the last 12 new prompts and 8000 characters per memory, with
credential-shaped text (API keys, tokens, passwords, private keys) replaced by
[REDACTED]. They are stored in the user:sessions namespace, visible only to
you. It records what it has stored in ~/.kemory/.captured/<session>, the same
file the Kemory plugin uses, so a session is never stored twice.
What the CLI sends
Commands talk to the selected environment's Kemory API, and login and token
refreshes to its sign-in server (accounts.sekondbrain.ai for prod). Each API
request carries your access token, the active organisation, the CLI version, OS and
architecture (X-Kemory-Client), and the name of the command being run
(X-Kemory-Command, never its arguments). Kemory uses the last two for product
analytics; kemory telemetry off turns that off for your account.
kemory doctor and kemory upgrade also read the public release list on
GitHub to compare versions.
How SeKondBrain handles your account and vault data is set out in the Privacy Policy.
Uninstall
- Remove the kemory entries from your MCP clients' config files (the
MCP clients table names each file); for Continue, delete
~/.continue/mcpServers/kemory.json. - Run
kemory logout, or delete~/.kemory/to drop every saved sign-in. - Uninstall the CLI the way you installed it:
brew uninstall kemory,npm uninstall -g kemoryoruv tool uninstall kemory.
Building from source
See CONTRIBUTING.md for how to work on the CLI and SECURITY.md for how it handles credentials and how to report a vulnerability. Questions and bugs go to GitHub issues.
License
來源:README.md,提交 4d3eccb
工具
0版本歷史
1- v0.19.0最新Oct 29, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分