Attest Mcp

io.github.SPAZIO-GENESI由 GitHub 帳號 SPAZIO-GENESI 發布v0.4.1更新於 Oct 24, 2026

Free proof-of-existence attestation for digital files, MCP tools for the imgauth service.

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

概覽

AI 產生的概覽

本機 MCP 伺服器兼命令列工具,讓助理透過 Spazio Genesi 的免費服務為數位檔案辦理存在性存證、驗證與查詢。

可以做什麼
透過裝置流程或預先核發的 API 金鑰完成授權,工作階段權杖會保存在本機供後續使用。在本機以串流方式計算檔案雜湊,並提交指紋進行存證,可附上標題、作者、年份與備註等中繼資料。產生或取回已簽署的 PDF 憑證,並取得永久驗證連結。以宣告的雜湊與簽章比對本機檔案,或在不提供檔案的情況下驗證憑證簽章。查詢或下載 OpenTimestamps 比特幣錨定證明,並查看服務狀態。
適用情境
適合讓 AI 助理為作品、文件或建置產物辦理時間戳與存在性證明,並在之後進行驗證,而不必上傳檔案本身。也適合透過隨附的命令列工具在 CI 流程中使用。
執行需求
以 npm 套件形式透過 stdio 在本機執行,需要 Node.js(v18 或更新版本),或使用預先編譯的獨立執行檔。需要能連線至存證服務的網路。驗證方式為 IMGAUTH_API_KEY 環境變數或互動式裝置流程。另有選用的 IMGAUTH_BASE_URL 與 IMGAUTH_CERT_PAGE_BASE 覆寫設定。
安裝前請注意
存證需要憑證:IMGAUTH_API_KEY 金鑰,或儲存在使用者設定目錄中的裝置流程工作階段權杖。只有 SHA-256 雜湊與你宣告的中繼資料會傳送到服務,檔案內容留在本機。要求 PDF 時憑證會封存到服務商伺服器。憑證 PDF 及其文字為義大利文,且該服務並非 eIDAS 合格信任服務。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

attest-mcp

[OpenSSF Best Practices]

Listed on the official MCP Registry as io.github.SPAZIO-GENESI/attest-mcp.

MCP server and CLI for Spazio Genesi's attestation service — attest, verify, and check the existence of digital works from any MCP-capable AI agent (Claude Code, Claude Desktop, etc.) or straight from a terminal / CI pipeline.

Full privacy: file bytes never leave your device. The fingerprint (SHA-256) is computed locally, streamed from disk — only the hash and optional metadata are sent.

📖 English documentation: attestazione.spaziogenesi.org/en — site, developer docs, and tiers/terms are all available in English.

What it does

The attestation service timestamps a file's SHA-256 fingerprint, signs it (HMAC), and can produce a signed PDF certificate plus an OpenTimestamps proof anchored in Bitcoin. This server exposes that service as MCP tools, so an agent can attest and verify works on your behalf without a browser.

Why this, not just an OpenTimestamps wrapper

Several MCP servers can submit a hash to an OpenTimestamps calendar. As far as we know, this is the only one that hands back a complete proof of existence — a signed PDF certificate, a recognized RFC 3161 timestamp, and a Bitcoin anchor — for free, with the file's bytes never leaving the caller's machine. No account, no upload, no paid notarization chain. If you know of another MCP server with the same combination (full certificate + free + local hashing), we'd genuinely like to hear about it — open an issue.

Built for the European legal and regulatory context

Spazio Genesi is an Italian non-profit (ETS – Ente del Terzo Settore). The attestation service behind this package was designed with the EU regulatory environment in mind, not adapted to it afterwards:

  • GDPR-first, privacy by design: the file itself never reaches our servers — only its SHA-256 fingerprint (and any metadata you choose to declare) is sent.
  • EU data residency: certificates and proofs are archived on Cloudflare R2 under EU jurisdiction.
  • Recognized timestamping, no single point of trust: every certificate carries an RFC 3161 timestamp from an AATL-rooted authority (trusted by Adobe and most PDF readers) and an independent Bitcoin anchor via OpenTimestamps.
  • Honest about eIDAS: this is not (yet) an eIDAS qualified trust service — the signer identity is currently self-signed, and a qualified electronic seal is a planned but unimplemented upgrade. See the technical whitepaper for the full, unvarnished breakdown of what is and isn't guaranteed.

Full tiers and terms: attestazione.spaziogenesi.org/en/condizioni.

Install

Claude Desktop — one command, no manual JSON editing:

bash
npx -y @spazio-genesi/attest-mcp-setup

This finds your claude_desktop_config.json (Windows/macOS/Linux), adds the attest-mcp entry, and backs up the original file first. It refuses to touch anything if the existing file isn't valid JSON — it never guesses. Restart Claude Desktop afterwards. To remove it again: add --uninstall. To preview without writing: add --dry-run.

