Myco Brain

MCP文档知识

提供方 thegoodguysla · 包名 @mycobrain/mcp-server

文档知识 stdio · 本地进程 API Key 社区 / 第三方 Claude DesktopClaudeCursorWindsurf
查看接入方式

Myco Brain is a self-hosted, open-source (Apache-2.0) memory layer and MCP server for AI agents. Cross-session recall with a deterministic write path and source-backed answers (brain_why), on your own Postgres, no API keys to start. 11 brain_* tools; keyless semantic search via l

一句话选型结论

按资料字段整理

Myco Brain 属于文档知识类 MCP 服务器,stdio · 本地进程,API Key,可直接接入 Claude Desktop、Claude、Cursor 等,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

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

工具与能力

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

能力标签

支持客户端

适用场景

memoryknowledge graphpostgres

安装与配置

stdio · 本地进程 API Key
客户端在本机拉起子进程,数据不出本机
npx -y @mycobrain/mcp-server

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

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Cross-platform,再按安装命令拉取依赖。

  2. 2
    安装服务

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

  3. 3
    写入客户端配置

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

  4. 4
    验证是否可用

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

典型使用场景

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

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

知识库读写

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

内容整理

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

选择建议

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

值得选的地方

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

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 使用前要准备好API Key对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

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

不太适合

  • 完全不想在本地装环境的人。
  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Myco Brain当前 未标注 stdio · 本地进程 本地部署 有 未标注
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

服务器档案

文档知识
字段来自项目仓库与公开索引,中文说明由本站标注
提供方thegoodguysla上游标注的维护方 thegoodguysla
分类文档知识本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式API Key远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时@mycobrain/mcp-server · Cross-platform本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验未标注上游最后核验时间

详细介绍

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

Shared memory for your AI agents, on your own Postgres. Every fact keeps its source, a change supersedes the old fact instead of overwriting it, and each client's facts stay inside that client's boundary.

