Memorybank

MCP文档知识

提供方 未标注

文档知识 未标注 未标注 社区 / 第三方 Claude DesktopClaudeCursorVS Code
查看接入方式

种子,治理并导航memory_bank知识库:门控写入、无读取路由,以及与代码的漂移

一句话选型结论

按资料字段整理

Memorybank 属于文档知识类 MCP 服务器,传输方式未标注,鉴权方式未标注,可直接接入 Claude Desktop、Claude、Cursor 等,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类文档知识 传输方式未标注 鉴权未标注 部署方式未标注
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

文档知识
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

记忆

安装与配置

未标注 未标注
上游未给出传输方式
{ "mcpServers": { "memorybank": { "command": "npx", "args": ["-y", "@maxweb4u/mcp-memorybank", "--root", "./memory_bank"] } } }

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
文档检索问答

在你的文档库里按问题找答案。

知识库读写

把新资料写进知识库,随用随取。

内容整理

把零散资料归纳成结构化笔记。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。

先想清楚的地方

  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在文档知识场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Memorybank当前 未标注 未标注 未标注 有 未标注
dify 未标注 stdio · 本地进程 本地部署 有 2026-04-11
open-webui 未标注 stdio · 本地进程 本地部署 有 2026-04-11
JeecgBoot 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Cherry Studio 未标注 未标注 未标注 无 2026-05-17
mempalace 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

文档知识
字段来自项目仓库与公开索引,中文说明由本站标注
提供方未标注上游标注的维护方 未标注
分类文档知识本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式未标注远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验未标注上游最后核验时间

详细介绍

44.1 KB
来自项目仓库与上游目录的原文,未做删改

mcp-memorybank

An MCP server for a memory_bank knowledge base. It seeds one from nothing, gates every write
against the rules the bank itself declares, routes to the right document without reading the bank,
and reports where the code has moved on without the documents.

It writes nothing on its own initiative. Every document arrives from a deliberate call carrying a
purpose, an upstream dependency and an index entry; what the end-of-session hook collects lands in
a quarantine that only a human empties.

Spec — specification.md, plan — implementation-plan.md,
what a seeded bank is made of and where it strains — architecture.md.

Everything in the plan is done: E0 index, E1 reads, E2 validation, E3 graph,
E4 search and delta, E5 writes.

What it is measurably good at, and what it is not

