agent-firewall
Agent Firewall
面向 AI 代理和 MCP 工具的策略型安全层。
Agent Firewall 位于 AI 代理与其可访问的工具之间。每个工具请求在执行前都会根据安全策略进行评估。
功能
允许受信任的工具操作
拒绝危险操作
敏感操作需人工批准
验证工具参数
无匹配策略时默认拒绝
使用最强限制解决策略冲突
记录安全决策日志
保护真实的 MCP 工具调用
Related MCP server: NORNR MCP Control
架构
AI Agent
|
v
MCP Client
|
v
Agent Firewall
|
+-- ALLOW ------+
| |
+-- DENY |
| v
+-- APPROVAL -> MCP Server
|
v
External Tool
The firewall evaluates a request before the MCP tool is called.
Example Policy
Policies are defined in policies.yaml.
rules:
- tool: github.get_file_contents
action: allow
- tool: github.delete_file
action: deny
- tool: payments.send
amount_gt: 100
action: approval
- tool: payments.send
amount_gte: 1000
action: deny
The firewall uses the strongest applicable restriction:
allow < approval < deny
Security Behavior
The firewall fails closed when no matching policy exists.
Invalid payment values are rejected, including:
Negative values
Zero
Strings
Missing amounts
NaN
Infinity
Booleans
Lists
Dictionaries
MCP Integration
Agent Firewall has been tested against a real GitHub MCP server.
Tested behavior:
github.get_file_contents
|
+--> ALLOW
|
v
GitHub MCP Server
|
v
README.md
A protected operation is blocked before the MCP server receives the request:
github.delete_file
|
v
Agent Firewall
|
+--> DENY
|
X
MCP tool is never called
Installation
Clone the repository and create a virtual environment:
python -m venv .venv
Activate it on Windows:
.venv\Scripts\Activate.ps1
Install dependencies:
pip install -r requirements.txt
Running Tests
Run the complete test suite:
pytest
The current test suite includes unit, policy, security, and real MCP integration tests.
Project Structure
agent-firewall/
├── firewall/
│ └── engine.py
├── tests/
│ └── test_engine.py
├── policies.yaml
├── mcp_firewall.py
├── mcp_test_client.py
├── test_attacks.py
├── test_firewall.py
├── test_github_mcp.py
├── test_policy_attacks.py
├── test_policy_conflicts.py
├── requirements.txt
└── README.md
Status
This is an early v0.1 prototype.
The project is currently focused on policy enforcement, MCP integration, security testing, and establishing a reliable authorization layer for AI agents.
Security
This project is experimental software. Do not use it as the sole security control for production systems without independently reviewing and testing the implementation.
License
License to be added.
Then save it and run:
```powershell
pytest
If 16 passed, commit it:
git add README.md
git commit -m "Improve project documentation"
git pushThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceA transparent proxy and execution firewall that intercepts and audits AI agent tool calls against configurable security policies before forwarding them to downstream MCP servers. It provides safe execution environments with features like data redaction, anti-loop protection, and unified alert dispatching.
- AlicenseNot gradedqualityDmaintenanceA governance and control layer for MCP tools that manages tool requests as intents through policy-based approval, queuing, or blocking. It enables secure human oversight and audit trails for consequential agent actions across platforms like Claude Desktop and Cursor.1MIT No Attribution
- AlicenseNot gradedqualityAmaintenanceA zero-trust security gateway for MCP tool calls, inspecting tool identity, arguments, execution decisions, and returned content before risk reaches your coding agent.Apache 2.0
- FlicenseNot gradedqualityCmaintenanceMCP server that provides a security gateway for AI agents, enforcing allow/confirm/deny policies on tool calls and requiring human approval for risky operations, with full audit logging.
Related MCP Connectors
Runtime permission, approval, and audit layer for AI agent tool execution.
Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.
See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Shubhbhangoo/agent-firewall'
If you have feedback or need assistance with the MCP directory API, please join our Discord server