EU Audit Trail
Tamper-evident audit trail MCP server for EU AI Act & GDPR compliance.
Versions
0.1.1latestTools 10
log_event Record an audit event. PII in content is automatically detected and redacted before storage. Args: event_type: Category of event (e.g. 'user_query', 'document_ingest', 'error'). content: Free-text content to log. PII will be scanned and redacted. metadata: Arbitrary key-value metadata (purpose, source, etc.). session_id: Optional session identifier to group related events. Returns: event_id, timestamp, chain_hash, and list of PII types detected.
log_inference Log an LLM inference call for audit purposes. Args: model: Model identifier (e.g. 'mistral-large'). tokens_in: Number of input tokens. tokens_out: Number of output tokens. data_residency: Where inference was processed (e.g. 'EU-SE'). cost_eur: Estimated cost in EUR. session_id: Optional session identifier. purpose: Processing purpose (recommended for GDPR Art. 30). Returns: event_id, timestamp, and chain_hash.
log_data_access Log a document or data access event for audit purposes. Args: source: Document or data source identifier. action: What was done (e.g. 'ingest', 'retrieve', 'delete'). chunks_retrieved: Number of chunks retrieved (for RAG queries). session_id: Optional session identifier. purpose: Processing purpose (recommended for GDPR Art. 30). Returns: event_id, timestamp, and chain_hash.
query_log Search the audit log with optional filters. Args: event_type: Filter by event type. session_id: Filter by session. since: ISO timestamp lower bound. until: ISO timestamp upper bound. limit: Max number of results (default 50, max 10000). Returns: List of matching audit events.
get_session_trace Get the full ordered trace of a specific session. Args: session_id: The session to trace. Returns: All events for that session in chronological order.
get_stats Get summary statistics for the audit log. Args: since: ISO timestamp lower bound. until: ISO timestamp upper bound. Returns: Total events, breakdown by type, PII detection count, cost totals.
compliance_check Run a technical compliance check against EU AI Act and GDPR. Checks: - EU AI Act Art. 12 — Record-keeping (event logging) https://artificialintelligenceact.eu/article/12/ - EU AI Act Art. 19 — Automatically generated logs (retention, integrity) https://artificialintelligenceact.eu/article/19/ - GDPR Art. 30 — Records of processing activities (purpose, PII categories) https://gdpr.eu/article-30-records-of-processing-activities/ Returns: Overall pass/fail and per-article check results with details and reference URLs. This is a technical checklist, not legal advice.
execute_erasure Execute a GDPR Article 17 right-to-erasure request. Legal basis: GDPR Art. 17 — Right to erasure ("right to be forgotten") https://gdpr.eu/article-17-right-to-be-forgotten/ Redacts event content and removes PII vault entries for the specified entity. The events themselves are kept (to preserve the hash chain for EU AI Act Art. 19 integrity) but their content is replaced with a redaction notice. The erasure itself is logged as a gdpr_erasure event. Args: entity_type: PII type to erase (e.g. 'PERSON', 'EMAIL_ADDRESS'). search_value: Placeholder pattern to match in the vault. Returns: Count of events redacted and vault entries removed.
get_pii_summary Get a summary of PII types detected across all logged events. Returns only counts per entity type, never actual PII values. Returns: Dictionary mapping PII entity types to their occurrence counts.
verify_chain Verify the HMAC-SHA256 hash chain integrity of the audit log. Returns: Whether the chain is intact, and if not, which event broke it.
Permissions 2
filesystem low env_vars low