Counted across six banks in real use, by parsing the sessions rather than by impression:```
writing into the bank, through the server 985 calls
reading the bank, through the server 187 calls
reading the bank, around the server 1755 calls (cat, grep, Read)
bank_route specifically 33 calls


**The writing half works.** `bank_create`, `bank_edit` and `bank_update_section` are used in every
bank, with or without any instruction to do so, because writing a governed document by hand is
harder than calling the tool: it would have to reproduce the frontmatter, resolve the
`derived_from`, and register itself in a section index, and it would fail validation if it got any
of that wrong. Ninety percent of all server calls are writes.

**The reading half is mostly bypassed.** Nine times out of ten an agent opens the bank with `cat`
and `grep` instead of asking `bank_route` which documents matter. This is not a claim that routing
answers badly — nobody has measured that. It is a claim that it does not get asked, because reaching
for the shell is what a model does in every repository and nothing here outweighs the habit.

Two things follow, and neither is comfortable. Routing is the feature this README leads with and the
one the token arithmetic below is built on, and it is the least used. Editing existing documents was
written into the specification as something the server would *not* do — see §8 — and it turned out
to be the half that carries the project.

The one lever with evidence behind it is the paragraph under
Telling the agent to use it: the four banks that carry it route
eight times more often than the two that do not, 32% of reads against 4%. That is a correlation
across six projects, and it is being tested properly — see A-06 in backlog.md.

## How it works

There is no database, no daemon and no configuration. A directory of markdown files is the entire
state, and the server is a reader of it that happens to speak MCP. Everything it knows it re-derives
from the files; delete its process and nothing is lost, because nothing was ever kept anywhere else.

### The index, and why there is no watcher

On startup the server walks the bank once, and on every call it walks it again: `readdir`, `stat`,
and a parse only for the files whose `mtime` moved. A cold build of a 368-document bank takes about
85 ms; the walk before an unchanged call costs 11–13 ms.

That is why there is no file watcher. A watcher would save those milliseconds and buy an error class
in exchange — an index that has quietly diverged from the disk, in a tool whose whole job is to be
trusted about what the disk says. The cheap check wins on both counts.

### What a document becomes

Each file is parsed once into a record: the frontmatter fields, the second-level section headings
with their line spans, byte size, mtime — and one thing the file does not contain, a **layer**
computed from the path (`dna`, `knowledge`, `decision`, `delivery`, `flow`, `inbox`, `other`).

Frontmatter goes through `gray-matter` in exactly one place. When the YAML is invalid — an unquoted
colon in `purpose` is the common case — the document does not fall out of the index: its metadata is
recovered line by line and the parse error is kept for `bank_validate` to report. A document that
disappears from routing because of a typo is worse than one that ranks badly.

### The contract comes from the bank

`doc_kind`, `doc_function`, `status`, whether `derived_from` is mandatory, which document is the
declared root — all of it is read out of the bank's own `dna/frontmatter.md` and `dna/governance.md`
at refresh time. Nothing is hardcoded, and the sets are open.

This is not politeness: banks disagree about their own vocabulary, and a fixed enum rejects a
sizeable minority of real documents by `doc_kind` alone. A bank with no `dna/` still works: the server runs in degraded mode — reading,
routing, search and the structural rules — and says so instead of enforcing a contract nobody
declared.

### Routing: ranking the header, never the prose

`bank_route` answers "what should I read about this", and it reads only what a human wrote by hand
about each document — never the body. Four fields, with fixed weights:

| Field | Weight | Scored as |
|---|---|---|
| `canonical_for` | 5 | how much of a fact key the question covers, not whether one word of it matched |
| `purpose` | 3 | word overlap |
| `title` | 2 | word overlap |
| section headings | 1 | the best-matching heading, which is also returned so the answer can be read section-scoped |

The raw score is then multiplied, and the multipliers are where the ranking actually gets its
judgement:

- **Layer.** `knowledge` ×1.5, `decision` ×1.2, `dna` / `flow` / `other` ×1.0, `delivery` ×0.6,
  `inbox` ×0.2. Delivery is damped because in a bank that has been in use for a while it is most of
  the documents; without this a question about a rule returns the closed features that mention it.
- **Status.** `active` ×1, `draft` ×0.7, `archived` ×0.2.
- **Closed work.** `delivery_status: done` or `cancelled` halves the score again. A finished feature
  is history, not an answer.
- **Intent.** A question containing *why*, *rationale*, *instead of*, *почему*, *вместо* reweights
  the whole run toward decisions: `decision` ×1.6, `knowledge` ×1.2. "Why X" and "what is X" are
  different questions and should not return the same document first.

Templates never appear in results: they are structurally identical to real documents and would
flood every list.

### Search: a different index for a different question

`bank_search` is not a fallback for routing, it answers the other half. Routing ranks the
hand-written header ("which document is *about* this"); search reads the prose ("where does this
string actually appear"). Identifiers, error messages and literals live only in bodies.

It builds an inverted index over document bodies, incrementally on the same mtime check. A query
matches in three tiers by confidence — the word as typed weighs 10, its equivalent in the other
language 6, a fragment of a compound token 1 — and documents matching every concept are ranked
before documents matching some. The fragment tier is what keeps `FT-042` from lifting the
`features/README.md` registry, with its seventy `FT-*` lines, above the feature itself.

### Writing: one operation, or none

`bank_create` writes the document, fills the frontmatter the contract asks for, and registers it in
the section index **in the same call** — so the registration step cannot be forgotten, which is the
single most common way a bank rots. Registration copies the shape of the last entry in that index,
table row or bullet or numbered item, so a hand-written file is not reformatted.

Before any of that it refuses, with the reason named: the path is taken, `derived_from` does not
resolve, `canonical_for` is already owned by another document, the path leaves the bank root, or it
does not end in `.md`. A refusal writes nothing at all — no partial file, no orphaned index line.

Two rules follow from those gates, and they are the reason the writes are worth having: an SSoT
conflict and a broken edge **cannot enter the bank through this server**. They can only arrive by
editing a file behind its back.

### The graph

`bank_graph` walks `derived_from` breadth-first with a node ceiling, so a hub document does not drag
in the whole bank and a cycle does not loop. Each edge lands in one of three outcomes: internal (a
node), `external` (it leaves the bank root — in a monorepo, banks nest), or `broken`. `up` is what a
document is built on; `down` is the blast radius of changing it.

An external edge is followed exactly one hop: the target's frontmatter is read and returned under
`neighbours`, and nothing else about it is. It is not indexed, not validated, not searchable, and its
own edges are not walked. The boundary stays where it was — but in a monorepo those edges carry real
decisions, and a blast radius that silently ends at the repository wall is wrong rather than partial.
Pass `neighbours: false` to skip the reads.

### Drift

`bank_drift` answers the question validation cannot: not "is something missing" but "has what we
wrote gone stale". A document that describes code lists it in `anchors:`, and the server compares the
last commit that touched the document against the last commit that touched the code. Where the code
is ahead by more than the threshold, it says so — and where an anchor points at a path that no longer
exists, it always says so, because that is the code moving out from under the document.

It never guesses which document owns which file. The pairing is hand-annotated or it does not exist,
which means a bank that has not been annotated gets an honest empty answer and a note saying why. And
it reports without editing: whether a six-month gap matters is not a judgement a timestamp can make.

### What a seeded bank contains

`bank_init` writes 24 files: the governance set in `dna/`, a root index, eight section registries,
the four flow documents, a pointer where the templates would be, and two drafts to fill in. Three more sections — `epics`, `prd`, `prompts` — are built
the first time a document needs one, index and root-index entry included, rather than standing empty
from the start.

The document templates are not copied. They ship with the server and `bank_create` reads them from
there, so a bank behaves exactly as if it held them; `--materialize-flows` copies them in for a
project that means to change one, and from then on the bank's own copies win. The prose flows *are*
copied, because people read them and routing answers with them.

`dna/` is copied too, and that one is not negotiable: it is the law the bank is judged by, and the
design rests on it travelling with the corpus. Every top-level directory's layer and ranking weight
is declared there as well — a bank that renames a section says so in that table and keeps its
weight, and a bank that declares nothing gets the built-in map.

### What it will not do

It does not create a document by editing — every new document goes through `bank_create`, so nothing
enters the bank without a path check, a `derived_from` that resolves and an index entry. It does not
promote anything out of `_inbox/` on its own. It does not invent a schema, and it does not enforce a
rule the bank has not declared. It does not delete a document outside `_inbox/`. And it does not
index, validate or search anything outside the bank root — the one hop `bank_graph` takes into a
neighbouring bank reads a header and stops there.

### What it costs in tokens

Wiring a server in is not free, and the cost is paid in two different currencies. All figures below
were measured on the shipped build, counting characters of the actual JSON-RPC payloads and
converting at 3.5 characters per token — dense JSON runs closer to that than the 4 that suits prose.

**The fixed half is paid on every request**, whether a tool is called or not, because the
definitions live in the context:

| | characters | ~tokens |
|---|---|---|
| server instructions | 343 | 98 |
| 16 tool definitions | 21,790 | 6,226 |
| 5 prompts | 1,346 | 385 |
| 4 resources | 908 | 259 |
| **total, per request** | **24,387** | **~7,000** |

`bank_create` is the most expensive definition at ~710 tokens — seven parameters and a description
that has to explain the gate. `bank_changed` is the cheapest at ~183.

That table is what a project **with a bank** pays. A project that has none is offered `bank_init`
alone and pays ~450; one switched off — by `--off` or a `.memorybank-off` file — pays ~25 for an empty surface. See
Installing it once, for every project — the reason the
server bothers to make that distinction is that a global install would otherwise charge the full
rate in every project on the machine, including every project that will never have a bank.

**The variable half is where it earns the fixed half back.** On a 27-document bank:

| | characters | ~tokens |
|---|---|---|
| reading the whole bank | 91,319 | 26,091 |
| a `bank_route` answer, 3 results | 839 | **240** |
| the three documents it named | 8,386 | 2,396 |

Routing answers in 240 tokens what reading the corpus costs 26,091 — and a tenth of what reading
even the correct three documents costs, because it returns paths, titles, `purpose` and a line of
reasoning rather than any prose. What to read afterwards is then a decision made on evidence.

`bank_read` is separately bounded: 40,000 bytes per batch, roughly 11,000 tokens. Ask for twenty
documents and you get what fits plus a list of what the budget did not reach, broken down by
section, so a single call cannot flood the context.

**Where the break-even sits.** The ~7,000 is repaid the first time the server prevents one
unnecessary read, and that happens immediately on any bank large enough to matter. Measured across
four banks of the same lineage:```
 27 documents    ~26k tokens to read whole
 78 documents    ~87k
 96 documents   ~158k