Memory for your agents in two commands```bash

npm install -g @mycobrain/mcp-server
mycobrain-setup memory


You need Node.js 20 or later. Setup asks a few questions, shows each file it is
about to change, and waits for a yes. It backs up every file it edits, writes no
secret into any of them, and finishes by writing one fact and reading it back.
`mycobrain-setup memory --uninstall` removes what it added.

- **Where the memory lives.** A local Postgres with pgvector: setup finds one on
  your machine or starts one in Docker. Or give it any Postgres connection
  string (Supabase, Neon, RDS, self-hosted) by reference, so the string never
  lands in your shell history.
- **Starter templates.** Agency, design studio, architecture or landscape firm,
  solo consultant, or `custom`, a short interview that writes a template for
  your own business. A template sets how clients are split into houses, the kinds
  of entities, and what is worth remembering.
- **Automatic in Claude Code and Codex.** Hooks recall the relevant facts at
  session start and before every prompt. A background worker reads each finished
  session and files the durable facts it finds.
- **Over MCP in Cursor, Windsurf and Claude Desktop.** These have no hooks, so
  they get an MCP server with two tools, `brain_memory_context` and
  `brain_memory_write`, and instructions that tell the agent to recall before it
  acts and to record what it learns.
- **Facts with a source, never overwritten.** Every fact records where it came
  from. A changed fact supersedes the old one, and `mycobrain-memory history`
  shows both and the reason.
- **Client boundaries, enforced in the database.** Houses keep clients apart, and
  only you create them. `mycobrain-memory binding add  --house `
  gives a contractor's agent one client and nothing else. Each tool gets its own
  credential, so you can see which tool wrote a fact and revoke one tool without
  touching the others.
- **No API keys.** The worker reads sessions with your own Claude or Codex
  subscription, through the `claude` or `codex` CLI you are already signed in to.
  Embeddings run locally with Ollama if you have it. Without Ollama, recall
  matches the words of your prompt, which works well for names, places and
  numbers.
- **Dream, off by default.** Turn it on and it proposes merges of duplicate
  facts, per-client dossiers and cross-client patterns. Nothing changes until you
  approve a proposal with `mycobrain-memory review approve`.

Check it at any time with `mycobrain-doctor --memory`. Walkthrough:
docs/memory-quickstart.md. Every command:
docs/memory-cli.md.

Before release we ran the documented commands from the packed npm tarball in a
fresh home directory, set up as a fictional landscape firm. A decision made in
the first session came back unprompted in the third. A change superseded the old
fact and kept its history. An agent scoped to one client found nothing from
another. With the database stopped, sessions still started and a write was
queued and delivered later. Uninstall put the config files back byte for byte.

## The document engine (optional)

The engine is the part of Myco Brain that came first: ingest documents, repos and
chat exports, search them, build a knowledge graph, and trace every answer to the
document it came from. It runs as a Docker stack, next to the memory layer or on
its own. Add it when you want answers from your documents, not only the facts
your agents record. Most of what follows is about the engine.

- **Source-traceable.** Every fact traces to the document it came from (`brain_why`) — no trust-me summaries.
- **Trust that compounds.** Independent corroboration _raises_ a fact's confidence; a contradiction _supersedes_ it — kept and audited, never silently overwritten.
- **Keyless & local-first.** Full-text + semantic search and the knowledge graph all run with zero hosted dependency — add an Anthropic key only for the most accurate graph.
- **Yours.** Apache-2.0, plain Postgres tables, 13 engine MCP tools. Works with Claude, Cursor, Windsurf, Continue, Zed.

**Who it's for:** **dev teams** running agents that need one shared memory · **agencies** needing hard per-client isolation · **anyone** who wants their assistant to remember across sessions — import your ChatGPT / Claude history (from your data export) and your AI knows you on day one.

The usual fix for agent amnesia — letting an LLM maintain its own memory —
fills it with duplicates, hallucinated summaries, and confident answers nobody
can trace. Myco Brain is built on the opposite contract:

> **The LLM proposes. Deterministic rules decide what becomes a fact. You set
> the bar** — from corroboration-gated auto-promotion (the default) to strict
> human review of every fact (`BRAIN_REQUIRE_HUMAN_REVIEW=1`).

Claude, Cursor, Windsurf, Continue, Zed, and custom agents all share one memory
backed by your own Postgres.

⭐ If the trust model resonates, a star helps others find it.```bash
# 1. Boot the stack (Postgres + MCP server + extraction worker)
git clone https://github.com/thegoodguysla/myco-brain.git && cd myco-brain
docker compose up -d

# 2. Give your agent a memory — point it at any repo or folder
#    (no env needed: it finds the quickstart stack on localhost)
npx -y -p @mycobrain/mcp-server mycobrain-ingest github:your-org/your-repo

# 3. Connect your client (one-liner below), then ask across sessions:
#    "what did we decide about auth, and where is that documented?"
#    → answered from your docs, with the source cited.

> [!TIP]
> Zero API keys, all the way down. Full-text search, semantic search (local
> embeddings), and the knowledge graph (local extraction) all run with no hosted
> dependency. Add an Anthropic key only if you want the most accurate graph.

MCP-native by design — your agent knows when to use memory, not just how.
Most MCP servers expose tools and hope the model calls them. Myco ships a usage
contract over MCP's instructions channel: the moment it connects, your agent
knows to pull context before a task, save durable decisions, and cite sources
with brain_why — no per-project prompting. Tune the policy in one copy-paste
block: Teach your agent to use it well.

Quick links:
Memory in two commands ·
Engine quickstart ·
Teach your agent to use it well ·
The trust engine ·
Benchmark — run it yourself ·
Run every proof ·
Who it's for ·
Environment variables ·
Architecture ·
Roadmap ·
Cloud waitlist

Memory that gets more trustworthy (compounding confidence)

