Skip to main content
Glama

世界大脑 WorldBrain — Auditable Reasoning MCP Service

The transparent decision-making brain driving all embodied devices. Encapsulates "world graph → A* auditable reasoning → physical carrier execution → learning feedback" as a standard MCP (Model Context Protocol) stdio service, letting any AI agent connect by simply copying a config.

Zero dependencies · Zero server · Free distribution to AI Agents. Uses only Node.js built-in modules, with the kernel and 世界大脑.html as a single source of truth.


0. Installation (Passive Customer Acquisition Entry)

npm install -g worldbrain-mcp      # 全局安装,自带 bin
npx worldbrain-mcp --selftest      # 免安装验证

Related MCP server: gbrain

1. What It Is

世界大脑 exposes an "auditable reasoning" capability to external agents:

Capability

Corresponding Tool

Description

Scene awareness

world_info / set_world

First inspect the world graph structure, or import your own scene (mosquito zapper is just the default example)

Auditable reasoning

reason / audit

A* optimal path + rationale for each step + honest marking of undecidable regions 𝕌

Physical carrier integration

carrier_report

Carrier reports battery/density, automatically generating hard/soft constraints

Learning loop

learn / knowledge_query / knowledge_add

Execution reward → confidence update; experience base queryable and extendable

Deterministic, no hallucination: reasoning/auditing/learning all happen in the local kernel, not through an LLM. The free LLM (OpenRouter :free) is only used for the web version's "natural language → structured state" perception (see 世界大脑.html); the MCP layer depends on no external API.


2. File List

File

Purpose

worldbrain-mcp.js

The MCP service itself (stdio, zero dependencies)

世界大脑.html

Single-file demo + internal control kernel (MCP extracts and reuses the kernel from this)

README.md

This integration guide

When deploying, worldbrain-mcp.js and 世界大脑.html must be in the same directory (or set the WORLDBRAIN_HTML environment variable to point to the html).


3. Quick Integration (3 Client Types)

1. Claude Desktop

Edit claude_desktop_config.json:

{
  "mcpServers": {
    "worldbrain": {
      "command": "node",
      "args": ["C:/你的路径/世界大脑/work/worldbrain-mcp.js"]
    }
  }
}

2. Cursor / Cline / Any MCP-capable Client

Add to the MCP configuration:

{
  "mcpServers": {
    "worldbrain": {
      "command": "node",
      "args": ["/abs/path/to/worldbrain-mcp.js"]
    }
  }
}

3. Command-Line Self-Test (Verify the Server Runs)

node worldbrain-mcp.js --selftest
# 输出:SELFTEST OK — 全部 N 项工具验证通过

4. Tool Interface (Called by External Agents)

world_info() → Current world graph structure

{ "nodes": ["CHARGE","A","B","C"], "edgeCount": 10, "edges": [...] }

set_world({nodes, edges, coord?}) → Import your scene

{
  "nodes": ["S","A","B","T"],
  "edges": [{"from":"S","to":"A","w":2},{"from":"A","to":"T","w":3}],
  "coord": {"S":[0,0],"A":[3,0],"T":[6,0]}
}

{ "ok": true, "nodes": ["S","A","B","T"], "edgeCount": 2 }

reason({start?, goal, hard?, soft?}) → Auditable optimal path

{ "start": "CHARGE", "goal": "C", "hard": ["A"], "soft": ["B"] }

{ "status":"optimal", "path":["CHARGE","B","C"], "cost":6, "steps":[...], "note":"..." }

Honestly returns when undecidable:

{ "status":"unknown", "U": true, "reason":["目标不在世界图"] }

carrier_report({battery?, goal, density?}) → Physical carrier constraints

{ "battery": 100, "goal": "A", "density": {"A":8,"B":3,"C":5} }

{ "battery":100, "hard":[], "soft":["B"], "note":"电量充足" }

When battery <20, hard:["A","B","C"] (forbidden to leave the charging dock).

audit({start?, goal, hard?, soft?}) → Five-section audit report

{ "summary": {...}, "details": [...], "evidence": [...], "constraints": [...], "unknown": [], "status": "valid" }

learn({path, success}) → Learning loop

{ "path": ["CHARGE","A","C"], "success": true }

{ "updated":[{"transition":"CHARGE→A","confidence":0.6}], "knowledgeBaseSize": 5 }

knowledge_query({from?, to?}) / knowledge_add({from, to, success?, confidence?, source?})

Query and add to the experience base.


5. Minimal Call Example (Agent Perspective)

1. 调用 world_info()            → 了解当前场景有哪些节点
2. 调用 set_world(我的场景)      → (可选)换成你自己的物理载体/任务图
3. 调用 carrier_report(电量,目标,密度) → 载体上报,拿到硬/软约束
4. 调用 reason(起点,目标,硬,软)   → 得到可审计最优路径
5. 载体按 path 执行
6. 调用 learn(执行路径, 成功?)   → 置信度更新,越用越准

6. Honest Boundaries (Per Product Wording, No Fabrication)

Deterministically implemented: reasoning (A*+constraints), auditing (five-section rationale chain), knowledge base (experience + confidence), learning (single-step feedback), physical carrier integration, MCP integration.

Documented but currently not implemented (TODO stubs in code, no jargon piled on to fake implementation):

  • Perceptual Banach fixed-point belief convergence (Layer1)

  • PAC learning sample complexity bounds / knowledge distillation (Layer2/6)

  • do-calculus causal discovery (Layer5)

  • World model / counterfactual reasoning (Layer2 extension)

  • Hoare logic formal verification (Layer7 upgrade)

  • LSH / vector similarity retrieval (Layer3, currently exact array matching)

Provable within mathematical fidelity: on a finite world graph with an admissible Euclidean heuristic, A* is complete and optimal (finds the optimal path, or honestly marks 𝕌).


7. License and Distribution

Free, open source, distributed to AI Agents. Suitable for software copyright / patent materials and passive customer acquisition scenarios.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    A universal MCP server providing persistent, structured memory through a knowledge graph with graph storage, semantic vector search, and multi-hop traversal for AI agents and IDEs.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A local-first compiled knowledge graph MCP server that provides structured memory for AI agents with full-text search, vector embeddings, and timeline tracking.
    619 npm
    8
    MIT