112 documents   ~305k

At the top of that range the corpus is two full context windows and reading it is not an option at
any price, while a routed answer stays in the low hundreds of tokens.

The honest conclusion is that on a small bank the server loses. While the corpus still fits in a
context window, cat is cheaper than a 7,000-token standing charge, and the field test measured
exactly that: on a bank small enough to read whole, routing competes with "already in context" and
loses. The server earns its cost on corpora that have outgrown being read.

And tokens are not the main thing being bought. Half the tools save nothing at all — bank_create,
bank_validate and bank_drift only spend. They exist so the bank keeps its shape, which no amount
of context budget will do on its own. The saving on routing is a side effect, not the point.

Running it

Wiring it into a project — /.mcp.json:```json
{
"mcpServers": {
"memorybank": {
"command": "npx",
"args": ["-y", "@maxweb4u/mcp-memorybank", "--root", "./memory_bank"]
}
}
}


Pin the version once you rely on it — `@maxweb4u/mcp-memorybank@0.3.2` — so the server does not
change shape underneath a project you are not looking at.

The package is scoped because npm's similarity check will not accept `mcp-memorybank` unscoped: it
normalises punctuation away, which makes it indistinguishable from the unrelated `mcp-memory-bank`
already in the registry. The command the package installs is still `mcp-memorybank`.

If the project has no bank yet, seed one first. The command writes the skeleton, the governance set
and one registered index per section, and a bank created this way validates clean by construction:```bash
npx @maxweb4u/mcp-memorybank --root ./memory_bank --init "Project Name"

