MCP Server Attestation

io.studiomeyer由 studiomeyer.io 發布v0.2.0更新於 Oct 24, 2026

Ed25519-signed MCP tool manifests + spawn attestation. Layer-2 supply-chain hardening.

發布方自己的服務:StudioMeyer Crew

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

一個本機 MCP 伺服器與函式庫,用來對已簽章的工具清單做密碼學驗證,並對 MCP 伺服器的行程啟動進行證明。

可以做什麼
提供 MCP 工具清單的 Ed25519 簽章與驗證、執行期啟動證明,以及預設拒絕的參數清理器。參考 stdio 伺服器提供五個工具:驗證清單、檢查啟動指令、產生清單範本、簽署清單與產生金鑰。它是可直接引入的函式庫相依項目,而非執行期替代品;命令列提供 keygen、sign、verify、inspect、fingerprint 與 check-pin 等指令。
適用情境
當你需要確認某個伺服器宣告的工具及其子行程啟動呼叫與已簽章清單一致時適合使用,例如防範被替換或遭惡意更新的伺服器。適合能自行簽署清單並管理金鑰、希望強化 MCP 供應鏈的團隊。
執行需求
需要 Node.js 20 或以上版本;參考伺服器透過 stdio 在本機執行。未宣告任何帳號、API 金鑰或環境變數。首次使用信任機制會把公開金鑰固定到本機信任檔案,其路徑可用環境變數 MCP_ATTEST_TRUST_FILE 覆寫。選用的 Sigstore Rekor 交叉比對需要網路存取。
安裝前請注意
keygen 與 sign 工具會寫入檔案到磁碟,包括私密金鑰,因此要保護好金鑰輸出目錄。預設採用首次使用信任,且未附帶受信任金鑰清單,因此首次驗證即是信任決策。它不會對行程做沙箱隔離、不控制網路出口,也不強化 OAuth 流程。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

Part of the StudioMeyer MCP Stack — Built in Mallorca 🌴 · ⭐ if you use it

mcp-server-attestation

[npm version] [npm downloads] [License] [Last commit] [GitHub stars]

Layer-2 supply-chain hardening for Model Context Protocol servers. Ed25519-signed tool manifests, runtime spawn-attestation, default-deny argument sanitizer.

Direct response to:

  • OX Security marketplace-poisoning, April 2026 — 9 of 11 MCP registries accepted malicious servers. Anthropic's published position: "expected behavior".
  • CVE-2025-69256 — Serverless Framework MCP RCE via child_process.exec() command injection.
  • CVE-2025-61591 — Cursor MCP RCE through OAuth-installed malicious server with spawn hijack.

This package provides what Anthropic chose not to: cryptographic verification of which tools a server is allowed to expose and which spawn calls it is allowed to make. It is a drop-in dependency, not a runtime replacement.

A note from us

We have been building tools and systems for ourselves for the past two years. The fact that this repo is small and has few stars is not because it is new. It is because we only just decided to share what we have built. It is not a fresh experiment, it is a long story with a recent commit.

We love building things and sharing them. We do not love social media tactics, growth hacks, or chasing stars and followers. So this repo is small. The code is real, it gets used, issues get answered. Judge for yourself.

If it helps you, sharing, testing, and feedback help us. If it could be better, an issue is more useful. If you build something with it, tell us at [email protected]. That genuinely makes our day.

From a small studio in Palma de Mallorca.

Packages (npm workspaces)

PackagePurpose
mcp-server-attestation (packages/lib)Library: Ed25519 sign/verify, manifest schema, sanitizer, spawn attester, TOFU trust store.
mcp-attest-cli (packages/cli)CLI mcp-attest: keygen, sign, verify, inspect, fingerprint, check-pin.
mcp-attest-demo (packages/demo-server)Reference MCP server (stdio, spec 2025-06-18) exposing 5 tools that demonstrate the library.

Install

bash
npm install mcp-server-attestation# CLI:npm install -g mcp-attest-cli# Reference MCP server:npx mcp-attest-demo

Node 20+. No external crypto dependencies — uses node:crypto Ed25519 primitives.

Five-line server quickstart

ts
import { verifyManifestStrict, attestSpawnStrict, type SignedManifest } from "mcp-server-attestation";import signed from "./signed/manifest.json" assert { type: "json" };
// 1. At startup: prove the manifest you ship is the manifest you signed.verifyManifestStrict(signed);
// 2. Before every child_process.spawn:attestSpawnStrict(signed as SignedManifest, { command, args });

That is the entire integration. Two function calls, no SaaS, no daemon.