Most agent memory overwrites facts silently. Myco Brain compounds them:

  • An independent source agreeing with a fact raises its confidence
    (damped noisy-OR — ten chunks of one document corroborate nothing; only
    distinct sources count).
  • A confident contradiction on a single-valued relationship (who you work
    for
    , where something is located) supersedes the old fact: it's
    closed and weakened — kept, never deleted — with the supersession
    recorded in an audited claims ledger.
  • Ask brain_why about any fact and you get its distinct source count (per
    relationship, not per mention), its confidence trend over time ("0.8 → 0.86"),
    and any superseded history.
    Contradictions stay visible. Your memory can't gaslight you.```text
    works for → Halcyon Labs 0.55 [SUPERSEDED — kept, not deleted]
    works for → Driftwood Analytics 0.90 [ACTIVE]
    claims ledger: old fact superseded_by → new fact (audited)

*Proof: `npm run test:compounding` — the full lifecycle runs against a live
database in seconds, no LLM required.*

## The schema evolves with your data (dynamic schema)

- The extraction worker notices entity kinds and relationship types your catalog
  doesn't have yet and **proposes** them (`brain_stats`: *"Brain proposed 3 new
  types from your data"*).
- **Promotion is yours by default** — or opt into auto-promotion for types
  corroborated across enough **distinct source documents**
  (`BRAIN_SCHEMA_AUTO_PROMOTE=1`), counted per document, not per mention, so two
  documents passed back and forth can't manufacture consensus. One chatty
  document can never promote anything.
- A promoted type stays **scoped to the workspace that earned it** — one client's
  vocabulary never leaks into another's catalog (see
  per-client isolation).

*Proofs: `npm run test:dynamic-schema`, `npm run test:schema-promotion`.*

**You pick the trust dial:**

| Mode | Behavior |
|---|---|
| Default | Confident facts auto-promote; novel types wait for review |
| `BRAIN_REQUIRE_HUMAN_REVIEW=1` | **Strict curation** — nothing the LLM proposes touches the canonical graph without a human decision |
| `BRAIN_SCHEMA_AUTO_PROMOTE=1` | Corroborated new types promote themselves, audited |

When something is waiting on you — novel types in default mode, or everything
in strict mode — review it from the command line:```bash
mycobrain review                 # list pending entities, relationships, types
mycobrain review approve <id>    # promote it into the graph
mycobrain review reject  <id>    # reject it (kept and audited, never deleted)

Proof: npm run test:review — approving actually lands the entity / edge /
type in the canonical graph; rejecting never does.

Private memories, shared knowledge

Multi-agent teams get real isolation: documents marked private are readable
only by the agent that created them — enforced in every read tool, on top
of workspace row-level security. Workspace memory stays shared. Proof:
npm run test:sharing (a two-agent visibility matrix).
Like workspace
isolation, it binds only under the least-privilege brain_app role
(security note).

One isolated workspace per client — built for agencies

Put each client in their own workspace, share one agency-wide playbook, and
the guarantee you sell is Postgres row-level security — a session scoped
to Client A cannot return Client B's rows. The
agency starter kit provisions it (one command) and ships
the least-privilege DB role that makes the isolation actually bind. Proof:
npm run test:agency — Client A sees zero of Client B's facts.

> [!IMPORTANT]
> Isolation binds only under the least-privilege role. RLS does not constrain
> a Postgres superuser, and the zero-config quickstart's default brain role
> is a superuser (fine for a single-workspace self-host — there's nothing to
> isolate). Before you put more than one client in one database, run the app as
> the NOSUPERUSER brain_app role the agency kit ships; mycobrain-doctor
> flags a superuser connection. Multi-tenant isolation is a guarantee of
> brain_app, not of the default quickstart role.

Advanced — multi-tenant gateways: who is the caller? (BRAIN_TRUST_REQUEST_IDENTITY)

RLS decides which rows a tenant can read; this setting decides which tenant a
request is
— the step before RLS. On the stdio server, identity is taken
only from the server's environment by default: a workspace_id, agent_id,
or api_key supplied in tool-call arguments is ignored, so even a
prompt-injected agent can't pass workspace_id: "" to reach
another workspace. (For brain_ keys, identity comes from the key string and
nothing else.)

Set BRAIN_TRUST_REQUEST_IDENTITY=1 only when you front the server with a
real multi-tenant gateway that authenticates each request and maps it to a
tenant itself — then per-request identity is honored (and a service-role JWT
must equal BRAIN_SERVICE_ROLE_KEY, not merely look like one). Single-tenant
self-hosts need none of this
— their identity is already environment-derived.

Query over HTTP (read-only)

Not everything speaks MCP. For a web app, an automation, or a partner backend,
mycobrain-rest puts a small read-only API in front of the brain — exactly two
tools, search and why, plus health:```bash
mycobrain-rest # → http://127.0.0.1:8787