Requires Node 22. The hook described in hooks/README.md also wants jq and git.

Installing it once, for every project

A per-project .mcp.json is explicit and travels with the repository, which is why it is the shape
above. The alternative is one entry for every project on the machine:```bash
claude mcp add --scope user memorybank -- npx -y @maxweb4u/mcp-memorybank --root ./memory_bank


`--root ./memory_bank` resolves against the project directory, so one entry serves every project
that has a bank.

The catch is that a user-scoped server has no per-project off switch on the client side —
`disabledMcpjsonServers` governs `.mcp.json` entries and nothing else. So the server decides for
itself how much of a surface a project gets:

| The project | What it sees | Cost per request |
|---|---|---|
| has a bank | everything | ~7,000 tokens |
| has no bank | `bank_init`, and nothing else | ~450 tokens |
| is named by `--off`, or has a `.memorybank-off` file beside it | nothing at all | ~25 tokens |

The middle row is the one that makes a global install reasonable: a project that has never had a
bank pays about 7% of the full surface, and what it is offered — `bank_init` — is the only call
that would have made sense there anyway. Nothing needs configuring for this; it is what the server
does when the root holds no documents.

There are two ways to say "not here", and they differ in who owns the decision.

**`--off ` belongs to the machine.** Repeatable, and one path covers everything beneath it:```bash
claude mcp add --scope user memorybank -- npx -y @maxweb4u/mcp-memorybank \
  --root ./memory_bank --off /path/to/a/repo/you/do/not/govern