If you would rather re-verify the signature on every spawn (defense-in-depth against an unverified or swapped manifest reaching the gate), use the single fail-safe call instead — it verifies then attests:

ts
import { attestSpawnVerified, type SignedManifest } from "mcp-server-attestation";attestSpawnVerified(signed as SignedManifest, { command, args });

Tools (reference server mcp-attest-demo)

#NamereadOnlyHintdestructiveHint
1attest_verify_manifesttruefalse
2attest_inspect_spawntruefalse
3attest_generate_manifest_templatetruefalse
4attest_sign_manifestfalsefalse
5attest_keygenfalsefalse

Annotations are honest: attest_sign_manifest and attest_keygen write files on disk so they are not read-only, but they do not destroy existing data so destructiveHint stays false. See docs/THREAT-MODEL.md for the per-tool capability table.

CLI

bash
mcp-attest keygen --out-dir ./keys --name prodmcp-attest sign --manifest manifest.json --private-key keys/prod.key --out signed.jsonmcp-attest verify --signed signed.json --pin                  # TOFU pinmcp-attest verify --signed signed.json --sigstore             # opt-in Rekor cross-refmcp-attest inspect --signed signed.json --command /usr/bin/echo --arg "hello"mcp-attest fingerprint --public-key keys/prod.pubmcp-attest check-pin --server my-server --signed signed.json

verify exits with code 2 on bad signature, code 3 on pin mismatch.

MCP spec compatibility

Spec versionStatus
2024-11-05parseable in manifest, not target of reference server
2025-03-26parseable in manifest, not target of reference server
2025-06-18full target

The library is transport-agnostic. The reference server is stdio-only.

Security model

  • Trust-on-First-Use is the default. The first time you verify a server, its public key is pinned to ~/.mcp-attest/trust.json (override: MCP_ATTEST_TRUST_FILE). Subsequent verifications reject any new key for the same server name with TRUST_PIN_MISMATCH. This catches the Cursor-style malicious-update vector.
  • No bundled trusted-keys list. This package does not act as a gatekeeper. If you want stronger assurance, opt into --sigstore to cross-reference the public-key fingerprint against the Sigstore Rekor transparency log.
  • Default-deny argument sanitizer. shellSafeString blocks every ASCII shell metacharacter, NUL, CR, LF, VT, FF, NEL, zero-width characters, BOM, RTL/LTR overrides, Trojan-Source isolates, and fullwidth-Latin confusables. Allowlist behaviour requires the explicit regex / enum / prefix / literal rule kinds.
  • ReDoS-safe regex rules. A regex rule's pattern is signed by the author, but the argument value is attacker-controlled. The sanitizer statically detects backtracking-prone patterns (nested unbounded quantifiers like (a+)+) and refuses to run them, so a single crafted argument cannot freeze the spawn hot path. regex rules also carry a maxLength input cap (default 4096).
  • Traversal-safe prefix rules. prefix rules reject .. path components by default (denyTraversal: true, including the %2e%2e encoded form), so /safe/../../etc/passwd is blocked even though it satisfies prefix: "/safe/".
  • Verify-then-attest. attestSpawnVerified checks the manifest signature before attesting the spawn in one fail-safe call — use it instead of attestSpawnStrict unless you have measured the per-spawn Ed25519 verify out of a genuinely hot loop.
  • Canonical JSON is the signed surface. Re-serialisation cannot change the signed bytes.

What this package does NOT do (out of scope):

  • Sandbox or containerise the server process.
  • OAuth flow hardening (separate mcp-oauth-shield build).
  • Network egress control.
  • Auto-patch existing servers.

Tests

bash
npm installnpm run typechecknpm test

Test corpus includes CVE-replay fixtures (packages/lib/tests/fixtures/cve-2025-69256-payloads.json, cve-2025-61591-payloads.json). The build is a regression check: every payload must be blocked.

Distribution

  • npm publish via GitHub Actions OIDC with --provenance.
  • Reference server submitted to mcp.so and FastMCP Directory.
  • Library separately published as mcp-server-attestation.

About StudioMeyer

StudioMeyer is an AI and design studio based in Palma de Mallorca, working with clients worldwide. We build custom websites and AI infrastructure for small and medium businesses. Production stack on Claude Agent SDK, MCP and n8n, with Sentry, Langfuse and LangGraph for observability and an in-house guard layer.

License

MIT, Copyright 2026 Matthias Meyer (StudioMeyer). See LICENSE.

來源:README.md,提交 874947e

工具

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

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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

其他 Studiomeyer 整合