C2pa Watermark Mcp

io.github.CSOAI-ORG由 GitHub 帳號 CSOAI-ORG 發布v0.1.1更新於 Nov 5, 2026

C2PA Watermark & Provenance MCP server. Built with c2pa-python.

已驗證STDIO僅桌面安全與監控媒體與設計

概覽

AI 產生的概覽

本機 MCP 伺服器,為 AI 生成素材嵌入並驗證 C2PA 來源清單,並自動加入 AI 生成宣告以對應歐盟 AI 法案第 50 條。

可以做什麼
  • 簽署素材:將 HMAC 簽章的 C2PA 清單嵌入素材位元組,可附加 AI 生成、訓練資料等宣告。
  • 驗證素材:依素材位元組核對清單,回報是否有效及原因。
  • 回報伺服器健康狀態以及原生 c2pa-python SDK 是否可用。
適用情境
當助理產生或處理影像、影片、音訊、PDF 等素材,需要在生成時附加機器可讀的來源資訊並於日後核驗時適用,例如為歐盟 AI 法案第 50 條的揭露要求做準備。
執行需求
以本機 stdio 程序執行,從 PyPI 安裝(pip install c2pa-watermark-mcp),需要 Python。選用的 c2pa 附加套件提供原生 c2pa-python SDK 以支援完整 X.509 鏈。簽章金鑰於每次呼叫時透過 signing_key 參數傳入。未宣告環境變數或身分驗證。
安裝前請注意
簽章金鑰需傳入工具呼叫,應視為機密,避免出現在日誌與對話紀錄中。簽章會寫入素材位元組,建議在副本上操作。HMAC 備援方案僅提供防竄改能力,完整的 X.509 不可否認性需安裝選用的 c2pa-python。README 將 sign_asset 標為付費 Pro 層級。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

c2pa-watermark-mcp

C2PA Content Credentials MCP server — embed and verify machine-readable provenance for AI-generated assets, ahead of the EU AI Act Article 50 deadline (2 December 2026).

Why this exists

EU AI Act Article 50 (Regulation (EU) 2024/1689) requires that AI-generated content be machine-readable + detectable as AI-generated. The c2pa.ai_generated assertion is the C2PA spec's mandated way to do that.

The deadline is 2 December 2026 — about 6 months out. Companies that ship user-facing generative tools without C2PA support face fines up to €35M or 7% of global turnover.

This MCP wraps the official c2pa-python SDK (≥0.9.0) as an MCP server so agents can attach C2PA manifests at generation time and verify provenance at runtime. A pure-stdlib HMAC fallback is included for environments where c2pa-python's native deps won't install (Vercel serverless, CI sandboxes, etc.).

Features

  • 3 MCP tools — sign_asset, verify_asset, status
  • EU AI Act Article 50 ready — auto-injects c2pa.ai_generated assertion
  • Pure-stdlib fallback — works without c2pa-python's native deps
  • HMAC-SHA256 signatures — tamper-evident manifests
  • Optional X.509 chain — via c2pa-python[evm] extra
  • Vercel-deployable — see c2pa-watermark-vercel sibling repo

Tools

ToolPurposeTier
sign_assetEmbed a C2PA manifest into an asset, HMAC-signedPro
verify_assetVerify a manifest against its asset bytesFree
statusReport server health + native SDK availabilityFree

install

bash
# Core (HMAC fallback, no native deps)pip install c2pa-watermark-mcp
# With full c2pa-python (X.509 chain)pip install 'c2pa-watermark-mcp[c2pa]'
# For local developmentgit clone https://github.com/CSOAI-ORG/c2pa-watermark-mcpcd c2pa-watermark-mcppip install -e .[dev]

usage

Sign an asset (Pro tier)

python
from c2pa_watermark_mcp import sign_asset, verify_asset, status
# Server healthprint(status())# → {'server': 'c2pa-watermark-mcp', 'c2pa_python_available': False, ...}
# Sign an assetwith open("output.png", "rb") as f:    asset = f.read()key = b"my-hmac-key-32-bytes-long-aaaaaa"result = sign_asset(    asset_bytes=asset,    asset_mime="image/png",    claim_generator="MEOK-SDXL/1.0",    signing_key=key,    ai_generated=True,    assertions=[        {"label": "c2pa.training", "value": {"model": "sdxl-1.0", "dataset": "internal"}},    ],)print(result["manifest_id"])
# Verifyverdict = verify_asset(asset, result["manifest"], key)print(verdict)  # {'valid': True, 'reasons': [], ...}

Run as MCP server (stdio)

bash
c2pa-watermark-mcp# or with full c2pa-pythonpip install 'c2pa-watermark-mcp[c2pa]'c2pa-watermark-mcp

Run via Docker

bash
docker build -t c2pa-watermark-mcp .docker compose up -d# status endpoint on http://localhost:8000

Deployment to Vercel

See the companion repo c2pa-watermark-vercel for a serverless wrapper exposing /sign, /verify, /status routes.

Architecture

┌─────────────────────────────────────────────────────────────┐│                c2pa-watermark-mcp                            │├─────────────────────────────────────────────────────────────┤│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐         ││  │ sign_asset  │  │verify_asset │  │   status    │         ││  │  (HMAC +    │  │  (HMAC +    │  │ (health +   │         ││  │   c2pa.io)  │  │   tamper)   │  │  capability)│         ││  └─────────────┘  └─────────────┘  └─────────────┘         ││         │                │                │                  ││         └────────────────┴────────────────┘                  ││                          │                                   ││                   ┌──────┴──────┐                           ││                   │ HMAC-SHA256 │  (always available)       ││                   │ + c2pa.io  │   (if c2pa-python installed)││                   └──────┬──────┘                           ││                          │                                   ││  ┌─────────────┐  ┌──────┴──────┐  ┌─────────────┐         ││  │  manifest   │  │  signing   │  │  AI-Act     │         ││  │  generator  │  │   keys     │  │ assertions  │         ││  └─────────────┘  └─────────────┘  └─────────────┘         │└─────────────────────────────────────────────────────────────┘

Why we auto-inject c2pa.ai_generated

The C2PA spec defines this as the standard way to disclose AI-generated content. EU AI Act Article 50 says AI content must be "machine-readable and detectable as AI-generated" — the spec's answer is exactly this assertion. Skipping the auto-inject would be a compliance violation waiting to happen.

FAQ

Q: Does this need c2pa-python? A: No. The pure-stdlib HMAC-SHA256 fallback is fully functional for tamper-evident manifests. Install c2pa-python only if you need the full X.509 chain.

Q: Can I sign an asset that's not a PNG/JPEG? A: Yes. The asset_mime parameter is just metadata; the HMAC is over the bytes themselves. Works for video, audio, PDFs, etc.

Q: How do I rotate the signing key? A: Generate a new key, deploy with both OLD_KEY and NEW_KEY, re-sign all manifests with NEW_KEY, then drop OLD_KEY after expiry. This package supports key rotation via the signing_key constructor arg.

Q: Is this production-ready? A: Yes for tamper-evidence (HMAC). For full X.509 C2PA chain + cryptographic non-repudiation, install c2pa-python ≥ 0.9.0.

License

MIT © MEOK AI Labs / CSOAI-ORG

來源:README.md,提交 3e92220

工具

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

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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