Nothing is written into the project it names — the path lives in the client's own config — so there
is no file to appear in that repository's git status and nothing for a colleague to find. That is
what makes it the right shape for a commercial repository someone else's team works in, and for a
project holding several banks at different depths: one path covers them all.

.memorybank-off belongs to the project. An empty file in the project directory, next to the
bank rather than inside it — keeping the server out is the project's decision, not the bank's:```bash
touch .memorybank-off


It travels with the repository, which is the point when the project itself means to say no, and the
reason not to reach for it when you would rather nobody knew.

The surface is decided once, when the session starts. The exception is `bank_init`: seed a bank in a
project that had none and the rest of the tools appear immediately, without restarting the session.

### Installing the command, wiring per project

The third form, and the one to prefer when several people or machines share the repositories.
Install once:```bash
npm i -g @maxweb4u/mcp-memorybank

Then each project that wants the server carries a six-line .mcp.json naming the command rather
than a path:```json
{
"mcpServers": {
"memorybank": {
"command": "mcp-memorybank",
"args": ["--root", "./memory_bank"]
}
}
}


This is the same file as at the top of this section with `npx -y @maxweb4u/mcp-memorybank` replaced
by the installed command. What that buys:

| | per project, via `npx` | user-scoped, everywhere | installed command, per project |
|---|---|---|---|
| a new project with a bank | one file | works by itself | one file |
| a project with no bank | ~450 tokens | ~450 tokens | **nothing at all** |
| a repository to stay out of | `.memorybank-off` | `--off ` | **add no file** |
| start-up cost | ~0.6 s of `npx` | ~0.6 s of `npx` | **~0.1 s** |
| an absolute path in git | no | no | no |
| works on a colleague's machine | yes | no | yes, after `npm i -g` |
| version | pinned in the file | pinned in the file | whatever is installed |

The third column is the only one where a project that will never have a bank costs nothing, and
where staying out of a repository needs no configuration anywhere — you simply do not add the file.
It pays for that with a manual step per project, and with the version being whatever `npm i -g` last
put there rather than a number written down.

The hook wants the same install, for a different reason — see hooks/README.md.

### From a clone

For working on the server itself, or for pointing several projects at one build:```bash
npm install && npm run build
node dist/cli.js --root /path/to/project/memory_bank

An .mcp.json written this way needs an absolute path to dist/cli.js, which ties the project to
one checkout on one machine. Fine while developing, wrong for anything you intend to keep.

npx does not work inside this repository. From the server's own checkout,
npx @maxweb4u/mcp-memorybank fails with sh: mcp-memorybank: command not found: npx sees that the
requested name matches the local package.json, decides the package is already present, and looks
for the binary in the local node_modules/.bin, where nothing links it. Nothing is wrong with the
published package — run the same command from any other directory and it works. So when you want to
check what users actually get, do it from a temporary directory, not from here.

Publishing a new version has an order that matters — what is verified on the tarball rather than the
working tree, and which pins move before the publish and which only after. It is written down in
releasing.md.

Telling the agent to use it

Wiring the server in makes the tools available; it does not make an agent reach for them. Left to
itself a model will often open README.md and walk the section indexes, because that is what it does
everywhere else — which is the exact walk this server exists to remove.

A paragraph in the project's CLAUDE.md settles it:```markdown

Memory bank

