meok-eu-code-of-practice-mcp
A Model Context Protocol server that wraps C2PA Content Credentials and watermarking into a single, signed two-layer attestation manifest compliant with the EU Code of Practice on AI content marking (draft 2, finalising June 2026), which operationalises EU AI Act Article 50(2) transparency obligations (enforceable 2 August 2026 for new systems).
Why this exists
Article 50(2) of the EU AI Act requires providers and deployers of AI systems that generate or manipulate image, audio, video or text content to ensure the output is machine-readable and detectable as artificially generated or manipulated. The Code of Practice (draft 2) prescribes a two-layer approach:
- Layer 1 — C2PA Content Credentials: cryptographic provenance (assertions, signed manifest store).
- Layer 2 — Watermarking: visible or invisible signal embedded in the content bits.
Optional best-practice: fingerprinting + immutable audit logging.
This MCP produces a single signed manifest that says "this content has been marked per the EU Code of Practice, here's the C2PA assertion, here's the watermark, here's the audit trail, signed by MEOK", plus a public verify_url so any auditor can confirm Code-of-Practice compliance without calling the MCP — the Let's Encrypt model applied to content marking.
The two-layer schema (this is the IP)
{
"code_of_practice_version": "draft-2-2026-06",
"mcp_version": "1.0.0",
"generated_at": "<ISO-8601 timestamp>",
"content_hash": "<sha256 hex of content>",
"layers": [
{
"c2pa_manifest": {
"claim_generator": "meok-c2pa-watermark-mcp/1.0.0",
"claim_generator_info": [{ "name": "MEOK", "version": "1.0.0" }],
"assertions": [
{ "label": "c2pa.actions",
"data": { "actions": ["c2pa.created", "c2pa.transcoded"] } }
],
"signature": "<c2pa signature hex>"
},
"c2pa_store_path": "<local C2PA store path>",
"c2pa_verify_url": "https://verify.contentcredentials.org/verify/<...>"
},
{
"watermark_type": "invisible",
"watermark_payload": "<base64 payload>",
"embedding_method": "dwt-dct-svd",
"detection_confidence": 0.97
}
],
"signature": "<ed25519 128-hex-char signature over canonical JSON>"
}
The outer Ed25519 signature is produced by this MCP and covers canonicaljson.dumps(audit, sort_keys=True).
Tools (exactly 4)
| # | Tool | Purpose |
|---|---|---|
| 1 | mark_content(content, content_type, generator) |
Produce a signed two-layer attestation manifest for a piece of content. |
| 2 | verify_attestation(manifest) |
Verify a manifest's C2PA layer, watermark layer, and Ed25519 signature. |
| 3 | detect_ai_content(content) |
Heuristically score whether content appears AI-generated and optionally match a fingerprint. |
| 4 | compliance_check(operator) |
Return a Code-of-Practice compliance posture for a given operator. |
All tools return JSON with: status, manifest (where applicable), compliance_posture, recommendations, signature, code_of_practice_version.
Verify URL template
https://meok-attestation-api.vercel.app/verify/<content_hash>
Any auditor with a content_hash can confirm Code-of-Practice compliance without holding MCP credentials.
Installation
pip install meok-eu-code-of-practice-mcp
# or, from source:
pip install -e .
Running the MCP server
meok-eu-code-of-practice-mcp
Testing
pip install -e ".[test]"
pytest tests/ -q
Security note
This package ships with a hardcoded demo Ed25519 key for reproducibility. In production, replace SIGNING_KEY in server.py with a key fetched from a KMS (AWS KMS / GCP KMS / HSM). The comment in the source marks the swap point.
License
MIT — Copyright (c) 2026 MEOK AI Labs CSOAI LTD.
mcp-name: io.github.CSOAI-ORG/meok-eu-code-of-practice-mcp
Metadata
Release files for meok-eu-code-of-practice-mcp 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| meok_eu_code_of_practice_mcp-1.0.2.tar.gz | 13.9 kB | Without provenance | Details for meok_eu_code_of_practice_mcp-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| meok_eu_code_of_practice_mcp-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for meok_eu_code_of_practice_mcp-1.0.2-py3-none-any.whl |
Total release size: 25.7 kB
Release files / meok_eu_code_of_practice_mcp-1.0.2.tar.gz
| Download URL | meok_eu_code_of_practice_mcp-1.0.2.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce0da59fa85fef226844333966cf1cff9b42ec6406e89cbebdc6b3445c2b445d
|
|
BLAKE2b-256 checksum How to use checksums |
bc7cbb20df0fd9bed82eba2b4be622da0a27c49247d1ad5f0d3019fe8324fad5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / meok_eu_code_of_practice_mcp-1.0.2-py3-none-any.whl
| Download URL | meok_eu_code_of_practice_mcp-1.0.2-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36de8978416669a2d96f22555e83bdf332a9e8f1bcf28b28d1997985a37b2196
|
|
BLAKE2b-256 checksum How to use checksums |
71c1128fd0db9e6eca8cf81b4dc5e5cd933c3ea795003247a02f54bf9934ecb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for meok-eu-code-of-practice-mcp 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.