
brain-core
io.github.xy-claude由 GitHub 账号 xy-claude 发布v0.4.8更新于 Nov 6, 2026
Memory for a Claude Code agent that survives the session: five tools, a markdown vault, all local.
发布方自己的服务:core.blue
概览
本地 MCP 服务器,为 Claude Code 智能体提供跨会话的长期记忆,存放在 markdown 库、SQLite 索引和可选的自托管向量库中。
- 可以做什么
- 开启与结束会话:开始时返回当日简报、执行状态、心智模型和每个任务的召回结果,结束时归档当天内容
- 跨库召回:同时检索 markdown 库、SQLite 索引、向量库和该目录下过去的 Claude Code 会话记录,去重排序并限制在 6k token
- 写入记忆:把事实、模式、决策和纠正写入 markdown,跳过重复内容并标记已变更的值
- 提炼来源:把网址、GitHub 仓库、YouTube 视频、PDF、文件或粘贴文本存入不可变的原始目录,供智能体整理
- 状态检查:一次调用报告各存储是否可用、常驻上下文开销、是否有打开的会话以及待你决定的事项
- 适用场景
- 适合在自己电脑上运行一个或多个 Claude Code 智能体的个人开发者或创业者,不想每天早上重复解释项目、过去的决定和纠正过的问题。它是个人工具,不是托管服务或团队产品。
- 运行要求
- 作为本地 Python 3.12 进程运行(PyPI 包 brain-core-mcp,用 uvx 启动);安装脚本面向 macOS 或带 systemd 的 Linux,并需要 Claude Code。完整模式约需 2 GB 磁盘和一个 LLM 密钥(如 ANTHROPIC_API_KEY)或 Claude Code 登录,供 Hindsight 向量库使用;--lite 可跳过。
安装
在 SourceWeft 中
- 打开 控制台中的 brain-core,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
[CI] [License: MIT] [Python 3.12+] [Glama score]
brain-core
A memory for your Claude Code agent that survives the session. One local MCP server, five tools, a markdown vault you can read, an eval that proves recall. Installs with one command.
brain-core gives a Claude Code agent a long-term memory that lives on your disk. You name the agent, you tell it who you are, and from then on every session opens with yesterday's brief, the decisions you made, the facts that changed and the corrections you gave. It remembers by writing markdown files you can open in any editor, and it finds things again through a local SQLite index plus Hindsight, a self-hosted vector memory. Nothing leaves your machine except the LLM calls you already make.
It is for one person running one or more agents on their own computer: a solo developer, a founder, anyone tired of re-explaining their project every morning. It is not a hosted service and not a team product.
Is it an MCP server or a tool?
Both. One Python package, three ways in:
To a Claude Code user: an MCP server with five memory tools and a one-line installer. To a Python developer: a memory library with an MCP front end.
[brain init, brain doctor, then a real session: remember, a changed fact with its banner, recall]The problem
Every session with a coding agent starts from zero. You explain the project again, the decision you made last week again, the thing it got wrong on Tuesday again. Memory add-ons exist, but they put your notes in someone's cloud, expose 30 tools the agent cannot choose between, and nobody shows you an eval.
brain-core is the opposite: local, five tools, markdown files you own, and a test suite that reports hit rates.
How it works
brain initscaffolds an agent folder. It writes aCLAUDE.mdwith the agent's name and yours, five rule files (identity, doctrine, authority, memory, system), three skills, a safety hook, an.mcp.jsonand an empty vault. Claude Code reads that folder as a project, so the agent knows how to use its memory from the first message.brain serveruns as an MCP server inside Claude Code. It exposes exactly five tools. The agent calls them the way it calls any other tool; you never run them by hand.- Every session has a shape. The agent opens with
brain_session('start'), which returns one block: today's brief, the executive state, the mental models, a recall per active mission, and a flag if the previous session crashed. It closes withbrain_session('end'), which files the day's archive and rewrites state for tomorrow. - Memory is written, not inferred. When you say something worth keeping, the agent calls
brain_remember(text, kind). The text goes to the vault first, then the SQLite index, then Hindsight, then the relations table, and the reply says what each layer did. A duplicate is skipped. A fact whose value changed gets a⚠ Fact changedbanner and the old line stays, so the history is visible. - Recall is one query across every store.
brain_recall(query)searches the vault, the index and Hindsight at once, deduplicates, ranks by relevance and recency, and caps the reply at 6k tokens so it never floods the context. - Two cron jobs do the housekeeping.
brain dailywrites the next morning's brief and backs up Hindsight.brain weeklyarchives sessions older than 30 days into a monthly summary and refreshes the mental models.
The five tools
Plus brain_status() for health in one call: which stores are up, how many tokens the always-loaded context costs, whether a session is open, and which decisions are waiting on you.
Install
Before you start
Pick two names before you run the command: the agent's name (--agent), which becomes its folder and identity, and your own (--user), which is how the agent addresses you. Both can be changed later by editing CLAUDE.md.
macOS, one line
[install.sh transcript]In a hurry, or no 2 GB to spare? Add --lite: vault plus SQLite full-text search, no Hindsight, installed in about a minute. Everything in the five tools works; what you give up is semantic recall over paraphrases, mental models and the weekly reflection. The recall numbers in Does it work? are measured on exactly this configuration. Upgrade any time with brain hindsight install, then uncomment the hindsight: block in brain.yaml.
What it does, in order. Re-running skips what is already there, so after a failure you fix the cause and run the same line again.
After the installer
Two things the installer cannot do for you:
The installer prints a note if the key was not in your shell when it ran. If you would rather not use an API key, pass --provider claude-code and Hindsight uses your Claude Code login instead. That mode is for personal use only.
Already have an agent?
Adds brain.yaml, the brain MCP server, the four hooks and the memory rule to an existing Claude Code folder, then indexes its facts. CLAUDE.md, skills and the vault are left alone; omit --bank to run lite.
Linux
The same one line. It needs git and curl already present. It then installs uv from astral.sh, installs Claude Code with npm when node is present, runs Hindsight as a systemd --user service, and writes the two jobs into your user crontab as tagged lines it can find and replace on re-run.
Manual, any platform
Check it worked
It prints the agent name, the config path, row counts per table, and Health check: OK. Store health shows up in the first brain_session('start') reply and in brain_status(). The common problems:
First session
[first session transcript]The agent's CLAUDE.md tells it to open with brain_session('start'). What comes back:
On day one the brief is empty and the executive state is the template. That is expected. Spend the first session telling the agent what you are working on: the project, the stack, the decisions already made, how you like to work. Each statement that matters becomes a brain_remember call, and the reply shows what every layer did:
Things to try in that first session:
- State a fact, then change it. "The API listens on 8887." Later: "Correction, it is 8888." The second write returns a
⚠ Fact changedbanner andvault/facts.mdkeeps both lines. - Give it a source. Paste a URL or a GitHub repo and ask it to distill it. The page lands in
vault/raw/untouched, and the agent compiles a page invault/knowledge/. - Ask about something from earlier. "What did we decide about the database?" is one
brain_recallcall, and each hit names the file it came from. - Open the vault in your editor. Every write you just saw is a line in a markdown file. Edit it if the agent got it wrong.
Say "thanks, we're done" and it runs brain_session('end'). Tomorrow at 06:07 brain daily writes the next brief from what you did today, and the next claude session opens with it.
What is in the agent folder
Everything is markdown or SQLite. Open the vault in Obsidian, grep it, commit it, delete a line. The agent will not mind.
Does it work?
The eval is part of the test suite and runs in CI.
The slices are the ones the memory benchmarks (LoCoMo, LongMemEval) say a single hit-rate hides: a changed value must outrank the stale one, an unanswerable question must return nothing, a question about a day must surface that day's archive. Recall takes about 1.7 s per query with Hindsight; a full start block is about 4 s and under 6k tokens.
Twelve traits, innate and grown
A brain-core agent is born with twelve traits and grows them with experience. Innate is what brain init ships and what survives a cold start with the vault wiped; grown is what accumulates in the vault. brain_status() scores each from evidence on disk, and brain daily logs one line a day so the curve shows over weeks.
A trait never gets one number. It gets signals, each with a sample size and a verdict: defensible when the answer key comes from a file the agent did not write that session, cost when it is a size or an age, pending when the evidence does not exist yet. Artefact counts and self-written scores are not signals. The list and the research behind it: docs/TRAITS.md.
How memory is organised
Rules: idempotent by content hash, append-only, nothing deleted, secrets refused before any store sees them. Details in docs/VAULT_SCHEMA.md.
Requirements
- macOS or Linux for the installer; the library and MCP run anywhere Python 3.12 does
- optional: Hindsight (MIT) as the vector store, installed for you unless
--lite. Postgres is embedded; embeddings run on CPU - with Hindsight: an LLM key for its reasoning, or a Claude Code login for personal use
On PyPI the package is brain-core-mcp (the plain name collides with an unrelated project); the command is still brain and the import is still brain_core.
Roadmap
- an
importfor existing notes folders - a recall-miss log that grows the eval set from real misses
How it compares to claude-mem, mem0 OpenMemory and a plain CLAUDE.md: docs/COMPARISON.md. Shipped milestones: docs/MILESTONES.md. Design: docs/SPEC_v0.2.md. Threat model for a memory that reads untrusted text: docs/THREAT_MODEL.md.
Contributing
Issues and pull requests welcome. uv sync --all-extras --all-groups, then ruff check, mypy, pytest. See CONTRIBUTING.md.
License
MIT.
来源:README.md,提交 67a07c0
工具
0版本历史
2- v0.4.8最新Nov 6, 2026
- v0.4.6Nov 3, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Core 集成
core.blue
blue.core官方发布者
core.blue 的远程 MCP 端点,提供每位客户独立的私有智能体记忆“house”:可读手册、试用沙盒、查价格与建议,并申请 house。

Brevio Core
由 GitHub 账号 Brevio-Ventures 发布
本地 MCP 服务器,让编码代理扫描代码中反复出现的代理式错误、解释规则、列出规则,并把一次修复固化为守卫。

Scovant Core
由 GitHub 账号 Scovant 发布
对网站进行被动式AI代理就绪扫描:robots、llms.txt、JSON-LD、MCP发现、安全性。AI 翻译

ProofCore
由 GitHub 账号 ProofCore-Protocol 发布
面向AI代理的TON区块链零认证加密公证与证据层。AI 翻译

GSC MCP Core
由 GitHub 账号 glq0546 发布
远程、OAuth 保护的 MCP 端点,让 AI 助手获取多个租户的 Google Search Console 数据。