curl -s localhost:8787/search \
-H "Authorization: Bearer brain_<ws><agent><secret>" \
-d '{"query":"what did we decide about pricing?","limit":5}'


- **Scoping:** the key scopes every query to its workspace (same RLS as MCP), and
  there are **no write routes**. Like MCP, this binds only under the least-privilege
  `brain_app` role (security note) —
  never expose REST as the default `brain` superuser (`mycobrain-doctor` flags it).
- **Key verification:** installs migrated to `…_agent_api_key_verification.sql`
  verify each key&#x27;s `` against `agent_api_keys` once a secret is registered
  (register/rotate via `brain_set_agent_api_key_secret(...)`). Until then the key
  acts as a bearer token; set `BRAIN_REQUIRE_API_KEY_SECRET=1` to require a
  registered secret before exposing REST.
- **Binding:** loopback by default — set `BRAIN_REST_HOST=0.0.0.0` behind your own
  TLS/proxy only when you mean to expose it, and treat the key like a password.

*Proof: `npm run test:rest`.*

## Five Verified Demos

### 1. Cross-session recall

Save a fact in one conversation:```text
Save a memory: the board meeting is every Wednesday at 9 AM Pacific.

Start a fresh conversation and ask:```text
What time is the board meeting?


Expected result: the new session retrieves the stored fact instead of relying on chat history.

### 2. Cross-agent shared memory

Write from one client:```text
Save a memory: Acme&#x27;s renewal call is on October 15 with Jordan.

Read from another client:```text
What is Acme's renewal date?


Expected result: both clients read the same shared memory because the source of truth is Postgres, not a single chat thread.

### 3. Provenance for answers

Ask `brain_why` about any fact and get the source chain — not a trust-me summary.
Real output for an entity built from the demo corpus:```json
{
  &quot;subject&quot;: { &quot;kind&quot;: &quot;entity&quot;, &quot;name&quot;: &quot;Mara Quinn&quot; },
  &quot;evidence&quot;: {
    &quot;mention_count&quot;: 4,
    &quot;source_document_count&quot;: 4,
    &quot;summary&quot;: &quot;Supported by 4 mentions across 4 source documents.&quot;
  },
  &quot;source_proposals&quot;: [
    { &quot;extracted_by&quot;: &quot;ollama:llama3.2:3b&quot;, &quot;confidence&quot;: 1, &quot;state&quot;: &quot;auto_promoted&quot;,
      &quot;source_hyobject_id&quot;: &quot;8e31414c-…&quot; }
  ]
}

Every accepted fact traces to the document(s) it came from and how it was extracted.

4. Document ingestion with sources

Ingest a file or URL:```text
Ingest ./docs/customer-handbook.pdf and summarize the onboarding checklist with sources.


Expected result: the document is chunked, indexed, and cited back through retrieval.

### 5. Graph relationships

