Bernstein Mcp

io.github.sipyourdrink-ltd由 GitHub 帳號 sipyourdrink-ltd 發布v0.2.0更新於 Oct 24, 2026

Verifies Bernstein run receipts and hash chains; lists the shipped presets and adapters. Read-only.

已驗證Streamable HTTP可網頁執行開發者工具安全與監控

概覽

AI 產生的概覽

無狀態、唯讀的遠端 MCP 端點,用來驗證 Bernstein 執行回執、雜湊鏈、TRACE 信任記錄與代理清單,並列出隨附的合規預設與轉接器。

可以做什麼
  • 驗證並解說執行回執:重算內嵌雜湊鏈、重建簽章主體並核對 Ed25519 簽章,並以白話敘述結果
  • 單獨驗證鏈:走訪日誌列、血緣項目或稽核事件,指出第一個出現分歧的環節
  • 檢查 TRACE v0.2 信任記錄與委派鏈:結構定義、設定檔、內嵌簽章,並由葉到根分類
  • 檢查已簽章的代理清單(v0.2 COSE 封裝),可選擇與信任記錄交叉核對
  • 逐項說明一次執行如何對應到 TRACE 信任記錄
  • 列出此版本隨附的合規預設與代理轉接器,並回報伺服器版本與限制
適用情境
需要確認 Bernstein 執行回執或雜湊鏈在簽章後未被更動,或執行 TRACE 與代理清單一致性檢查時適用,無須安裝或持有金鑰。適合代理工作階段的稽核與來源查核。
執行需求
遠端 streamable HTTP 端點,無需帳號、金鑰或環境變數。回執須以檔案原始文字傳入,而非已解析的物件。限制:請求內容 1 MiB、每條鏈 2 000 列、每個位址每分鐘 60 次請求。
安裝前請注意
驗證採首次使用即信任模式,無法證明內嵌金鑰屬於你認定的營運方,需自行固定其公開金鑰。稽核範圍的 HMAC 值不被證明。簽章結論僅表示此驗證器在此時對這些位元組得出此結論。請求以 JSON 行記錄,不含位址、標頭、內容或回執資料。

安裝

在 SourceWeft 中

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

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.sipyourdrink-ltd%2Fbernstein-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "bernstein": {
      "type": "http",
      "url": "https://mcp.bernstein.run/mcp"
    }
  }
}

README

[bernstein-mcp]

bernstein-mcp

Stateless, read-only MCP endpoint at https://mcp.bernstein.run that verifies bernstein run receipts and hash chains. No account, no key, nothing stored, nothing fetched.

claude mcp add --transport http bernstein https://mcp.bernstein.run/mcp

What it does

ToolResult
verify_receiptrecomputes every chain a run receipt embeds, rebuilds the signed subject, checks the Ed25519 signature; verdict + one line per check, plus the verdict as a signed statement (below)
explain_receiptthe same verification, narrated: what the run recorded, where it diverges, what the result does and does not prove
verify_chainwalks journal rows, lineage entries or audit events on their own (pass the file text for byte-exact rows); names the first broken link
verify_trace_recordTRACE v0.2 conformance checks on one Trust Record, stateless, no account: vendored schema, profile rules, the embedded signature with the key in cnf.jwk (EdDSA, ES256, ES384); record_sha256 is the RFC 8785 digest a child hop links to
verify_delegation_chainwalks a set of Trust Records from the leaf to the root and classifies the chain (verified, provenance-invalid, authorization-invalid, unverifiable) with the same codes as the delegation-link corpus
verify_agent_manifeststateless check of a signed agent manifest (v0.2 COSE envelope): vendored schema, profile, canonicalization, embedded signature (Ed25519, P-256, P-384); optional trust record cross-check via references[]; verdicts valid / invalid / unverifiable
explain_trace_mappinghow a bernstein run maps onto a TRACE v0.2 Trust Record, claim by claim; pass a receipt to fill in what its journal answers
list_presets / get_presetthe compliance presets this release ships
list_adaptersthe agent adapters bundled with this release
server_infoversion and limits

Same walk as bernstein verify-receipt, reachable from any MCP client or the paste form at /verify. A verdict's page address is the receipt's own digest.

Trust model

