firewall
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., "@firewall list the tools you're proxying and any calls you blocked today"
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-firewall
Work in progress.
An AI agent with real tools, and the firewall that stops it being turned against its user.
The agent: a security assistant that reads logs, looks up CVEs and drafts reports, using MCP tool servers.
The firewall: it sits between the agent and every tool. It:
checks tool descriptions for hidden instructions;
applies a deny-by-default policy to every call;
stops secrets leaving through tool arguments;
labels instructions hidden in what tools return;
logs every decision.
Its own models: one of the firewall's checks is a small open LLM fine-tuned to judge tool calls. A tiny GPT trained from scratch shows how the model works inside.
Design and threat model: docs/ARCHITECTURE.md. Where attack cases come from: docs/ATTACK-SOURCES.md.
What works so far
Piece | Status |
Tool servers (MCP, official Python SDK) |
|
Demo agent | Agent loop with a step limit, plus a scripted model for free, repeatable tests |
Firewall | MCP proxy that lists every server's tools as |
Related MCP server: MCP Security Gateway
Results so far (development half)
25 development attacks and 9 normal tasks, each run with the firewall off and on. The agent is a worst-case scripted model that obeys every planted instruction it sees. An attack counts as successful only if a secret, or the attacker's address, actually reached an exit: the outbox, a web request, or an attacker's tool.
Family | Attacks leaked, firewall off | Attacks leaked, firewall on |
Poisoned tool descriptions | 6 of 6 | 0 of 6 |
Rug pulls | 4 of 4 | 0 of 4 |
Shadowing other servers' tools | 4 of 4 | 0 of 4 |
Instructions in a web page | 5 of 5 | 0 of 5 |
Instructions in a log | 4 of 4 | 0 of 4 |
Secrets smuggled in arguments | 3 of 3 | 0 of 3 |
Normal tasks completed | 9 of 9 | 8 of 9 |
Caveats:
These numbers are small: a 0 of 4 has a 95% interval up to 49%.
The rules were adjusted on these cases. The first development run found two leaks (decisions 31 and 32), so this half is no longer a fair test. The held-out half (25 attacks and 11 normal tasks) is scored once, at the end.
The one blocked normal task asks for log lines verbatim in an email. The copied-output check holds that for a person, which is the intended trade-off.
Run time is about 0.03 s median per task either way, with in-process tool servers.
Full numbers: reports/eval-dev.json. How it works: docs/ARCHITECTURE.md.
Quick start
uv sync
uv run pytest
# The evaluation (development half)
uv run python -m agent_firewall.evaluation --split dev
# Run a tool server over stdio, the way an MCP client starts it
uv run python -m agent_firewall.tools files --root ./sharedPut the firewall in front of an agent
Any MCP agent (Claude Desktop, an IDE agent, or the demo agent here) gets one server, the firewall, instead of its tool servers:
{
"mcpServers": {
"firewall": {
"command": "uv",
"args": ["run", "--directory", "/path/to/agent-firewall",
"python", "-m", "agent_firewall", "--config", "examples/firewall.toml"]
}
}
}The firewall starts the servers named in examples/firewall.toml itself, so the agent never learns their commands.
Add the injection model (optional)
Without it, the result scanner uses rules only. The model comes from prompt-injection-guard: build its portable export there, then point the config at it and pin its manifest:
[injection_model]
path = "../prompt-injection-guard/models/portable"
manifest_sha256 = "<sha256 of that folder's manifest.json>"A model whose files don't match the pin stops the firewall rather than loading.
License
MIT
Available Tools
7 toolscves__get_vulnerabilityA
One advisory by id (GHSA-..., CVE-..., PYSEC-...): summary, details and references.
Inputs: vuln_id (required). Returns: id, aliases, details, summary, +3 more
cves__lookup_packageC
Known vulnerabilities affecting one exact version of a package.
Inputs: name (required), version (required), ecosystem (required). Returns: result
email__send_reportB
Draft an email report to one or more addresses. It goes to the outbox for review.
Inputs: to (required), body (required), subject (required). Returns: file, sent, recipients
files__list_filesB
List the files and folders in a folder of the shared folder. Folders end with /.
Inputs: directory. Returns: result
files__read_fileB
Read a text file from the shared folder. Long files are cut at max_bytes.
Inputs: path (required), max_bytes. Returns: result
files__search_fileC
Lines of a text file containing text (plain text, not a pattern), numbered.
Inputs: path (required), text (required). Returns: result
web__fetch_pageA
Fetch a public web page and return its text (no scripts or styles).
Inputs: url (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose: CVE lookup by advisory ID vs package version, file listing/reading/searching, web page fetching, and email report sending. The names and descriptions make the boundaries obvious, so an agent should not confuse them.
All tools use a predictable namespace__verb_noun pattern in snake_case, e.g. cves__get_vulnerability, files__list_files, web__fetch_page, email__send_report. The only variation is the namespace prefix, which is consistent and helpful.
Seven tools is well-scoped for a focused security/investigation server. Each tool earns its place and the set avoids both thin single-tool surfaces and bloated multi-purpose collections.
The surface covers core workflows: CVE lookup by advisory and package version, shared-folder inspection, web fetching, and outbox email reporting. Minor gaps exist, such as no file write/create operations or email reading/inbox management, but agents can work around these for the apparent investigation/reporting purpose.
Maintenance
Related MCP Connectors
Security & DLP proxy for MCP: tool-poisoning scans, PII redaction on tool args/results. Beta.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Hosted MCP runtime where your agent publishes its own tools by tool call and keeps working.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceActs as a gating proxy for MCP servers, merging tools and applying policy, verification, and audit layers.-
- FlicenseNot gradedqualityDmaintenanceEnables safe use of any MCP server by proxying and live-scanning all tool requests and responses, blocking or redacting poison descriptions, indirect prompt injection, malicious arguments, and unauthorized destinations.-
- AlicenseNot gradedqualityBmaintenanceEnables deploying a secure MCP gateway that proxies, sandboxes, and policy-governs third-party MCP servers, with credential vaulting and audited tool access across stdio, SSE, and Streamable HTTP.Apache 2.0
- AlicenseAqualityBmaintenanceFinds MCP servers in the MCP Rating index and connects to them on demand, proxying their tools under namespaced names and notifying the client when tools change. Each server gets a short environment allowlist plus only the variables you name for it, so other API keys in your environment aren't passed on. Files aren't isolated unless you opt into Docker containers.1370 npm1MIT