Ask:```text
Show related entities for Acme and explain how they connect.

Expected result: relationship queries surface connected people, documents, and entities — and the entity-to-entity edges the extraction worker builds (e.g. Mara Quinn —manages→ Northwind Coffee) — instead of flat vector matches. Build this graph locally with Ollama, no API key required.

> All demos are code, not screen recordings — demos/ re-renders them
> deterministically against a fresh stack (npm run demo:render -- all).

How Myco compares

Different tools make different tradeoffs; this compares architectural
approaches, not benchmarked head-to-heads — when retrieval recall is high
the answer model becomes the bottleneck, so cross-system score comparisons
mislead (see the benchmark section).

Typical LLM-maintained memory Framework memory (e.g. LangChain) Myco Brain
Reproducible benchmark Self-reported — Harness ships in-repo — reproduce the number yourself
Fact extraction LLM-based LLM-based Deterministic write path; LLM output enters only via gated proposal queues
Contradicting facts Coexist as independent records Possible Superseded, never overwritten — audited claims ledger
Fact confidence Static — Compounds with independent evidence, falls on contradiction
Hallucinated facts Possible Possible Constrained out of the write path
Provenance Partial Partial First-class via brain_why (source + audit trail + confidence trend)
Shared memory Depends on app wiring Depends on app wiring Native Postgres source of truth, multi-agent with per-object privacy
Data portability Vendor / framework shaped Framework shaped Plain Postgres tables

Get Started In Under 10 Minutes

The document engine. Verified local path: Docker Compose from a fresh clone. (For
memory alone you need none of this; see
Memory for your agents in two commands.)```bash
git clone https://github.com/thegoodguysla/myco-brain.git
cd myco-brain
docker compose up -d


What starts:

- Postgres 16 + pgvector
- MCP server
- Extraction worker

No API keys required to boot — here&#x27;s what each capability needs:

| Capability | Out of the box? | To enable |
|---|---|---|
| Full-text (BM25) search | ✅ immediately | nothing |
| Semantic search | needs embeddings | `BRAIN_EMBED_PROVIDER=ollama` (local, keyless) |
| Knowledge graph | needs an extractor | Ollama locally (keyless) or `BRAIN_ANTHROPIC_API_KEY` (most accurate) |

Confirm it&#x27;s healthy in one command. `mycobrain-doctor` doesn&#x27;t just check that
env vars are set — for the local Ollama path it **live-verifies** the setup (pings
Ollama, confirms the embed/extraction models are pulled, and runs a real embed +
generation), then checks the extraction backlog and review queue. It exits
non-zero only on a real failure (a red line), so green means it works:```bash
npx -y -p @mycobrain/mcp-server mycobrain-doctor

Add --fix to have it offer to pull any missing Ollama models for you:```bash
npx -y -p @mycobrain/mcp-server mycobrain-doctor --fix


### Connect your client

**Recommended — guided setup.** One command walks you through connecting an
agent, with consent at every step:```bash
npx -y -p @mycobrain/mcp-server mycobrain-setup

It runs pre-flight checks (each with an offered fix), verifies pgvector and a
real write to your database, wires up your MCP client (Claude Code, Claude
Desktop, Cursor, Codex, Windsurf), and offers a one-tap import of your ChatGPT
or Claude data export if the zip is already in ~/Downloads. Each connected
client gets its own agent identity, so later recalls show which tool a memory
came from. Prefer to drive it yourself? The manual paths are below.

Claude Code — by hand (uses the quickstart stack's seeded, public localdev
credentials):```bash
claude mcp add myco-brain \
--env DATABASE_URL=postgresql://brain:brain@localhost:5432/brain \
--env BRAIN_API_KEY=brain_00000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-0000000000a1_localdev \
-- npx -y @mycobrain/mcp-server


Restart Claude Code and the `brain_*` tools are live — the server hands every
connected agent its usage contract automatically (when to recall, save, and
cite), so it works well out of the box.