This project is served by the memorybank MCP server. Its tools all begin with bank_; load them
at the start of a session and look at what is there
— the set grows, and anything not named here
still exists. Working the bank through them instead of through sed, cat and grep is the point:
they keep the frontmatter, the section indexes and the ownership rules intact, which a shell cannot.

  • Finding. bank_route answers "which document covers this"; bank_search finds a literal
    across the bank; bank_read takes a path and a section, so a long document costs one section.
    Reach for those before grepping memory_bank/.
  • Changing. bank_edit replaces one exact fragment — a backlog row, a table cell, a heading.
    bank_update_section writes a whole named section. bank_set_status moves a document between
    draft, active and archived, and releases its canonical_for when it retires.
  • Creating. bank_create writes the frontmatter the contract asks for and registers the document
    in its section index in the same operation. A document written by hand is reachable from no index.
  • Checking. Run bank_validate before committing anything under memory_bank/, and say what it
    found. Never promote a note out of _inbox/ on your own — that is a review step for the owner.

This wording is not a matter of taste; it was measured. With no such paragraph the mechanism simply
sits there — nine hours of one working session with `bank_route` loaded and never called. An earlier
version of the paragraph named five tools explicitly and got exactly five tools used: the ones it
named, and nothing else. Naming the prefix and saying to go look, then grouping by job rather than
reciting names, brought in every tool the rewrite newly mentioned:```
                              baseline    five named    rewritten
writes into the bank, shell        20          0             0
bank_edit                           0         19            14
bank_route / bank_search            0/0        0/0           2/2
shell searches of the bank         18         11             8
bank_validate findings            3→5          6             0

The control makes the reason legible. A project given no CLAUDE.md at all still found the tool
family on its own — bank_edit thirty times, bank_create eighteen — and still made seven shell
writes into its own bank, every one of them shaped exactly like the tools it was already using. The
server is what makes a bank hold; instructions cannot check anything. The paragraph is what makes the
choice consistent. Neither substitutes for the other — see field-test.md.

Debugging from the terminal

The CLI is a read-mostly subset for looking at a bank without an agent in the loop, not a mirror of
the tool surface: bank_drift, bank_edit, bank_update_section, bank_set_status,
bank_set_field and bank_discard are MCP-only. Installed from npm the command is mcp-memorybank; from a clone it is
node dist/cli.js.```bash
mcp-memorybank --root <bank> --stats
mcp-memorybank --root <bank> --route "filter thresholds" --limit 5
mcp-memorybank --root <bank> --read domain/rules.md --section Thresholds
mcp-memorybank --root <bank> --validate --summary
mcp-memorybank --root <bank> --validate --rule broken-derived-from
mcp-memorybank --root <bank> --graph domain/rules.md --direction down --depth 1
mcp-memorybank --root <bank> --search "FT-042" --limit 5
mcp-memorybank --root <bank> --changed HEAD~5
mcp-memorybank --root <bank> --create adr/ADR-...-name.md --kind adr --title "..." --purpose "..." --derived ../engineering/architecture.md --dry-run
mcp-memorybank --root <new-path> --init "Project Name" --dry-run
mcp-memorybank --root <bank> --materialize-flows
mcp-memorybank --root <bank> --list-inbox
mcp-memorybank --root <bank> --promote _inbox/note.md --to engineering/thing.md --derived ../dna/principles.md --dry-run


## What is there