Claude Code:

bash
claude mcp add attest-mcp -- npx -y @spazio-genesi/attest-mcp

Manual / other clients — add this to your MCP client's config:

json
{  "mcpServers": {    "attest-mcp": {      "command": "npx",      "args": ["-y", "@spazio-genesi/attest-mcp"]    }  }}

Authentication

Two ways to authenticate, matching the underlying service:

  1. API key (for partner integrations, issued manually by Spazio Genesi): set the IMGAUTH_API_KEY environment variable.
  2. Device flow (for personal/agent use): call the authorize tool with no arguments. It returns a URL — open it, approve with the human-verification widget, then call authorize again with the returned code. The session token (24h, 20 attestations) is saved to ~/.config/attest-mcp/credentials.json (permissions 600 where supported) and used automatically after that.

Either way, the credential only unlocks the anti-bot check on attestation — the server-side timestamp, cryptographic signature, and rate limits are unchanged.

Tools

ToolWhat it does
authorizeStart or continue the device-flow authorization.
attest_fileHash a local file (streamed) and attest it.
get_certificate_pdfMint a fresh signed PDF, or recover an already-archived one, saved to disk.
verify_fileHash a local file and check it against a declared hash + signature.
verify_certificateVerify a certificate's signature without a local file.
check_anchorCheck/download the OpenTimestamps (Bitcoin) proof.
service_statusTraffic-light status of the attestation service.

CLI (sg-attest)

Same package, no separate install. The CLI is a bin alongside the MCP server, sharing the same hashing/API/config code — same full privacy (streamed local hash, file bytes never sent), same credentials.

bash
npx -y -p @spazio-genesi/attest-mcp sg-attest attest ./work.pngnpx -y -p @spazio-genesi/attest-mcp sg-attest verify ./work.png --hash <sha256>

(-p is required: sg-attest is a secondary bin of the package, and plain npx -y @spazio-genesi/attest-mcp runs the MCP server instead.)

One advantage over the site: no 1 GB cap. The browser is limited by WebCrypto (which loads the whole file into memory); this CLI streams from disk on Node, so it can attest files of any size.

CommandWhat it doesCredential
attest <file> [--title --author --year --note] [--pdf <out>]Hash locally (streamed) → attest → print fingerprint, attestation, HMAC. Nothing is archived and no /c/<hash> page exists without --pdf; only --pdf <out> mints the signed certificate and prints the verification linkYes
verify <file> [--hash <sha256>]Hash locally; with --hash, compares (exit 2 if different); also reports archive/anchor statusNo
verify-cert --hash --attestazione --hmac [--titolo --autore --anno --note]Verifies a certificate's HMAC signature, no local file involvedNo
cert <hash> [-o <file.pdf>]Recovers an already-archived certificateNo
anchor <hash> [-o <file.ots>]Checks/downloads the OpenTimestamps (Bitcoin) proofNo
statusTraffic-light status of the serviceNo
authorizeDevice flow: prints a URL to approve, polls, saves the token—
--version / --helpVersion (from package.json) and usage—

Every command accepts --json (emits one JSON object on stdout, for scripting) and --quiet (reduces non-essential human-readable output). Errors go to stderr; the CLI never prints a credential (API key or session token) to stdout, stderr, or --json output — same discipline as the MCP server.

Exit codes (a stable contract, for CI/scripting):

CodeMeaning
0Success / positive outcome
1Operational error (network, auth, bad input)
2Negative verification outcome (hash mismatch, invalid signature)

Authentication is the same as the MCP server: IMGAUTH_API_KEY env var, or a session token saved by sg-attest authorize (device flow). There is no --key flag — a credential on the command line ends up in shell history; use the env var (or a CI secret) instead.

A GitHub Action that uses this CLI to attest build artifacts in CI lives in a companion repo: attest-action.

Standalone binaries (no Node required)

For a machine or CI runner without Node.js, download a pre-compiled sg-attest executable from the Releases page — same commands, same behavior, nothing to install.

OSArchitectureFile
Linuxx64sg-attest-linux-x64
Linuxarm64sg-attest-linux-arm64
macOSIntelsg-attest-macos-x64
macOSApple Siliconsg-attest-macos-arm64
Windowsx64sg-attest-windows-x64.exe
WindowsARM64sg-attest-windows-arm64.exe

Each release also includes SHA256SUMS.txt. Verify the download before running it:

bash
sha256sum -c SHA256SUMS.txt --ignore-missing   # Linux/macOS
powershell
(Get-FileHash .\sg-attest-windows-x64.exe -Algorithm SHA256).Hash   # compare by eye to SHA256SUMS.txt

⚠️ The binaries are not code-signed: expect an "unknown publisher" warning from Windows SmartScreen or macOS Gatekeeper the first time you run one. The checksum above is the integrity guarantee in the meantime — the binary is built and published by GitHub Actions directly from this repo's source, nothing hand-uploaded.