**Claude Desktop** — add this to
`~/Library/Application Support/Claude/claude_desktop_config.json`
(**Cursor** and **Windsurf** take the same `mcpServers` block in
`.cursor/mcp.json` / their MCP settings):```json
{
  &quot;mcpServers&quot;: {
    &quot;myco-brain&quot;: {
      &quot;command&quot;: &quot;npx&quot;,
      &quot;args&quot;: [&quot;-y&quot;, &quot;@mycobrain/mcp-server&quot;],
      &quot;env&quot;: {
        &quot;DATABASE_URL&quot;: &quot;postgresql://brain:brain@localhost:5432/brain&quot;,
        &quot;BRAIN_WORKSPACE_ID&quot;: &quot;00000000-0000-0000-0000-000000000001&quot;,
        &quot;BRAIN_API_KEY&quot;: &quot;brain_00000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-0000000000a1_localdev&quot;
      }
    }
  }
}

> Note: BRAIN_WORKSPACE_ID is derived from your brain_ API key, so it is
> optional — the Claude Code one-liner above omits it and works the same.

Then test the happy path:```text
Save a memory: the launch checklist lives in the ops folder.


Open a new session and ask:```text
Where does the launch checklist live?

Full setup guide: docs/quickstart.md

First run — the fastest path to your magic moment

Myco ships empty. The "whoa" lands hardest on your own data, so the
recommended first step is to bring your history in:```bash

Guided getting-started — leads with importing your own history

npx -y -p @mycobrain/mcp-server mycobrain-onboard
``````bash

Import your ChatGPT or Claude export (~30s), then ask your agent about your past

mycobrain-ingest --from chatgpt-export ~/Downloads/<your-export>.zip
mycobrain-ingest --from claude-export ~/Downloads/<your-export>.zip

→ "what did I decide about <topic>?" answered from your own conversations.


Prefer to skip it? Just start using it — Brain remembers as you work. Or take a
**60-second live tour** on sample data that cleans up after itself (your
workspace is left untouched):```bash
mycobrain-onboard --tour

See it work with the demo corpus (optional sandbox)

Want a richer guided example? Load the included demo corpus — a small set of
interconnected documents for a fictional agency and its client:```bash
npx -y -p @mycobrain/mcp-server mycobrain-ingest ./examples/demo-corpus


Then ask any connected agent:

- *&quot;When does Northwind&#x27;s rebrand launch, and who owns the account?&quot;*
- *&quot;What pricing model did we choose for Northwind, and why?&quot;*
- *&quot;Show me the source for that.&quot;* — provenance via `brain_why`
- *&quot;Show my Myco memory stats.&quot;* — health snapshot via `brain_stats`

Every answer traces back to the document it came from. No API key required.

**The finale:** the corpus contains a deliberate contradiction — one document
says Devin Osei works for Lumen, a later one says he left for Harbor &amp; Co.
With the keyless local graph
running, ask:

- *&quot;Who does Devin Osei work for? What changed, and how do you know?&quot;*

The old fact comes back **superseded — kept, not deleted** — with both source
documents cited. That&#x27;s the trust engine working on your data, not a demo
script.

Done exploring? Clear *only* the bundled sample data (your own imports and
memories are never touched) with:```bash
mycobrain-onboard --reset-demo

Bulk-ingest a folder or repo

Point Brain at a directory or a GitHub repo and it indexes every text file —
searchable across sessions, with each answer traceable to its source file.```bash
npx -y -p @mycobrain/mcp-server mycobrain-ingest ./docs # a local folder
npx -y -p @mycobrain/mcp-server mycobrain-ingest github:owner/repo # a GitHub repo


No env needed against the quickstart stack — the CLI defaults to it. For your
own Postgres or workspace, set the same env vars the MCP server uses
(`DATABASE_URL`, `BRAIN_WORKSPACE_ID`, `BRAIN_API_KEY`).

Then ask any connected agent: *&quot;search my ingested files for the auth flow&quot;* or
*&quot;show my Myco memory stats&quot;*. Set `GITHUB_TOKEN` for private repos.

## Build the knowledge graph — locally, no API keys

