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 分