| Tool | What it does |
|---|---|
| `bank_route` | &quot;what should I read about this&quot; — ranks on `canonical_for`, `purpose`, `title`, section headings |
| `bank_read` | a whole document, one second-level section, or several documents in one call, under a byte budget |
| `bank_validate` | checks the bank against the rules the bank itself declares in `dna/` |
| `bank_graph` | walks `derived_from`: `down` — who depends on this (blast radius), `up` — what it is built on |
| `bank_drift` | pairs each document against the code it declares in `anchors:` and reports where the code is ahead |
| `bank_search` | full-text search over document bodies — identifiers, names, literals |
| `bank_changed` | what changed since a git ref or an ISO date; a ref older than the repository lands on its first commit, and a bank with no repository at all answers with everything |
| `bank_init` | creates a bank from nothing: skeleton, `dna/`, the flows, section indexes |
| `bank_materialize_flows` | copies the shipped document templates into the bank, which then owns them |
| `bank_create` | creates a document from the bank&#x27;s own template and registers it in the index, with gates and `_inbox` |
| `bank_edit` | replaces one exact fragment of a body — a table row, a step, a heading; refuses an ambiguous match |
| `bank_update_section` | writes the body of one named section of an existing document, leaving everything else alone |
| `bank_set_status` | moves a document to another lifecycle status, running the gates that guard activation |
| `bank_set_field` | changes one frontmatter value — `purpose`, `delivery_status`, `title` — in the quoting it had, carrying `purpose` and `title` into the index entry |
| `bank_promote` | moves a note out of `_inbox/` into a canonical layer, registering it and deleting the source |
| `bank_discard` | drops a quarantined note, on the record — `_inbox/` only, and a reason is required |

| Resource | Contents |
|---|---|
| `memorybank://index` | annotated index of every document (templates excluded) |
| `memorybank://schema/frontmatter` | the bank&#x27;s own `dna/frontmatter.md`, verbatim |
| `memorybank://health` | a fresh `bank_validate` run, grouped by rule |
| `memorybank://inbox` | what sits in quarantine, oldest first |

Prompts: `session-start` (what the project is, what is in flight, what is open — from the index and
the delta, not by reading everything), `route-then-read` (route first, read second),
`check-before-commit` (run validation and explain every finding), `record-adr` (assemble a decision
into an ADR), `review-inbox` (work through the quarantine).

Two of these exist because of what a working session actually did rather than what the design
expected. Over an afternoon an agent called `bank_read` zero times and `cat` in a shell loop 85
times: ten documents were ten tool calls one way and one call the other, so section scoping — the
feature that keeps large documents out of the context window — lost on arithmetic before it was
considered. Hence a `bank_read` that takes a list. And the first question of every session was
&quot;what is this, where did we stop, what is open&quot;, which routing does not answer; without somewhere to
send it, the agent read the whole bank. Hence `session-start`.

### Creating a bank```bash
mcp-memorybank --root &lt;new-path&gt; --init &quot;Project Name&quot;

Writes 24 files: dna/ (8 governance documents, including the layer table), the four flow
documents, an index for each of the eight seeded sections plus the root index, a pointer where the
templates would be, and two drafts — product/context.md and engineering/testing-policy.md —
which the templates and the feature closure gate both point at.

Three further sections — epics/, prd/, prompts/ — are not created in advance. bank_create
builds one, its index and its root-index entry the first time a document needs it, and says so.

The starter set lives in starter/ and belongs to the bank the moment it is copied: rewrite it
however you like, the server does not keep imposing it. What is not copied is
flows/templates/ — see What a seeded bank contains.

A freshly created bank validates with zero findings — which is the whole point of bank_init
rather than copying someone else's bank: a copy would bring that bank's defects along with it.

Templates and the quarantine

The mechanics of a write are under How it works; what follows is
where the content comes from and where an unreviewed note goes.

…(正文过长,页面只展示前面部分,完整内容见仓库)

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
Memorybank 怎么安装?

在客户端按下面的安装命令接入:{ "mcpServers": { "memorybank": { "command": "npx", "args": ["-y", "@maxweb4u/mcp-memorybank", "--root", "./memory_bank"] } } }。装完在客户端配置里引用同一个包或端点。

Memorybank 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Memorybank 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Memorybank 需要 API Key 吗?

资料没有标注鉴权方式,是否需要密钥取决于服务本身,接入前按官方文档确认。

Memorybank 支持哪些客户端?

资料标注支持 Claude Desktop、Claude、Cursor、VS Code、Codex、Zed;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Memorybank 能提供哪些能力?

资料显示能力标签包括 记忆。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 未标注。