What separates Myco from a vector store is the **graph**. The extraction worker
reads your ingested documents and:

- pulls out the **entities** — people, companies, projects, places;
- **collapses duplicates** so &quot;Priya&quot; and &quot;Priya Raman&quot; become one node;
- connects them with **directed relationships** — *Mara Quinn —works for→
  Northwind Coffee*, never the reverse (the shipped prompt is direction-aware,
  and endpoints the model forgets to list are recovered automatically);
- and **proposes new types** it observes, so the schema grows with your domain.

You choose which model does the extraction. **Nothing leaves your machine with
Ollama; Anthropic produces the most accurate graph.**

Two distinct, often-conflated quality measures on the 14-edge gold fixture
(*proof: `npm run test:direction`*):

| Metric | What it measures | Score |
|---|---|---|
| **Directed accuracy** | edges point the right way | **86%** (12/14, `llama3.2:3b`) |
| **Edge survival** | endpoints recovered, not dropped | **~80%** (11–12/14, gated ≥75%) |

### Option A — Local &amp; free (Ollama, no API key)```bash
# Install Ollama (https://ollama.com/download), then pull a model:
ollama pull llama3.2:3b

# Point the worker at it and restart:
echo &quot;BRAIN_OLLAMA_BASE_URL=http://host.docker.internal:11434&quot; &gt;&gt; .env
docker compose up -d

Option B — Most accurate (Anthropic, bring your key)```bash

echo "BRAIN_ANTHROPIC_API_KEY=sk-ant-..." >> .env
docker compose up -d


If both are configured, Anthropic is used automatically (it&#x27;s more accurate);
force a choice with `BRAIN_EXTRACTION_PROVIDER=ollama|anthropic`.

### Try it

Ingest a few documents, give the worker a moment, then ask a connected agent:

- *&quot;What entities are in my Northwind documents?&quot;* — `brain_neighbors`
- *&quot;How does Mara Quinn connect to Northwind?&quot;* — entity-to-entity relationships
- *&quot;Show my Myco memory stats.&quot;* — watch the graph grow (`brain_stats`)

Either way, the canonical graph lives in your Postgres — the model only
*proposes*; the database decides what becomes a durable fact.

## Benchmark — run it yourself

The point here is **reproducibility, not a single score** — the
LongMemEval harness ships in this
repo, so you run the numbers yourself; we don&#x27;t assert them.

| Metric | Subset (500q) | Config | Score |
|---|---|---|---|
| End-to-end QA | `oracle` | reader gpt-4o-mini · judge gpt-4o | **73.6%** |
| End-to-end QA | `oracle` | strong reader (gpt-4o) | 71.8% |
| Evidence recall@5 (`Ev@5`) | `longmemeval_s` | hybrid (vector + BM25) | **89.2%** |
| Evidence recall@5 (`Ev@5`) | `longmemeval_s` | keyless recency reranker | **91.6%** |
| Evidence recall@10 | `longmemeval_s` | hybrid → recency | 90.2% → 93.2% |

**End-to-end QA** uses the `oracle` subset, which hands the reader only the gold
evidence sessions — so it isolates *reasoning*, not retrieval (that&#x27;s `Ev@5`,
below). The strong-reader config scores *lower* (gpt-4o, 71.8%): with the evidence
already in context the memory layer is saturated, so the reader isn&#x27;t the binding
constraint — exactly why single-headline comparisons across systems mislead.
Numbers others quote in the ~90% range are typically a different subset, reader,
and judge; we&#x27;re not claiming a head-to-head win, just handing you the harness to
score any system on the same footing.```bash
cd evals/longmemeval &amp;&amp; python3 -m venv .venv &amp;&amp; .venv/bin/pip install -r requirements.txt &amp;&amp; cd ../..
OPENAI_API_KEY=sk-... DATABASE_URL=postgresql://brain:brain@localhost:5432/brain \
  evals/longmemeval/.venv/bin/python3 -m evals.longmemeval.run \
  --examples 500 --subset longmemeval_oracle --judge-model gpt-4o

