DarkMatter

io.github.darkmatter-hub由 GitHub 帳號 darkmatter-hub 發布v0.3.1更新於 Oct 28, 2026

Tamper-evident records of AI agent decisions. Verify offline, or publish a proof link.

概覽

AI 產生的概覽

把 AI 代理的決策記錄成帶簽章、雜湊鏈串接的 Context Passport 條目,可離線驗證或發布為可驗證的證明連結。

可以做什麼
  • 把代理的決策或動作記錄成本地雜湊鏈中的一筆 passport 條目
  • 驗證某個工作階段的鏈條是否遭竄改,並依序重播
  • 匯出可攜的證明包,內含格式名稱、規格連結、完整性狀態與驗證指令
  • 列出本機既有的工作階段
  • 可選擇把每筆記錄發布到 DarkMatter 並回傳驗證連結
適用情境
當代理的決策需要可稽核、防竄改的留痕時適用,例如合規、退款等有後果的動作;也適合需要讓稽核方或交易對手在不信任寄件者的前提下自行核驗的情境。
執行需求
透過 npx 以 stdio 在本機執行,需要 Node.js。僅本機使用時不需帳號,記錄寫入本機儲存目錄。發布記錄需要廠商提供的 DARKMATTER_API_KEY。選用變數:DARKMATTER_API_URL、DARKMATTER_MCP_STORE_DIR、DARKMATTER_SHARE。
安裝前請注意
設定 DARKMATTER_API_KEY 後每筆記錄都會傳送到廠商伺服器;DARKMATTER_SHARE=true 會讓已發布記錄對任何持有連結的人可讀。只有代理明確呼叫記錄工具時才會留痕,涵蓋範圍取決於代理是否記得呼叫。舊版回傳的驗證連結始終無法開啟,安裝前請確認版本。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 DarkMatter,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

DarkMatter MCP Server

Universal MCP server that emits Context Passport records for AI agent decisions and actions. Drop into any MCP-compatible client (Claude Code, Cursor, Cline, Continue, ChatGPT Desktop, Zed, Goose, and others) to give your agent a commit / verify / replay / export toolset for verifiable, tamper-evident records.

Built by DarkMatter. Implements Context Passport v2.0, an open CC0 standard. Records emitted by this server use RFC 8785 (JCS) canonicalization and are byte-equivalent across the Python and TypeScript reference SDKs.

Install

In your MCP client's config (claude_desktop_config.json, Cursor's mcp.json, etc.):

json
{  "mcpServers": {    "darkmatter": {      "command": "npx",      "args": ["-y", "@darkmatterhub/mcp-server"]    }  }}

Restart the client. Five tools become available to your agent:

  • darkmatter_commit — record an agent decision or action
  • darkmatter_verify — check that the chain has not been tampered with
  • darkmatter_replay — walk the full chain in order
  • darkmatter_export — produce a portable proof bundle
  • darkmatter_list_sessions — see what sessions exist locally

Bundles explain themselves

darkmatter_export produces a bundle that a stranger can act on. Alongside the records it carries the format name, a link to the specification, whether the chain was intact at export time, and the exact command to verify it in Python or TypeScript, plus what a failure looks like.

That matters because the bundle is the artifact that leaves your machine. It goes to an auditor, a regulator or a counterparty who has never heard of this format, and the whole claim is that they can check it without trusting whoever sent it. A bundle that does not say how is asking to be trusted.

Local by default, published when you ask

With no configuration the server keeps every record on your own disk. The chain verifies offline through darkmatter_verify, so you can evaluate the whole idea without an account.

Set an API key to publish records and get a link somebody else can check:

VariableEffect
DARKMATTER_API_KEYPublishes each record to DarkMatter and returns a verify_url. Get one at darkmatterhub.ai.
DARKMATTER_SHARESet to true to make published records readable by anyone with the link. Off by default, because publishing is not something to do to your records without being asked.
DARKMATTER_API_URLOverride the API host. Defaults to https://darkmatterhub.ai.
DARKMATTER_MCP_STORE_DIRWhere local records are written.

commit reports which of the two happened, in the storage field. If publishing fails the record is still committed locally and the error is returned alongside it, so a network problem cannot cost you the record.

Changed in 0.3.0. Earlier versions returned a https://darkmatterhub.ai/r/{id} link for every commit while making no network calls at all, so the link always 404ed. A verification URL is now returned only when there is a published record behind it.

What gets captured

Whatever the agent (or user) explicitly invokes via darkmatter_commit. Auto-capture of every tool call without explicit invocation is a separate component (see Auto-capture below).

Example agent flow:

User:    Approve the refund for order #1247 and record the decision.Agent:   Calls refund_order(1247).Agent:   Calls darkmatter_commit({           input: "Approve refund for order #1247",           output: "Approved. $84.00 refunded to original payment method.",           role: "compliance",           event_type: "commit"         })Result:  { ok: true, passport: {...}, storage: "local", verify_url: null,           note: "Saved locally and verifiable offline..." }

The passport is signed (if a key is configured), hash-chained to the previous commit in the session, and stored locally at ~/.darkmatter/mcp/<session_id>/chain.jsonl.

Storage

Default: local-only. Passports never leave the machine.

~/.darkmatter/mcp/├── default/│   ├── chain.jsonl        # append-only stream of all commits│   └── latest.json        # most recent passport (used as parent for the next)└── <other-session-id>/    └── ...

To forward each passport to a DarkMatter receiving server in addition to local storage, set:

bash
export DARKMATTER_API_KEY="dm_sk_..."

The forwarding is best-effort and never blocks the agent's tool call. Local storage remains the source of truth.

Auto-capture

The MCP server captures only what the agent explicitly invokes. To auto-capture every tool call and turn boundary in a specific dev tool (without the agent having to remember to call darkmatter_commit), install one of the dev-tool-specific adapters:

  • darkmatter-hub/claude-code — auto-capture for Claude Code (Anthropic)
  • Cursor adapter — planned
  • OpenAI Codex adapter — planned
  • Aider adapter — community-built welcome

Each adapter hooks into its specific dev tool's event lifecycle and routes events through this MCP server's darkmatter_commit tool. One canonical endpoint, many capture surfaces.

Verification

Records are valid Context Passport v2.0 artifacts. Verify with any conformant implementation:

bash
pip install context-passport context-passport-conformancecontext-passport-conformance --level signed     # 9/9 vectors, no --vectors-dir needed

The conformance package ships its vectors inside the wheel, so this is a one-line check against the public reference suite.

Or use the offline reference verifier directly on the JSONL file:

python
import jsonfrom context_passport import verify_chain
with open("~/.darkmatter/mcp/default/chain.jsonl") as f:    chain = [json.loads(line) for line in f]
print(verify_chain(chain))  # True if intact, False if tampered

Why MCP

MCP (Model Context Protocol) is becoming the universal interop layer for AI tools. Writing this server once means it works in every MCP-compatible client without per-client integration code. See the Context Passport for MCP proposal for the broader architectural rationale.

License

Apache-2.0. See LICENSE.

The Context Passport schema this server implements is released separately under CC0 1.0 at github.com/contextpassport/spec.

Related repositories

來源:README.md,提交 59d01ef

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.3.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分