Usage is identical to the npm-installed CLI, just call the file directly:

bash
chmod +x ./sg-attest-linux-x64          # Linux/macOS only./sg-attest-linux-x64 attest ./work.png --pdf cert.pdf./sg-attest-linux-x64 status

npx/npm remain the primary distribution channel (and what attest-action uses in CI) — the binaries are an additional channel, not a replacement.

Build provenance (SLSA/in-toto)

The checksum above answers "is this file intact?" — it says nothing about where the bytes came from. Every release since v0.4.2 also carries a signed build provenance attestation (actions/attest-build-provenance, job release in release-binaries.yml): cryptographic proof that the file was built by this repo's own workflow, from a specific commit and tag, not hand-uploaded or swapped afterward.

The GitHub CLI can verify it, but gh attestation verify requires an authenticated gh session even on this public repo (confirmed: it fails with "please run gh auth login" without one) — a real gap if the point is a check anyone can run with zero setup:

bash
gh attestation verify sg-attest-linux-x64 --repo SPAZIO-GENESI/attest-mcp

scripts/verify-provenance.mjs does the same verification with no GitHub credentials at all — only the public attestations REST endpoint (confirmed reachable unauthenticated, even on this public repo) and the sigstore library, which checks the signature against Sigstore's own public infrastructure (Rekor, Fulcio, TUF — no account needed there either):

bash
git clone https://github.com/SPAZIO-GENESI/attest-mcpcd attest-mcp && npm installnode scripts/verify-provenance.mjs ./sg-attest-linux-x64 \  --repo SPAZIO-GENESI/attest-mcp --tag v0.4.2

Exits 0 on success, 1 if the file doesn't match anything the workflow actually built (e.g. a single altered byte makes the digest — and therefore the lookup key itself — no longer match any attestation).

Configuration

Env varDefaultPurpose
IMGAUTH_API_KEY—API key credential, bypasses the device flow.
IMGAUTH_BASE_URLhttps://imgauth.spaziogenesi.orgOverride for local development (http://localhost:8787).
IMGAUTH_CERT_PAGE_BASEhttps://attestazione.spaziogenesi.orgOverride for the permanent-certificate-page base URL.

Troubleshooting

If your client reports "Server disconnected", check its log first: this server writes diagnostics to stderr, which MCP clients capture. On Claude Desktop the log lives in %APPDATA%\Claude\logs\mcp-server-attest-mcp.log (Windows) or ~/Library/Logs/Claude/mcp-server-attest-mcp.log (macOS).

You should see one line per lifecycle event:

[attest-mcp 2026-07-21T11:14:12.948Z] v0.2.2 ready on stdio (node v22.22.2, pid 32316)[attest-mcp 2026-07-21T11:14:12.965Z] exiting (code 0)
  • exiting (code 0) — ordinary shutdown: the client closed stdin. After a laptop sleep or a client restart this is expected; just restart the client to reconnect.
  • fatal: … followed by exiting (code 1) — a real crash, with the stack trace on the preceding line. Please open an issue with it.
  • No ready line at all — the process never started: check that node is on PATH and at least v18 (node --version).

stdout carries the JSON-RPC protocol and is never used for logging.

Known limitation

The certificate PDF and its text are in Italian (Spazio Genesi is an Italian non-profit and the certificate is a legal-facing document). The MCP tool descriptions and this README are in English for an international audience.

Development

bash
npm installnpm test          # unit tests (hash vectors, CLI argument parsing)IMGAUTH_BASE_URL=http://localhost:8787 npm start   # MCP server against a local `wrangler dev`IMGAUTH_BASE_URL=http://localhost:8787 node src/cli.js status   # CLI against the same

test/cli-smoke.local.mjs is a local-only harness (not run by npm test) that exercises every sg-attest command end-to-end against an isolated wrangler dev imgauth instance — see the header comment in that file for the required env vars.

Security

Report vulnerabilities → /sicurezza/ (responsible disclosure policy, safe harbor for good-faith research) — this repo has no security.txt of its own (npm package, no static assets), but the policy covers the whole project.

Contributing

Bug reports and feature requests: open an issue. Pull requests are welcome — keep them focused (one change per PR), make sure npm test passes, and explain the "why" in the description, not just the "what". Test policy: any PR that adds new functionality should add a test for it under test/; npm run lint and npm test both run in CI on every push and pull request. For anything that touches the attestation contract itself (hashing, HMAC verification, the API surface), open an issue first: this client mirrors a contract owned by imgauth, so changes need to stay compatible with it.

License

MIT — see LICENSE. This is a client for the attestation service; the service itself (imgauth) is AGPL-3.0.

來源:README.md,提交 5fed760

工具

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

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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