ProvesDoes not prove
the embedded rows are exactly the rows that were signedthat the embedded key belongs to who you think (trust-on-first-use; pin the operator's published key yourself)
nothing was edited, reordered, dropped or appended after signingaudit-range HMAC values (keyed by the producing install; their linkage and content hash are still checked)

Pass the receipt file's contents as a string: an already parsed object cannot tell 1 from 1.0, and the reference hashes the original spelling.

Signed verdicts

Every verdict comes back as a DSSE envelope (signed_verdict) signed with this deployment's Ed25519 key: the payload is a JCS-canonical statement naming the receipt by digest, the verdict, every check, and an appraisal block in the EAR status vocabulary (affirming / contraindicated / none). Keep it next to the receipt; anyone can re-check it offline against the public key at /.well-known/bernstein-mcp/keys.json (kid = RFC 7638 thumbprint). The signature covers the DSSE PAE of application/vnd.bernstein.verdict+json, the same construction the receipt itself uses. It attests that this verifier reached this verdict for these bytes at this time — nothing about the receipt's producer.

Session receipts

bernstein-attest turns a Claude Code or Codex CLI session into a signed run receipt that this server verifies.

bash
npx bernstein-attest init          # registers hooks for both agents (user scope); --claude-code / --codex / --project to narrowbernstein-attest link              # verify link + one Markdown line for a PR descriptionbernstein-attest verify .bernstein/receipts/<session>.json

Codex runs project hooks only after they are trusted once with /hooks in an interactive session; codex exec skips untrusted hooks without printing anything. With --project, Claude Code hooks go to .claude/settings.local.json and Codex hooks to .codex/hooks.json; both name the bundle under your home directory, so keep .codex/hooks.json out of version control.

Recorded per tool call: tool name, hashes of its input and output, success flag, repo-relative path for files the call wrote (hash only for paths outside the project), the program name of a shell command (first token, path stripped, at most 32 characters). Not recorded: prompts, model output, command text, file contents, absolute paths. The receipt is sealed at the end of every turn that recorded something new, and every 2 000 rows; the file lives in .bernstein/receipts/ and can be committed with the change it describes. Because later turns reseal the same file, run npx bernstein-attest link right before committing it so the link you paste names the current bytes.

Limits

Request body1 MiB
Rows per chain2 000 (larger receipts: verify locally)
Rate60 requests/min per address on POST /mcp and POST /verify
Loggingone JSON line per request: route, method, status, JSON-RPC method, tool, verdict, producer family, MCP client name/version, country, colo. Never the address, a header, the body or the receipt

Correctness

vectors/ holds eight golden vectors generated by the Python reference (scripts/gen_vectors.py against the pinned bernstein source). The TypeScript verifier must reproduce each vector's verdict, every check, the binding bytes and the receipt digest byte for byte (test/vectors.test.ts). vectors/session/ holds three frozen session receipts written by bernstein-attest (scripts/gen-session-vectors.mjs).

Development

bash
npm installnpm test          # no-fetch guard + vitestnpm run typechecknpm run dev       # wrangler dev

src/ may not call fetch, eval or new Function; CI fails otherwise. Deploying: see DEPLOY.md. Licence: Apache-2.0.

來源:README.md,提交 cd2c7e2

工具

11

server_info

Server info

Identity, version, and request limits for this MCP server.

無需輸入參數。

verify_receipt

Verify a run receipt

Recompute every hash chain a bernstein run receipt embeds (journal, lineage spine, optional audit range), rebuild the signed subject from the recomputed heads, and check the Ed25519 signature with the key the receipt carries. Needs no secret and reads nothing but the receipt. Returns the verdict, the first failing check, one line per check, and the same verdict as a DSSE envelope signed by this verifier's Ed25519 key (public key at keys_url) so the outcome can be kept and re-checked offline.

輸入參數receipt必填

explain_receipt

Explain a run receipt

Verify a run receipt and narrate the result in plain language: what the run recorded, which chains recomputed, where the first divergence is, and what an auditor can and cannot conclude without the producing install's keys.

輸入參數receipt必填

verify_chain

Verify a hash chain

Walk bernstein chain rows and recompute every link: journal rows (event_hash), lineage spine entries (entry_hash) or audit events (prev_hmac linkage). The row kind is detected from the fields, or pass `kind` explicitly. Reports the first divergent index. Pass `entries` as the file text (a JSON array or one row per line, as journal.jsonl is written) for byte-exact hashing; a parsed array also works, but then a float spelled 1.0 or -0.0 in the file cannot be told apart from an integer.

輸入參數kindentries必填

verify_trace_record

Verify a TRACE Trust Record

TRACE v0.2 conformance checks on one Trust Record, stateless, no account: schema (vendored trace-claim.json), profile, subject URI, software-only runtime rule, policy digest, public-only confirmation key, the embedded signature (EdDSA, ES256 or ES384 with the key in cnf.jwk), appraisal, delegation link shape and references. Nothing is fetched: resolvers are checked as URIs only. `record_sha256` is the RFC 8785 digest of the complete record, signature included — the value a child hop puts in delegation.parent_record_hash.

輸入參數record必填

verify_agent_manifest

Verify an Agent Manifest

Agent Manifest v0.2 conformance checks on one manifest, stateless, no account: schema (vendored agent-manifest.schema.json), profile context, version, canonicalization, COSE envelope signature (Ed25519, key identified by kid in the protected header; ML-DSA-65 is reported unverifiable). Optionally checks that a TRACE Trust Record cites this manifest by digest. Nothing is fetched; resolvers are checked as URIs only. The manifest hash is sha256 over the COSE payload bytes (or RFC 8785 canonical JSON for object input).

輸入參數manifest必填trustRecord

verify_delegation_chain

Verify a TRACE delegation chain

TRACE v0.2 delegation-chain conformance, stateless, no account: index every Trust Record by the RFC 8785 digest of its complete form, start at the leaf, follow delegation.parent_record_hash to the root, and check each hop's signature, the root key against `trusted_root_keys`, the depth bound, the link's digest algorithm, the credential (registered, issuer = parent subject, holder = record subject, window at the hop's own iat) and data_class narrowing under `data_class_lattice`. Classification: provenance-invalid outranks authorization-invalid; an unread link is unverifiable, not broken. Pass `records` as a JSON array or as file text (one record per line or a JSON array).

輸入參數contextrecords必填

explain_trace_mapping

Explain the bernstein → TRACE mapping

How a bernstein run maps onto a TRACE v0.2 Trust Record: one row per claim with the journal field it is sourced from and the rule that derives it. Pass a run receipt to fill in the rows its embedded journal can answer (subject, iat, model, data_class, policy digest, tool transcript) alongside the receipt's own verdict.

輸入參數receipt

list_presets

List compliance presets

The compliance presets bernstein v3.19.2 ships, with the switches each one turns on.

無需輸入參數。

get_preset

Get a compliance preset

Every field of one compliance preset as bernstein v3.19.2 resolves it.

輸入參數name必填

list_adapters

List agent adapters

The agent adapters bundled with bernstein v3.19.2: adapter name, the binary it drives, the module that implements it.

無需輸入參數。

版本歷史

2
  1. v0.2.0最新Sep 19, 2026
  2. v0.1.0Sep 18, 2026

評分

已滿足適用檢查項的 100%

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

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分