Skip to main content

Tamper-evident audit trail MCP server for EU AI Act and GDPR compliance

Project description

eu-audit-mcp

Tamper-evident audit trail MCP server for EU AI Act and GDPR compliance. Designed to be integrated into a local desktop application via stdio transport.

Features

  • Tamper-evident logging — HMAC-SHA256 hash chain over all events
  • PII scanning — Automatic detection and redaction via Microsoft Presidio (EU patterns)
  • GDPR erasure — Article 17 right-to-erasure support with audit trail
  • Compliance checks — Technical checklist against EU AI Act Articles 12/19 and GDPR Article 30
  • Local-first — All data stays on your machine in a single SQLite file

Regulatory context

This server implements technical measures for the following EU regulations:

Regulation Articles What it requires
EU AI Act (2024/1689) Art. 12 Automatic recording of events (logs) for high-risk AI systems
Art. 19 Retention of automatically generated logs for at least 6 months
GDPR (2016/679) Art. 17 Right to erasure of personal data ("right to be forgotten")
Art. 30 Records of processing activities, including purposes and data categories

The EU AI Act high-risk obligations enter into force on 2 August 2026.

See LEGAL_REFERENCES.md for the full article texts and a detailed mapping of how each tool addresses each requirement.

Disclaimer: This tool provides a technical checklist, not legal advice. Consult qualified legal counsel for compliance decisions.

Quick start

pip install -e ".[dev]"

Run the server (stdio)

python -m eu_audit_mcp.server

MCP client configuration

{
  "mcpServers": {
    "eu-audit": {
      "command": "python",
      "args": ["-m", "eu_audit_mcp.server"],
      "env": {
        "AUDIT_CONFIG": "./audit_config.yaml"
      }
    }
  }
}

Run tests

pytest tests/

MCP Tools

Tool Description
log_event Record an audit event with automatic PII scanning
log_inference Log an LLM inference call (model, tokens, cost)
log_data_access Log a document/data access event
query_log Search events by time range, type, session
get_session_trace Full ordered trace of a session
get_stats Summary statistics over a time period
compliance_check Check against EU AI Act Art. 12/19 and GDPR Art. 30
execute_erasure GDPR Article 17 right-to-erasure
get_pii_summary Summary of detected PII types (counts only)
verify_chain Verify hash chain integrity

Configuration

Copy the example config and customize:

cp audit_config.example.yaml audit_config.yaml

Set the AUDIT_CONFIG environment variable to point to your config file. Do not commit audit_config.yaml if it contains a chain_secret — it is in .gitignore by default.

Security

See SECURITY.md for the threat model, security measures, and vulnerability reporting.

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eu_audit_mcp-0.1.1.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eu_audit_mcp-0.1.1-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file eu_audit_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: eu_audit_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eu_audit_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 60ecbc0f4c82026d02a1d3490406e3811fb233643e6c24158e75ecd3af113442
MD5 9a6632b421607d1a38826180a3506bf6
BLAKE2b-256 a4a3eca9d4dcf32208bfe767fd9fc9c73f359d034ebbd9020f6bfe14c79bd31f

See more details on using hashes here.

Provenance

The following attestation bundles were made for eu_audit_mcp-0.1.1.tar.gz:

Publisher: publish.yml on jellewas/eu-audit-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eu_audit_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: eu_audit_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eu_audit_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec538990a8f2aa8ae65ac3236e71328d4da289ae878f8454761884aa337a709b
MD5 1ae36a236b18aaaa8403a0f31a59e331
BLAKE2b-256 e612418fe4363b7018ec4ad9ae8a93b42609f9c29d9c69ce2f80bc25c44af20b

See more details on using hashes here.

Provenance

The following attestation bundles were made for eu_audit_mcp-0.1.1-py3-none-any.whl:

Publisher: publish.yml on jellewas/eu-audit-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page