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 分