MCP-Firewall
MCP Firewall
A policy and audit layer for Model Context Protocol (MCP).
MCP Firewall sits transparently between any MCP client (Claude Desktop, Cursor, VS Code, etc.) and an upstream MCP server, allowing you to inspect, allow, block, or audit requests before they reach the server.
No changes are required to your client or your MCP server.
Status
MCP Firewall is an early open-source project.
The core stdio proxy, policy engine, audit logging, and enforcement pipeline are implemented and tested against the official MCP reference servers.
Feedback, bug reports, and contributions are welcome.
Related MCP server: AgentWall
Why?
MCP servers can expose powerful capabilities such as:
Reading files
Writing files
Executing shell commands
Accessing databases
Calling internal APIs
Once an AI agent has access to those tools, there is normally no policy layer deciding what should or shouldn't be allowed.
MCP Firewall adds that missing layer.
Instead of talking directly to an MCP server, the client talks to MCP Firewall. Every request is evaluated against your policy, recorded in the audit log, and either forwarded or blocked before reaching the upstream server.
How it works
Without MCP Firewall
Claude Desktop
│
▼
Filesystem MCP Server
│
▼
delete_file()
│
▼
File deletedWith MCP Firewall
Claude Desktop
│
▼
MCP Firewall
│
├── Policy Evaluation
├── Audit Logging
└── Read-only Checks
│
▼
BLOCK delete_file()
│
▼
JSON-RPC Error returned to the client
(The upstream server never receives the request.)Features
Current release includes:
Transparent stdio proxy
Tool allow lists
Tool deny lists
Parameter-aware policy rules (
match_params)Read-only mode
Structured JSON audit logging
Audit-only mode
JSON-RPC compliant error responses
Single Go binary
No changes required to existing MCP clients or servers
Installation
Option 1: Download Pre-built Binary (Recommended)
Download the latest ready-to-run binary for Windows from the GitHub Releases page.
Download
mcp-firewall.exe.Place it in your project directory or system PATH.
Run
mcp-firewall.exe initto generate a default configuration file.
Option 2: Build from Source (Requires Go 1.22+)
Requirements
Go 1.22+
Node.js (only if using official Node-based MCP reference servers)
Clone the repository:
git clone https://github.com/venu1222g/mcp-firewall.git
cd mcp-firewall
Build:
```bash
make buildor
go build -o mcp-firewall ./cmd/firewallQuick Start
Generate a configuration:
./mcp-firewall initStart the firewall:
./mcp-firewall run --config mcp-firewall.yamlThen point your MCP client at the firewall instead of the upstream server.
Example (Claude Desktop):
{
"mcpServers": {
"filesystem": {
"command": "/path/to/mcp-firewall",
"args": [
"run",
"--config",
"/path/to/mcp-firewall.yaml"
]
}
}
}Restart your MCP client.
Every request now passes through MCP Firewall before reaching the upstream server.
Configuration Examples
Block a tool
policy:
default_action: allow
tools:
deny:
- delete_fileAllow only selected tools
policy:
default_action: block
tools:
allow:
- read_file
- list_directoryProtect a specific file
policy:
default_action: allow
rules:
- id: protect-secrets
method: tools/call
action: block
match_params:
path: /etc/secrets.envAudit a policy before enforcing it
server:
mode: audit-onlyRequests continue to reach the upstream server, but every policy decision is evaluated and recorded.
When you're satisfied with the policy, switch to:
server:
mode: enforceEnable read-only mode
read_only:
enabled: trueRead-only mode blocks supported write/delete operations while continuing to allow read operations.
CLI
Generate a default configuration:
mcp-firewall initRun the proxy:
mcp-firewall run --config mcp-firewall.yamlValidate configuration and environment:
mcp-firewall doctorShow version information:
mcp-firewall versionTested Against
This release has been verified against:
Official
@modelcontextprotocol/server-filesystemOfficial
@modelcontextprotocol/server-everythingJSON-RPC 2.0 stdio transport
Windows
Known Limitations
MCP Firewall is currently at v0.1.x.
The following limitations are known:
Tool allow/deny policies perform exact tool-name matching.
match_paramscurrently matches scalar values only. Array-valued parameters are not matched.Read-only mode protects a built-in list of supported write/delete tools using exact tool names.
Dynamic MCP capability annotations (
readOnlyHint/destructiveHint) are not yet used.action: redactis reserved for a future release and currently behaves as a block.
Roadmap
Planned improvements include:
Regex and glob matching
Dynamic capability discovery
Parameter redaction
HTTP/SSE transport support
Web dashboard
Contributing
Contributions are welcome.
make fmt
make testPlease open an issue before making large architectural changes or adding new features.
License
Apache License 2.0.
This 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
- Alicense-qualityCmaintenancemcpwall is a deterministic security proxy for MCP tool calls — iptables for MCP. It sits between the MCP client and server, intercepting every JSON-RPC request and enforcing YAML-defined policies.Last updated1094Apache 2.0
- Alicense-qualityBmaintenancePolicy-enforcing MCP proxy that blocks dangerous tool calls before they execute. Protects credentials, filesystem, shell, and databases across Claude Desktop, Cursor, Windsurf, and OpenClaw.Last updated2536Apache 2.0

SentinelGateofficial
Alicense-qualityAmaintenanceOpen-source MCP proxy that enforces security policies, content scanning, and audit logging between AI agents and tool serversLast updated25AGPL 3.0- Alicense-qualityCmaintenanceMCP server for AI agent security guardrails. Provides input validation, prompt injection detection, PII redaction, output filtering, policy enforcement, rate limiting, and comprehensive audit logging.Last updated481MIT
Related MCP Connectors
Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.
Crypto transaction firewall and risk tools for MCP agents.
An MCP server for Arcjet - the runtime security platform that ships with your AI code.
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/venu1222g/mcp-firewall'
If you have feedback or need assistance with the MCP directory API, please join our Discord server