Retrieval quality (Ev@5 in the table) is the real retrieval metric — the
oracle subset above doesn't test it — measured on the full longmemeval_s
subset with distractors. The recency reranker (brain_search(reranker: &#x27;recency&#x27;)) is deterministic: no API key, no network call. Hybrid retrieval needs
an embedding provider (keyless via local Ollama, or OpenAI); stock BM25-only
search scores lower. Reproduce (embeddings only, no judge):
python -m evals.longmemeval.run --subset longmemeval_s -n 500 --no-qa.

Methodology, both configs, per-category breakdown (including the categories
that are hard for us — reported, not hidden), and cheaper sample commands:
evals/longmemeval/README.md.

Every claim has a check

Nothing on this page asks for your trust — each capability names the runnable
proof that gates it in development. (Run the npm run and node test/ checks
from mcp-server/ after npm install; node examples/ and evals/ paths are
relative to the repo root.)

Claim Check
Quickstart works end-to-end node test/quickstart-e2e.mjs (also runs in CI against the real Docker stack)
Duplicates can't happen; provenance is total node examples/benchmark/run.mjs
Keyless semantic search finds meaning, not words npm run test:local-embeddings
Relationships are direction-aware; edges survive npm run test:direction
Confidence rises with evidence, contradiction supersedes npm run test:compounding
New types are proposed (and auto-promote only when corroborated + opted-in) npm run test:dynamic-schema · npm run test:schema-promotion
Strict curation mode blocks all auto-promotion npm run test:strict-mode
Private documents are private npm run test:sharing
All 15 tools fit in your context (~4.0K tokens; ~1.5K for the 2 memory-only tools) npm run audit:tokens
Agency: Client A can't read Client B (workspace RLS) npm run test:agency
Reviewing a proposal actually promotes/rejects it npm run test:review
Read-only REST API: auth, read-only, DoS-capped npm run test:rest
The benchmark number evals/longmemeval/ (full harness in-repo)

Who it's for

Myco is the memory layer for any team whose AI agents need to remember, with
receipts. Each page below reframes it for your audience and walks the same use
cases across industries (FinTech, Healthcare, Legal, Accounting, Insurance,
SaaS, customer support, e-commerce).

  • Developers building agents for production: one MCP server, a deterministic write path, and provenance you own.
  • Vibecoders shipping fast: persistent memory in one line, keyless and free, with no infra to build.
  • Teams putting AI in a product: customer memory, isolated per tenant, on Postgres you own.
  • Agencies: every client in an isolated, auditable workspace.

Architecture

The design is simple on purpose: the database is authoritative, the write
path is programmatic, and LLMs assist without becoming the memory store.

Tool Surface

The MCP server lists 15 tools with the engine configured, and 2 when it runs
memory-only (what mycobrain-setup memory writes for Cursor, Windsurf and
Claude Desktop).

Memory tools:

  • brain_memory_context
  • brain_memory_write

Engine tools:

  • brain_context_pack
  • brain_search
  • brain_why
  • brain_neighbors
  • brain_ingest
  • brain_propose_fact
  • brain_annotate
  • brain_save_memory

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

常见问题

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

在客户端按下面的安装命令接入:npx -y @mycobrain/mcp-server。对应的包名是 @mycobrain/mcp-server。装完在客户端配置里引用同一个包或端点。

Myco Brain 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Myco Brain 收费吗?

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

Myco Brain 需要 API Key 吗?

资料标注需要API Key认证,使用前准备好对应凭据,并按最小权限配置。

Myco Brain 支持哪些客户端?

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

Myco Brain 能提供哪些能力?

资料显示能力标签包括 memory、knowledge graph、postgres、developer tools。具体工具清单以官方文档为准。

Myco Brain 需要什么运行环境?

运行时为 Cross-platform;属于本地进程,需要在本机装好运行环境。

Myco Brain 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

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

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