
Agent Firewall Mcp
io.github.mlawsonkingPublished by GitHub account mlawsonkingv1.3.0Updated Oct 24, 2026
Input/output safety for AI agents: known-pattern injection and obfuscation scan, URL/IP, secrets.
Overview
A local MCP server that screens untrusted text, URLs, IPs, secrets and passwords for AI agents before content reaches the model.
- What you can do
- Scan text or a fetched URL for known prompt-injection and jailbreak patterns plus obfuscation tricks, returning allow, review or block with rule IDs and a redacted copy of any secrets or PII found, with the secret value masked and the label kept, and PEM blocks removed in full. Check a URL or domain for safety using structural heuristics, RDAP domain age and the final URL after redirects, returning safe, suspicious or malicious. Check an IP address for Tor exit nodes, ASN and org, reverse DNS, datacenter-like org names and one Spamhaus ZEN lookup. Check a password against HIBP Pwned Passwords using k-anonymity so the plaintext stays local.
- When to use it
- Useful when an assistant ingests outside content such as web pages, tool output, files or user input and you want a deterministic, non-LLM pre-check before it reaches the model. Also handy for quick URL, IP and password hygiene checks. It is a pattern matcher, so treat it as one layer, not a guarantee.
- Requirements
- Runs locally as a stdio process, typically launched with npx. Network access is needed for URL, IP and password checks and for the daily rules-feed update; the feed can be disabled with --offline, AGENT_GUARDS_NO_FEED=1 or a config setting. No accounts or API keys are declared.
Installation
In SourceWeft
- Open Agent Firewall Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
agent-firewall-mcp
An MCP server that treats every external input as untrusted. It matches text against known prompt-injection patterns, checks URLs and IPs, screens for leaked secrets and PII, and checks passwords against known breaches. Deterministic, no LLM, free.
The basic rule for agent security (OWASP's LLM01) is to treat anything the agent reads from the outside as potentially hostile: web pages, tool output, files, user input. These are the checks for doing that at the point where the content comes in, before it reaches the model.
Install
Tools
scan_content: match text or a fetched URL against 11 known prompt-injection and jailbreak patterns, plus 5 obfuscation checks (zero-width characters, bidi tricks, the Unicode tag block, CSS-hidden text, HTML-comment instructions). Returns allow, review, or block, and the rule IDs that fired. It is a pattern matcher, not a classifier: a novel phrasing or a paraphrase will not be caught, andallowmeans nothing matched rather than that the content is safe.scan_secrets: match text against 22 secret patterns — AWS access key ids, GitHub tokens, OpenAI, Anthropic, Google API keys, Slack, Stripe live secret keys, Twilio, npm tokens, JWTs, PEM private-key blocks, Azure storage keys, SAS tokens and AD client secrets, GCP service-account key ids and OAuth refresh tokens, database and ODBC connection-string passwords, SendGrid, GitLab, Hugging Face, and a generickey = "value"assignment — and 3 PII patterns: email, US SSN, Luhn-checked card numbers. A credential from a vendor not on that list is not found unless it happens to be written as one of those assignments, and that rule is narrow:api-key = "abc12345"matches,{"api_key": "abc12345"}does not, and an unquoted value does not. A clean result is not proof the text is clean. Returns the findings (masked) and a redacted copy: the secret value is replaced and the label stays,api_key = "[REDACTED:Generic Secret Assignment]". The line is not dropped and the document is not scrubbed. A PEM block is removed in full.check_url: URL and domain safety, using structural heuristics (punycode host, 14 known shorteners, 23 abuse-prone TLDs, raw-IP host, credentials in the URL, brand lookalikes), domain age from RDAP, and the final URL after redirects. "Brand lookalike" is a substring test — one of 14 brand names in the hostname that is not the registrable domain, likepaypal.com.secure-login.tk. It is not edit distance and not homoglyphs, sopaypa1.comgets past it. Only the final URL is re-checked, not every hop, and its flags only count when the redirect lands on a different host. Domain age is looked up for the host you passed in, not the host you land on. Returns safe, suspicious, or malicious.check_ip: IP reputation, covering Tor exit nodes (Tor Project bulk exit list), ASN and org (via Team Cymru), reverse DNS, whether the org name looks like a datacenter, and one DNSBL lookup: Spamhaus ZEN, IPv4 only. Spamhaus refuses queries from many cloud resolvers, so the lookup can be inconclusive; that comes back aslisted: nullwith a note and adds nothing to the score. Onlylisted: truemoves the verdict, so an inconclusive lookup ends up with the same verdict as a clean one — readblocklist.listedrather than the verdict alone.check_password: check a password against HIBP's Pwned Passwords using k-anonymity, so the plaintext never leaves the server.
Rule updates
About once a day this server asks the rules feed whether there is a newer ruleset, and applies it if
there is. The request carries two things: which surface asked, which here is facade, and the rules
version already installed. No machine id, no user id, no file names, nothing you scanned.
Bundles are signed with Ed25519 and verified against a public key compiled into this package, so it
does not matter which mirror served one. A bundle that fails its signature, its schema, or its ReDoS
check is discarded and the rules you already had stay in place. --offline turns updates off, as
does AGENT_GUARDS_NO_FEED=1 or {"feed": false} in ~/.agent-guards/config.json. The bundle
format and how to verify one yourself: https://github.com/mlawsonking/MCP/blob/main/rules/README.md
Data comes from HIBP, RDAP, the Tor Project, Team Cymru, DNS, and curated rulesets. It calls https://agent-firewall-seven.vercel.app (set AGENT_FIREWALL_API to override). One of six agent guards in this repo. MIT.
Source: agent-firewall-mcp/README.md at commit 91f3fa7
Tools
0Version history
1- v1.3.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts