npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aiagentkarl/agent-policy-gateway-mcp

v0.1.0

Published

MCP Server for AI agent policy enforcement - PII detection, guardrails, GDPR/EU AI Act compliance, audit logging, and emergency kill switch

Readme

Agent Policy Gateway MCP Server

MCP server for AI agent policy enforcement. Provides PII detection, guardrails, GDPR/EU AI Act compliance checking, audit logging, and an emergency kill switch.

Features

  • PII Detection — Scan text for emails, phone numbers, SSNs, credit cards, IBANs with automatic redaction
  • Guardrails — Check agent actions against configurable policies (spend limits, domain whitelists, blocked actions)
  • Audit Logging — Append-only JSONL audit trail per agent in ~/.agent-audit-log/
  • GDPR Compliance — Check data processing actions against DSGVO requirements
  • EU AI Act Compliance — Verify AI operations against EU AI Act risk categories
  • Emergency Kill Switch — Instantly block an agent with critical-level audit entry

Installation

npx @aiagentkarl/agent-policy-gateway-mcp

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "policy-gateway": {
      "command": "npx",
      "args": ["-y", "@aiagentkarl/agent-policy-gateway-mcp"]
    }
  }
}

Tools

check_pii

Scan text for personally identifiable information using regex patterns.

Parameters:

  • text (string) — Text to scan

Returns: Found PII types, count, masked examples, redacted text, risk level.

apply_guardrails

Check an agent action against security policies.

Parameters:

  • action (string) — Action to check (e.g. "browse_url", "make_purchase")
  • context (object) — Action context with optional agent_id, target_url, amount_usd, details

Returns: allow/deny/warn decision with violations and recommendations.

log_action

Write an entry to the append-only audit log.

Parameters:

  • agent_id (string) — Unique agent identifier
  • action (string) — Action performed
  • details (string, optional) — Additional details

get_audit_log

Retrieve audit log entries for an agent.

Parameters:

  • agent_id (string) — Agent identifier
  • limit (number, optional) — Max entries to return (default: 50)

check_compliance

Check GDPR and EU AI Act compliance requirements.

Parameters:

  • action_type (string) — Type of action (e.g. "data_collection", "profiling", "high_risk_ai", "agent_operations")
  • jurisdiction (string, optional) — "gdpr", "eu_ai_act", or "both" (default)

Returns: Applicable requirements, risk level, and recommendations per framework.

emergency_stop

Kill switch — immediately block an agent from all further actions.

Parameters:

  • agent_id (string) — Agent to block
  • reason (string) — Reason for emergency stop

Returns: Confirmation with timestamp. Agent remains blocked until server restart.

Compliance Coverage

GDPR / DSGVO

  • Data collection (Art. 6 legal basis, consent)
  • Data processing (Art. 30 records, Art. 32 security)
  • Data sharing (Art. 28 processor agreements)
  • Data deletion (Art. 17 right to erasure)
  • Profiling (Art. 22 automated decision-making)

EU AI Act

  • High-risk AI systems (Art. 9-15)
  • Limited-risk AI (transparency obligations)
  • General-purpose AI models
  • Prohibited AI practices
  • Agent-specific operations

Default Guardrail Policies

| Policy | Default Value | |--------|--------------| | Max spend per action | $100 USD | | Allowed domains | github.com, stackoverflow.com, npmjs.com, pypi.org, wikipedia.org, docs.python.org, developer.mozilla.org | | Blocked actions | delete_production_data, send_mass_email, modify_permissions, access_admin_panel, execute_raw_sql, disable_security | | Require human approval | financial_transaction, data_export, user_deletion, contract_signing |

Audit Log Format

Logs are stored as JSONL files in ~/.agent-audit-log/{agent_id}.jsonl:

{"timestamp":"2026-03-20T10:30:00.000Z","agent_id":"agent-1","type":"action","action":"browse_url","details":"...","status":"logged"}

License

MIT