Agent Policy Gateway MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Agent Policy Gateway MCP Server Check if a purchase of $500 is allowed under my spend policy."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Agent Policy Gateway MCP Server
Compliance and guardrails server for AI agents. Gives companies the tools to run AI agents safely and within regulatory boundaries.
Why This Exists
As AI agents gain autonomy — making purchases, accessing data, sending emails — companies face real compliance risks:
GDPR (EU): Agents processing personal data must follow strict rules. Violations cost up to 4% of global revenue.
EU AI Act (2024): High-risk AI systems need human oversight, transparency, and documentation. Non-compliance means fines up to 35M EUR.
Internal Policies: Companies need spend limits, allowed actions, domain restrictions, and audit trails.
This server provides the "boring infrastructure" that makes autonomous agents enterprise-ready.
Related MCP server: ai-compliance-monitor
Tools
Tool | Description |
| Scan text for PII (emails, phones, SSNs, credit cards, IBANs). Returns found types and redacted version. |
| Check if an action is allowed by configurable policies (spend limits, domain allowlists, blocked actions). |
| Append-only audit log entry with timestamp. Stored in |
| Retrieve audit log entries for compliance review. |
| Check EU AI Act risk level and GDPR requirements for an action type. |
| Kill switch — logs critical event and returns immediate stop signal. |
Installation
# Via pip
pip install agent-policy-gateway-mcp
# Via uvx (no install needed)
uvx agent-policy-gateway-mcpConfiguration
Add to your MCP client config:
{
"mcpServers": {
"policy-gateway": {
"command": "uvx",
"args": ["agent-policy-gateway-mcp"]
}
}
}Or with pip install:
{
"mcpServers": {
"policy-gateway": {
"command": "policy-gateway-server"
}
}
}Usage Examples
PII Detection Before External Calls
check_pii("Send invoice to john.doe@company.com, CC 4532-1234-5678-9012")
→ has_pii: true, found: [email, credit_card], redacted version providedGuardrails for Agent Actions
apply_guardrails("make_purchase", {"amount_usd": 500})
→ denied: exceeds $100 spend limit
apply_guardrails("send_email", {})
→ allowed
apply_guardrails("delete_user_data")
→ denied: blocked actionCompliance Check
check_compliance("automated_decision", "EU")
→ risk_level: high
→ requirements: human oversight, transparency, documentation, fairness audits
→ gdpr_articles: Art. 22 GDPREmergency Stop
emergency_stop("agent-007", "Agent attempting unauthorized data export")
→ kill_switch: true, logged to audit trailCompliance Coverage
EU AI Act Risk Levels
Unacceptable: Biometric identification (real-time) — blocked
High: Automated decisions, credit scoring, recruitment, customer profiling
Limited: Content moderation, data processing
Minimal: Chatbot interactions
GDPR Articles Referenced
Art. 6 — Lawfulness of processing
Art. 9 — Special categories of data
Art. 13/14 — Information obligations
Art. 21 — Right to object
Art. 22 — Automated decision-making
Art. 30 — Records of processing
Art. 35 — Data protection impact assessment
Audit Log Format
Logs are stored as JSONL files in ~/.agent-audit-log/:
{"entry_id": "agent-1_1710936000000", "timestamp": "2024-03-20T12:00:00+00:00", "agent_id": "agent-1", "action": "api_call", "details": "Called external pricing API"}More MCP Servers by AiAgentKarl
Category | Servers |
🔗 Blockchain | |
🌍 Data | Weather · Germany · Agriculture · Space · Aviation · EU Companies |
🔒 Security | |
🤖 Agent Infra | Memory · Directory · Hub · Reputation |
🔬 Research |
License
MIT
Available Tools
6 toolsapply_guardrailsA
Prüft ob eine Agent-Aktion gemäß konfigurierbarer Policies erlaubt ist.
Prüft: Spend-Limits, erlaubte Domains, geblockte Aktionen, Aktionen die menschliche Freigabe brauchen, API-Rate-Limits.
Args: action: Die geplante Aktion (z.B. "send_email", "make_purchase") context: Optionaler Kontext mit Details: - amount_usd: Betrag in USD (für Spend-Checks) - domain: Ziel-Domain (für Domain-Checks) - api_calls_this_minute: Aktuelle API-Calls (für Rate-Limits) - custom_policies: Dict mit Policy-Overrides
Returns: allowed: Boolean ob die Aktion erlaubt ist decision: "allow", "deny" oder "require_approval" reason: Begründung der Entscheidung policy_checked: Welche Policy gegriffen hat
Inputs: action (required), context.
check_complianceA
Prüft ob ein Aktionstyp besondere Anforderungen unter EU AI Act oder DSGVO hat.
Kennt Risikokategorien: automated_decision, biometric_identification, credit_scoring, content_moderation, recruitment, data_processing, customer_profiling, chatbot_interaction.
Args: action_type: Art der Aktion (z.B. "automated_decision", "recruitment") jurisdiction: Rechtsraum — aktuell "EU" unterstützt
Returns: action_type: Abgefragter Aktionstyp jurisdiction: Geprüfter Rechtsraum risk_level: AI Act Risikostufe requirements: Liste der Anforderungen gdpr_articles: Relevante DSGVO-Artikel is_prohibited: Ob die Aktion verboten ist
Inputs: action_type (required), jurisdiction.
check_piiA
Scannt Text auf personenbezogene Daten (PII).
Erkennt: E-Mail-Adressen, Telefonnummern (US/EU), SSNs, Kreditkartennummern und IBANs.
Gibt gefundene PII-Typen und eine bereinigte Version zurück. Nutze dieses Tool BEVOR du Text an externe Services sendest.
Args: text: Der zu prüfende Text
Returns: found_pii: Liste der gefundenen PII-Typen mit Positionen redacted_text: Text mit entfernter PII (ersetzt durch [PII_TYP]) has_pii: Boolean ob PII gefunden wurde pii_count: Anzahl gefundener PII-Elemente
Inputs: text (required).
emergency_stopA
Löst einen Notfall-Stopp für einen Agent aus.
Loggt das Emergency-Stop-Event ins Audit-Log und gibt ein Kill-Switch-Signal zurück. Der aufrufende Agent MUSS nach Erhalt dieses Signals alle laufenden Aktionen sofort beenden.
Args: agent_id: ID des zu stoppenden Agents reason: Grund für den Notfall-Stopp
Returns: kill_switch: True — Agent muss sofort stoppen agent_id: Gestoppter Agent reason: Grund des Stopps timestamp: Zeitstempel audit_entry: ID des Audit-Eintrags
Inputs: agent_id (required), reason (required).
get_audit_logA
Ruft Audit-Log-Einträge für einen Agent ab.
Liest die JSONL-Audit-Datei und gibt die letzten Einträge zurück. Nützlich für Compliance-Reviews und Incident-Analyse.
Args: agent_id: Eindeutige ID des Agents limit: Maximale Anzahl Einträge (Standard: 50)
Returns: entries: Liste der Log-Einträge (neueste zuerst) total_entries: Gesamtanzahl Einträge agent_id: Abgefragter Agent
Inputs: agent_id (required), limit.
log_actionB
Loggt eine Agent-Aktion in ein Append-Only Audit-Log.
Jeder Agent bekommt eine eigene JSONL-Datei unter ~/.agent-audit-log/. Einträge sind unveränderlich und enthalten Zeitstempel, Agent-ID, Aktionstyp und Details.
Args: agent_id: Eindeutige ID des Agents action: Art der Aktion (z.B. "api_call", "data_access") details: Zusätzliche Details zur Aktion
Returns: logged: Boolean ob erfolgreich entry_id: Eindeutige ID des Log-Eintrags file_path: Pfad zur Audit-Datei
Inputs: agent_id (required), action (required), details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct and non-overlapping purpose: policy enforcement, legal compliance, PII scanning, emergency stop, action logging, and audit retrieval. No two tools could be confused for the same operation.
Most tools follow a verb_noun pattern (apply_guardrails, check_compliance, check_pii, get_audit_log, log_action), but 'emergency_stop' is a noun phrase without a leading verb, breaking the pattern slightly.
Six tools is well-scoped for a policy gateway server, covering guardrails, compliance, PII, emergency stop, and audit without feeling too few or excessive.
Core use cases are covered: policy enforcement, legal checks, PII scanning, emergency stop, and audit logging. Minor gaps exist (e.g., no explicit tool for human approval or policy configuration), but agents can still function with these tools.
Related MCP Connectors
Register every AI agent, log every action, prove it. EU AI Act compliance built in.
AI agent security, MCP 2026 schema & graph audits, <250ms guardrails, and compliance dossiers
Compliance MCP for AI agents: sanctions & KYT screening on 50+ chains, stablecoin-freeze, oracle.
Compliance frameworks (SOC 2, ISO 27001, CMMC, NIST, more) delivered to AI agents as MCP tools.
Related MCP Servers
- FlicenseAqualityDmaintenanceProvides policy-based access control, incident tracking, and compliance monitoring to govern AI agent behavior. It enables organizations to enforce security rules and maintain audit trails by validating agent actions against trust levels and pattern-based policies.61-
- FlicenseNot gradedqualityDmaintenanceMaps AI agent behavior to regulatory obligations across EU AI Act, Singapore IMDA Agentic AI Framework, and Colorado AI Act. Checks compliance status and generates regulatory reports.-
- AlicenseAqualityDmaintenanceProvides AI agents with access to a structured compliance dataset covering privacy and AI regulations across jurisdictions, enabling verifiable answers to regulatory questions via tools and resources.12MIT
- AlicenseNot gradedqualityDmaintenanceEnables EU AI Act compliance for AI agent systems by providing risk classification, audit trails, gap analysis, and evidence package generation.63 npmMIT