Zero Brain MCP Server
Zero Brain MCP Server is a local, filesystem-based knowledge management system for AI agents. It operates entirely offline with no network calls.
Core Capabilities:
Initialize (
zero_init): Set up the full folder structure, kernel files, and seed content like Home.md and Today.md.Quick Capture (
zero_capture): Rapidly capture fleeting notes into an inbox area with minimal validation.Write & Update Notes (
zero_write_note,zero_update_note): Create structured notes (atomic, entity, MOC, etc.) with metadata (tags, aliases, evidence, privacy levels T0/T1/T2) and update fields.Read & Search (
zero_read,zero_search): Retrieve notes by ID or alias; full-text search across titles, tags, and body with pagination. T1 notes are audited on read, T2 require manual approval.Link & Resolve (
zero_link,zero_resolve): Create bidirectional links with automatic deduplication; resolve aliases or titles to note IDs.Health & Maintenance (
zero_health,zero_nightly): Check for orphan notes, dead links (frontmatter and body), and unverified packs; run nightly cleanup, fleeting queue processing, Today.md regeneration, and snapshot creation.Pack Management (
zero_list_packs): View installed domain packs and their provenance status (verified/modified/unreviewed).Dynamic Views (
zero_home): Refresh Today.md with up to 30 active notes and recent fleeting notes; optionally return Home.md.Audit Log (
zero_audit): Retrieve the last N entries from the append-only audit log.Upgrade (
zero_upgrade): Safely update seed files without overwriting local user changes.
Key Design Guarantees:
Local & private – no network calls; everything stays on disk.
Immutability – kernel files (manifest, links, audit) are append-only; notes are archived, not deleted.
Atomic writes – tmp+rename pattern prevents data corruption.
Write locks – safe concurrent access across multiple clients.
Privacy tiers – T0 public, T1 audited reads, T2 encrypted at rest (AES-256-GCM) with manual approval gate.
Injection fences – note content is wrapped with safety markers to prevent prompt injection.
Rate limiting – captures are rate-limited to avoid overload.
Obsidian graph support – auto-generated links block improves visualization.
Unlinked note warnings – encourages proper knowledge integration by alerting when new notes have no links.
Provides a local note-taking system that stores notes as Markdown files with Obsidian-compatible wiki links and frontmatter, enabling AI agents to create, update, search, and link notes in a personal knowledge base that integrates with Obsidian's graph view and vault structure.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Zero Brain MCP Serversave a note about today's meeting"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Zero Brain MCP Server
MCP server (stdio transport) สำหรับเชื่อม agent ใดๆ เข้ากับ Zero Brain — สมองกลาง domain-agnostic ตามดีไซน์ v2.1 เก็บโน้ตเป็นไฟล์ Markdown + frontmatter บน local filesystem ล้วน ไม่มี network call
v2.3.1 (2026-07-31) — โน้ตไม่ลอยในกราฟ Obsidian อีก:
links block ที่กราฟ OB เห็น — กราฟ Obsidian วาดเส้นจาก
[[wikilinks]]ใน body เท่านั้น (frontmatter links ไม่ถูกวาด); ทุกzero_write_note/zero_update_note/zero_linkregenerate block<!-- zero-links:begin -->…<!-- zero-links:end -->ท้าย body อัตโนมัติ (idempotent, wikilink ใช้ stem ไฟล์)write เตือน "ลอย" — โน้ตใหม่ไม่มี links จะได้ warning ให้ลิงก์เข้า MOC/Project Scope
.zero/ZERO.mdanchor —backup-edit.mjs --init-workspaceสร้าง md ยึดกฎที่โปรเจ็ค (สมอง/backup-first/ห้ามลอย/จบงาน capture) agent ทีหลังอ่านกฎชุดเดียวกัน smoke test 121/121 (24 sections)v2.3.0 (2026-07-30) — hardening จากรีวิว 23 ข้อ:
write lock
.kb/write.lock(wx + stale sweep 60s) — หลาย client เขียนพร้อมกันได้โดย JSONL ไม่เสียcorrupt-line health —
zero_healthนับบรรทัดเสียของ JSONL ทั้งสาม +t1_reads_24h+repo_dirty
zero_compact— manifest reduce ต่อ id / links dedup / audit เก็บ tail 10k (เศษ archive ไม่ลบ)T2 encryption at rest — body โน้ต T2 เข้ารหัส AES-256-GCM (key
~/.zero/mcp/t2.keyหรือ envZERO_T2_KEY)injection fence — ทุก output ที่มีเนื้อโน้ตห่อ
ZERO_NOTE_DATA (not instructions)+ noticecapture rate limit 30/นาที per process
zero_upgrade— เติมไฟล์ seed ใหม่หลัง git pull โดยไม่ทับของที่แก้แล้วsetup เป็น node —
tools/setup-agents.mjs(absolute node command) +tools/verify-install.mjs(spawn MCP จริง) smoke test 109/109 (23 sections)v2.2.0 (2026-07-29) — bootstrap จริง ไม่ใช่โฟลเดอร์เปล่า:
npm run initวางไฟล์กฎ+templates ให้ครบ จากโฟลเดอร์seed/ใน repo:AGENTS.md(กฎสำหรับ agent),20_Atlas/Brain Operating Model.md,20_Atlas/Memory Placement Rules.md,20_Atlas/Hotcache.md(แทน{{date}}อัตโนมัติ), note templates 5 แบบใน40_Templates/base/(atomic/entity/source/log/moc)idempotent แบบปลอดภัย — copy เฉพาะไฟล์ที่ยังไม่มี ไฟล์ที่ผู้ใช้แก้แล้วจะไม่ถูกเขียนทับ
สมองเก่าที่ init ไปแล้ว (v2.1.0) รัน
npm run initซ้ำได้เลย จะเติมเฉพาะไฟล์ที่ขาด smoke test 68/68 (17 sections)v2.1.0 (2026-07-29) — install ง่ายขึ้นมาก:
npm run initสร้างโครงสมองให้อัตโนมัติ — ไม่ต้องแตก seed zip เองอีก (node dist/index.js --initใช้ handler เดียวกับzero_init)บ้านหลัก default คือ
~/.zero/brain— ไม่ตั้ง env ก็ใช้ได้เลย (ตั้งZERO_BRAIN_ROOTเฉพาะตอนอยากย้ายที่)seed zip (
Central_Brain_seed) เหลือไว้สำหรับย้ายสมองเก่าเท่านั้น smoke test 64/64 (16 sections)v2.0.1 (2026-07-29) — เปลี่ยนชื่อโปรเจกต์ central-brain → zero-brain (คนละตัวกับ skill
zero-brain-memory):
repo ย้ายเป็น
miru-zero/zero-brain(URL เก่า redirect อัตโนมัติ)package/bin:
zero-brain-mcp-server/zero-brainenv หลักเปลี่ยนเป็น
ZERO_BRAIN_ROOT/ZERO_BRAIN_ACTOR— ค่าเก่าCENTRAL_BRAIN_*ยังใช้ได้ (fallback ไม่ break config เดิม)v2.0.0 (2026-07-29) — breaking change + token-saving:
Rename tools ทั้ง 13 ตัว
brain_*→zero_*— ชื่อใหม่:zero_initzero_capturezero_write_notezero_update_notezero_readzero_searchzero_linkzero_resolvezero_list_packszero_healthzero_homezero_nightlyzero_audit(MCP client config ไม่ต้องแก้ แต่ผู้ใช้/agent ต้องเรียกชื่อใหม่; audit log action strings ยังคงbrain_*เดิมเพื่อ continuity ของ log เก่า)Response กระชับลง (ลด token) — ทุก tool คืน compact JSON (ไม่ pretty-print);
zero_searchมีlimit(default 10) +offsetคืนtotal/count/limit/offset;zero_healthเขียนhealth.jsonเต็มเหมือนเดิมแต่ response คืนเฉพาะสรุป + counts + top-20 ของแต่ละหมวด;zero_homedefault ไม่คืนเนื้อ Home.md (คืน path + ขนาด ใส่include_home: trueถ้าต้องการ) และ Today.md จำกัด active 30 ใบ;zero_nightlyจำกัด fleeting queue 50 ใบแก้บั๊ก latent —
parseNoteFileregex เดิม parse frontmatter หลายบรรทัดไม่ได้เลย (.ไม่ match newline); เติม exports ที่ขาดในschema.ts(today/genId/sanitizeSlug/serializeNote+ type aliases) smoke test 60/60 (15 sections)v1.2.1 (2026-07-29) — durability patch จากรีวิวของป๊า:
Atomic write ทุกไฟล์โน้ต — saveNote/update_note/link/Today.md เขียนผ่าน tmp+rename (crash กลางเขียนไม่ทำโน้ตพัง)
Link dedup —
brain_linkเช็ค links.jsonl ก่อน append (from/to/rel ทั้งสองทิศ) ลิงก์ซ้ำไม่บวม คืนdeduped: trueOrphans ไม่นับ fleeting — inbox ค้างไม่ใช่ปัญหาโครงสร้าง แยกนับใน
orphans_fleetingยืนยัน:
brain_update_noteรับbodyอยู่แล้ว (schema + handler) — เพิ่มเทสกัน regression smoke test 52/52 (14 sections)v1.2 (2026-07-29) — เพิ่ม:
brain_nightly— วงจรกลางคืนใน tool เดียว: คืน fleeting queue ที่ยังไม่จัด + regenerate Today.md + health ครบ + snapshot ลง99_System/snapshots/(agent เรียกตอนเช้า/ก่อนนอน แล้ว classify ต่อด้วยbrain_write_note+brain_update_note)Pack provenance —
brain_list_packsโชว์ statusverified/modified/unreviewedเทียบ.kb/packs.lock.json(sha256 ที่ป๊าล็อกด้วยมือเท่านั้น) +brain_healthเตือนในpacks_unverifiedv1.1 (2026-07-29) — แก้ตามผลวิเคราะห์ใหม่:
T2 approval gate จริง —
zero_readบล็อกโน้ต T2 จนกว่าป๊าจะสร้าง.kb/approvals/<note-id>.jsonด้วยมือ (agent อนุมัติตัวเองไม่ได้ ไม่มี tool สำหรับสร้าง) รองรับexpires(ISO date) ทุกการบล็อก/อ่านถูก audit; โน้ต T1 อ่านได้แต่ถูก audit ทุกครั้ง; T2 ไม่โผล่ในzero_searchแม้include_private=trueจนกว่าจะอนุมัติ; T2 ไม่ขึ้น Today.mdhealth สแกน body wikilinks — เดิม
zero_healthตรวจเฉพาะ frontmatter links ทำให้ลิงก์[[...]]ตายในเนื้อโน้ตโดยเงียบ ตอนนี้รายงานdead_body_links(resolve ผ่าน id/alias/title)ตัวอย่างไฟล์อนุมัติ:
{"approved_by":"ป๊า","at":"2026-07-29","expires":null}หมายเหตุ pack:
node_modules/ถูก bundle มาใน zip เจตนาเพื่อ offline install (ข้ามnpm installได้เลย แค่npm run buildหรือใช้dist/ที่ build มาแล้ว)Dry-run ก่อน install (แนะนำ): แตก zip →
cd central-brain-mcp→node test/smoke.mjs(ผ่าน 109/109 = พร้อม) → ค่อยตั้งค่า MCP client จริง
ความต้องการ
Node.js >= 18
npm
Related MCP server: Bruin
การติดตั้ง
npm install
npm run build
npm run init # สร้างโครงสมองที่ ~/.zero/brain อัตโนมัติ (ตั้ง ZERO_BRAIN_ROOT ก่อนถ้าอยากใช้ที่อื่น)build จะ compile TypeScript ไปที่ dist/ — entry point คือ dist/index.js (มี shebang #!/usr/bin/env node)
การตั้งค่า MCP client
ไม่ต้องตั้ง env ก็ได้ — default สมองจะอยู่ที่ ~/.zero/brain (ตั้งแต่ v2.1.0) ตั้ง ZERO_BRAIN_ROOT เฉพาะตอนอยากย้ายที่เก็บ — ตั้งแต่ v2.0.1 รองรับ CENTRAL_BRAIN_ROOT เป็น fallback เพื่อไม่ break config เก่า
ตัวอย่าง config สำหรับ MCP client (เช่น Claude Desktop / client ที่รองรับ stdio):
{
"mcpServers": {
"zero-brain": {
"command": "node",
"args": ["/absolute/path/to/zero-brain/dist/index.js"]
}
}
}ถ้าอยากย้ายที่เก็บสมอง เพิ่ม "env": { "ZERO_BRAIN_ROOT": "/absolute/path/to/my-brain" } — เปลี่ยน /absolute/path/to/... เป็น path จริงของเครื่องคุณ
Zone convention — ทุกอย่างของเราอยู่ใต้ ~/.zero/
บ้านโซนเดียวกันทั้งระบบ: ของที่ชื่อ zero-X จะอยู่ที่ ~/.zero/X (ตัด zero- แล้วเปลี่ยน - เป็น /) เช่น
~/.zero/
├── brain/ # ความจำ + ความสามารถ — เนื้อสมอง zero-brain + Obsidian vault (default ตั้งแต่ v2.1.0)
│ └── SKILL/ # skills ที่เราเขียนเอง (zero-brain-memory, อนาคต zero-* skills) — ความสามารถอยู่ในสมอง
├── mcp/ # ช่องทางสื่อสาร — MCP servers (repo นี้ติดตั้งที่ ~/.zero/mcp/zero-brain)
├── share/ # ส่วนทำงาน — storage ของ daimon/Kimi Work (sessions, runtime)
└── <อนาคต>/ # โปรเจกต์ zero-* ตัวอื่นจะมาอยู่ใต้โซนเดียวกันนี้แยกส่วนเด็ดขาด: ความจำ+ความสามารถ (brain/) · ช่องทางสื่อสาร (mcp/) · ส่วนทำงาน (share/) — ห้ามปนกัน · สกิล = ความสามารถของสมอง จึงอยู่ ใน brain/SKILL/ ไม่แยกโซน
ชี้ไฟล์หากัน (single source of truth): ของที่หลายส่วนต้องใช้ร่วมกัน ให้เก็บต้นฉบับไว้ที่โซนของมัน แล้วส่วนอื่นชี้มาด้วย junction — เช่น brain/SKILL/zero-brain-memory เป็นต้นฉบับ share/daimon-share/daimon/skills/zero-brain-memory เป็น junction ชี้เข้าสมอง แก้ที่เดียวเห็นผลทุกที่
ศูนย์กลาง (Zero hub): ในสมองทุกเส้นประสาทบรรจบที่ 20_Atlas/Zero.md — 3 ก้อนใหญ่: ความจำ (Zero_Brain Legacy Index) · ความสามารถ (Skill Index) · ระบบ/แผนที่ (Home, Hotcache, Memory Placement Rules, Brain Operating Model, AGENTS) — โน้ตที่ไม่เชื่อมเข้าก้อนใดเลยถือว่ายังไม่ sync เข้าระบบ
~/.zero/brain= ส่วนความจำเท่านั้น — ห้ามโปรแกรมอื่นมาสร้างไฟล์งาน/runtime ในนี้ (ไม่ใช่ส่วนทำงาน) ถ้าจำเป็นต้องเก็บ runtime ให้สร้างโฟลเดอร์พี่น้อง (เช่น~/.zero/share)โค้ด (repo) อยู่ที่ไหนก็ได้ แต่ ข้อมูลรันไทม์ทั้งหมดอยู่ใต้
~/.zero/ที่เดียว ไม่รกย้ายได้เสมอด้วย
ZERO_BRAIN_ROOTแต่ default คือโซนนี้env ที่ระบบอ่านมีแค่
ZERO_BRAIN_ROOT/ZERO_BRAIN_ACTOR(และ fallbackCENTRAL_BRAIN_*)
การทดสอบ
npm run build
node test/smoke.mjssmoke test ครอบคลุม 23 sections (109 checks): init / capture / evidence rule / write+manifest / search+privacy filter / link+dedup / resolve / health / update_note body / T2 approval gate / body wikilinks / pack provenance / nightly / atomic write / v2.0.0 token-saving / v2.1.0 install UX / v2.2.0 bootstrap seed / corrupt-line+compact / write lock / concurrent writers / T2 encryption / injection fence+rate limit / zero_upgrade — ต้องผ่านทั้งหมด (exit 0)
Tools ทั้ง 13 ตัว
Tool | หน้าที่ |
| สร้างโครงสร้างโฟลเดอร์ + ไฟล์ kernel เปล่า + skeleton packs (self, people, security) + Home.md/Today.md |
| จดด่วนลง |
| เขียนโน้ตถาวรลง |
| แก้เฉพาะฟิลด์ที่ส่ง (ห้ามแก้ id/created) |
| อ่านโน้ต frontmatter + body (resolve alias ก่อน) — T2 ต้องได้รับอนุมัติก่อน |
| ค้นจาก title/aliases/tags/body — default ไม่คืน T1/T2 ( |
| สร้างลิงก์สองทิศ + append |
| คืน id จาก alias/title (exact ก่อน แล้ว fuzzy contains) |
| list domain packs ใน |
| คำนวณ orphans/dead_links/dead_body_links/packs_unverified เขียน |
| รีเฟรช Today.md จาก active notes (สูงสุด 30 ใบ) + fleeting 24h — default ไม่คืนเนื้อ Home.md ( |
| วงจรกลางคืน: fleeting queue (สูงสุด 50 ใบ) + regenerate Today + health + snapshot ลง |
| คืน audit log ล่าสุด N รายการ |
กฎเหล็ก (enforce ในโค้ด)
ไม่มี delete ใดๆ — "ซ่อน" ได้ด้วย
state: archiveเท่านั้นไฟล์ kernel
manifest.jsonl/links.jsonl/audit.jsonlเป็น append-only ห้ามเขียนทับโน้ต
type: atomicหรือentityต้องมี evidence อย่างน้อย 1 ข้อ ไม่เช่นนั้น error พร้อมแนะนำให้ใช้type: fleetingzero_searchไม่คืนโน้ต privacy T1/T2 โดย default — ถ้าinclude_private: trueจะถูก audit ทุกครั้งทุก mutation ถูกบันทึกลง
audit.jsonlทุกอย่างเป็น local filesystem — ห้าม network call
โครงสร้าง brain root
<root>/
├── .kb/
│ ├── manifest.jsonl # metadata โน้ต (append-only, ตัวล่าสุดชนะ)
│ ├── links.jsonl # ลิงก์ระหว่างโน้ต (append-only)
│ ├── aliases.json # map alias → id
│ ├── health.json # ผล zero_health ล่าสุด (เต็มทุกหมวด — response ของ tool เป็นสรุป)
│ ├── audit.jsonl # log ทุก mutation (append-only)
│ └── packs/ # domain packs (*.yaml)
├── 00_Fleeting/ # จดด่วน <id>.md
├── 10_Notes/ # โน้ตถาวร <id> - <slug>.md
├── 20_Atlas/ # Home.md, Today.md
├── 30_Sources/
├── 40_Templates/base/
└── 99_System/snapshots/โครงสร้างโค้ด
src/
├── index.ts # MCP server (stdio) + tools 13 ตัว (zero_*)
├── kernel.ts # append-only JSONL, manifest/links/aliases/health/audit
├── schema.ts # frontmatter parse/serialize (YAML แบบจำกัด), slug sanitize, validation
seed/ # bootstrap ไฟล์กฎ+templates ที่ init วางให้ (AGENTS.md, Atlas docs, note templates)
test/
└── smoke.mjs # smoke test 23 sections (109 checks) รันบน distSkills
โฟลเดอร์ skills/ เก็บ skill ของระบบ Zero_Brain ในรูปแบบ SKILL.md มาตรฐาน — ส่งไฟล์ให้ AI (Kimi Work / Claude Code) สั่ง "ติดตั้ง skill นี้" ได้เลย หรือวางด้วยมือตามคู่มือใน skills/README.md
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityAmaintenanceLocal-first knowledge base MCP server. Lets AI agents (Claude Code, Cursor, etc.) read and write your personal knowledge base through 20 MCP tools. Zero cloud dependency — all files stay on your machine.Last updated1,758656MIT
- Alicense-qualityBmaintenanceMCP server for AI agents to read, write, and organize notes in a local-first, human-in-the-loop note-taking app.Last updated181MIT
- Alicense-qualityAmaintenanceA self-hosted Markdown knowledge base and Agent Harness with an MCP server that enables AI agents to read and write notes, providing persistent memory and a shared workspace for multi-agent collaboration.Last updatedMIT
- Alicense-qualityDmaintenanceMarkdown + SQLite knowledge store with bidirectional wikilinks, exposed as an MCP server for AI agents to maintain an interconnected knowledge base.Last updatedMIT
Related MCP Connectors
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
MCP server for AgentDocs (agentdocs.eu): read, search, write, comment on & share Markdown docs.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/miru-zero/zero-brain'
If you have feedback or need assistance with the MCP directory API, please join our Discord server