MCP Permission Guard
A pre-action authorization server for AI agents that classifies tool calls into 14 intent categories, scores risk 0-100, and produces deterministic allow/deny/ask decisions with full audit trail.
README
MCP Permission Guard — Pre-Action Authorization for AI Agents
Intent-based permission system with risk scoring, rule engine, and audit trail. Zero dependencies, pure Python stdlib.
The Problem
Agents execute destructive actions without guardrails. Binary allow/deny prompts don't work (93% auto-approved). The "lethal trifecta" — private data + untrusted content + external communication — creates risks no single tool can detect.
The Solution
MCP Permission Guard classifies tool calls into 14 intent categories, scores risk 0-100, evaluates rules, and produces deterministic allow/deny/ask decisions with full audit trail.
Tools (11)
| Tool | What it does |
|---|---|
classify_intent |
Map tool call → intent category (14 types) |
risk_assess |
Score 0-100 with lethal trifecta detection |
register_rule |
Add allow/deny/ask rule by intent |
evaluate |
Full evaluation: classify + risk + rules → decision |
audit_log |
Query decision history |
list_rules |
Show all registered rules |
remove_rule |
Delete a rule |
set_policy |
Global policy: allow_all / deny_all / ask_all / rules_based |
get_policy |
Read current policy |
get_stats |
Decision statistics |
reset |
Clear all state |
Intent Categories
filesystem_read (10) · filesystem_write (40) · filesystem_delete (80) · network_outbound (50) · network_inbound (30) · code_execution (60) · shell_command (70) · database_write (65) · database_read (20) · credentials_access (90) · config_change (55) · user_management (85) · service_restart (60) · package_install (75)
Tests
python -m pytest tests/ -v # 38 tests, all passing
Inspiration
- nah — Intent-level permission guards
- Open Agent Passport — Pre-action authorization
- Beyond Permission Prompts — Structured authorization
- Claude Code Auto Mode — Two-stage classifier
License
MIT — AMEOBIUS
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.