Gen0Sec WAF Rule MCP Server
OfficialProvides tools to generate, validate, and test Wirefilter WAF and Smart Firewall rules for Cloudflare's rule engine, grounded in live schema and CVE exploit templates.
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., "@Gen0Sec WAF Rule MCP Server Validate a WAF rule to block CVE-2024-21626 exploitation attempts."
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.
WAF & Smart-Firewall Rule Generation for Agentic LLMs
An MCP server that lets an LLM author, validate, and test Wirefilter WAF and Smart Firewall rules — grounded in live schema and real CVE exploit templates instead of guesswork.
What it does:
Validates rules against a real engine — expressions are checked (and optionally test-matched) through the Wirefilter rules-validator API, so the model gets real pass/fail feedback, not a hallucinated opinion
Grounds generation in live schema — serves the authoritative actions / expressions / fields / functions / operators / values straight from the rules-validator, so rules use fields that actually exist
Pulls real exploit context — fetches CVE-indexed Nuclei templates from multiple sources (Nuclei Open Source via GitHub, Nuclei Paid via the ProjectDiscovery API) to inform CVE-driven rule generation
Self-updating — periodically refreshes the Wirefilter context and CVE template repositories in the background
Runs anywhere Python 3.12+ runs · ships as a Claude Desktop bundle, a stdio MCP server, or an HTTP container
Related MCP server: crowdsec-local-mcp
Quick start
Claude Desktop (bundle)
# Prerequisites: mcpb (npm install -g @anthropic-ai/mcpb)
make pack # produces the thin, portable gen0sec-mcp-server.mcpbOpen the generated gen0sec-mcp-server.mcpb file — Claude Desktop installs it in about a minute, after which the tools, resources, and prompts are available.
Which bundle: thin vs offline
The GitHub release ships two .mcpb files:
gen0sec-mcp-server.mcpb(thin, default) — carries no native wheels, so it runs on any supported interpreter. On first launch it builds a small private virtualenv fromrequirements.txt, which needs one-time network access to PyPI. Nothing global is touched, and the host Python is never modified.gen0sec-mcp-server-offline.mcpb(air-gapped) — carries prebuilt wheels for several interpreter targets underserver/lib/<abi-tag>/(CPython 3.12–3.13 on macOS arm64, Linux x86_64/aarch64, Windows x86_64). On a covered target it starts with no network access. On an uncovered interpreter it degrades to the thin bundle's first-run venv.
The extension picks the right path automatically; the only difference is whether a
one-time network install can happen at first launch. Set Path to Python
executable in the extension config to a Python ≥ 3.12 if the default python3
isn't suitable.
Building locally:
make pack # thin bundle (release default)
make vendor-multi # add this host's ABI dir to server/lib/<abi-tag>/
make pack-offline # offline bundle from whatever ABI dirs are presentThe full cross-platform offline bundle is assembled in CI, where each target is
vendored natively (see .github/workflows/offline-bundle.yaml).
Cursor IDE — local (stdio)
Add to ~/.cursor/mcp.json (%USERPROFILE%\.cursor\mcp.json on Windows):
{
"mcpServers": {
"waf-rule-mcp": {
"command": "uv",
"args": [
"run",
"--project", "/absolute/path/to/mcp-server",
"/absolute/path/to/mcp-server/server/main.py"
],
"env": {
"WAF_VALIDATION_API_URL": "https://public.gen0sec.com/v1/waf/validate"
}
}
}
}WAF_VALIDATION_API_URL is optional — if unset, the value from server/config.yaml is used. Restart Cursor to apply.
Docker (HTTP)
docker build -t waf-rule-mcp .
docker run -p 8000:8000 waf-rule-mcpThen point your MCP client at it:
{
"mcpServers": {
"waf-rule-mcp": { "url": "http://localhost:8000" }
}
}The WAF rule validation API must be reachable for the validation tools to work. Set its URL via
WAF_VALIDATION_API_URLorserver/config.yaml.
MCP surface
Tools
Tool | Purpose |
| Retrieve a CVE-indexed vulnerability template from a preferred source (Nuclei Open Source or Nuclei Paid API) |
| Fetch a CVE template from all enabled sources for cross-source comparison |
| List the registered CVE source plugins and their status |
| Validate a Wirefilter rule expression ( |
| Validate a Wirefilter rule and match it against test data (mock data if none given) |
| Fetch WAF context from Wirefilter docs: actions, expressions, fields, functions, operators, values |
| Fetch the live, authoritative Wirefilter field/function schema directly from the rules-validator |
Resources
URI | Reference |
| Actions available in the Rules language |
| Expressions available in the Rules language |
| Fields available in the Rules language |
| Functions available in the Rules language |
| Operators available in the Rules language |
| Values available in the Rules language |
Prompts
Prompt | Generates a rule from… |
| a natural-language description |
| a CVE index |
| a natural-language description, as an L3/L4 + JA4 Smart Firewall rule (no |
Architecture
flowchart TD
LLM([Agentic LLM / MCP client]) <--> MCP
subgraph MCP[Gen0Sec WAF Rule MCP Server]
T[Tools]
R["Resources<br/>wafcontext://*"]
P[Prompts]
RU[Resource updater<br/>periodic refresh]
end
T -->|validate / fields| RV[Wirefilter rules-validator API]
R -->|live schema| RV
T -->|CVE templates| CS
subgraph CS[CVE sources]
N1[Nuclei Open Source<br/>GitHub]
N2[Nuclei Paid<br/>ProjectDiscovery API]
end
RU -.refreshes.-> CS
RU -.refreshes.-> RVDocumentation
Product documentation and guides | |
Validation API URL, CVE source toggles, update intervals | |
Claude Desktop bundle manifest and user-configurable options | |
The rule expression language this server targets |
Thank you!
Cloudflare for Wirefilter
ProjectDiscovery for the Nuclei templates
Available Tools
7 toolsfetch_cve_from_all_sourcesFetch CVE from all sourcesA
Fetch CVE vulnerability template from ALL enabled sources. Useful for comparing data across different sources.
Inputs: cve_id (required).
fetch_cve_vulnerability_templateFetch CVE vulnerability templateB
Retrieve a CVE Indexed vulnerability template from multiple sources (Nuclei Open Source, Nuclei Paid API). Returns detailed information for the exploit including metadata, severity, description, references, classification, and characteristic request patterns.
Inputs: cve_id (required), source.
get_rule_fieldsGet authoritative rule fields (WAF or Smart Firewall)A
Fetch the live, authoritative Wirefilter field/function schema directly from the rules-validator for the given rule_type ('waf' = HTTP L7 fields; 'smart_firewall' = L3/L4 + JA4 fields, no http.*). This is the single source of truth and never drifts from what validation accepts — prefer it over the static wafcontext://fields resource when building expressions. Falls back to static context if the validator is unreachable.
Inputs: rule_type.
get_waf_contextGet WAF contextB
Fetch WAF context from Wirefilter documentation about actions, expressions, fields, functions, operators and values.
Inputs: no named parameters.
list_cve_sourcesList CVE sourcesB
List all registered CVE source plugins and their status.
Inputs: no named parameters.
validate_waf_expressionValidate a rule expression (WAF or Smart Firewall)A
Validate a Wirefilter rule expression. rule_type selects the scheme: 'waf' (HTTP L7 fields, default) or 'smart_firewall' (L3/L4 + JA4 fields; http.* fields are NOT available and will be rejected). Optionally test against custom test data. Returns a dictionary with valid (boolean) and error_message (string) when invalid.
Inputs: expression (required), test, rule_type.
validate_waf_expression_with_testsValidate a rule expression with tests (WAF or Smart Firewall)A
Validate a Wirefilter rule expression and match it against test data (mock data if none given). rule_type selects the scheme: 'waf' (HTTP L7, default) or 'smart_firewall' (L3/L4 + JA4; no http.* fields). Returns valid (boolean), error_message (string), matched (boolean), and test_error (string) if the test fails.
Inputs: rule (required), test, rule_type.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Tools are clearly divided into two groups: CVE vulnerability template retrieval and WAF rule validation/context. Within each group, tools have distinct purposes (e.g., fetch specific template vs. list sources vs. fetch from all; validate expression vs. validate with tests vs. get context vs. get fields). No overlapping functionality.
Naming conventions are consistent within each tool group: 'validate_waf_expression' and 'get_waf_context' follow a verb_noun pattern, while CVE tools use 'fetch_cve_*' and 'list_*'. There is slight inconsistency across groups, but overall readable and predictable.
Seven tools is well-scoped for the server's purpose, covering both CVE template access and WAF rule validation/documentation without being excessive or insufficient.
The tool set covers core CVE retrieval (fetch specific, list sources, fetch all) and comprehensive WAF validation (validate expressions, test with data, get context, get authoritative fields). Minor gap: no CVE search/filtering or rule management tools, but these are arguably outside the intended scope.
Maintenance
Related MCP Connectors
Real-time MCP & A2A prompt-injection, jailbreak, and tool-schema poisoning firewall for AI agents.
The WAF for agents. Pattern-based + heuristic firewall scans prompts, RAG documents, tool argume...
Zero-install security baseline for AI coding agents — OWASP/CWE-cited rules over MCP.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceSimulates security attacks by providing LLM attack test payloads to validate ModSecurity-compatible detection rules.Apache 2.0

crowdsec-local-mcpofficial
AlicenseBqualityCmaintenanceGenerates, validates, and deploys CrowdSec WAF rules and scenarios through natural language.2425MIT- AlicenseAqualityDmaintenanceProvides tools to test regex patterns for correctness, performance (ReDoS), and memory usage, and suggests safe rewrites. Enables LLMs to iterate on regex generation with verifiable feedback.9MIT
- FlicenseNot gradedqualityCmaintenanceEnables LLM agents to automate Check Point firewall rule changes by translating natural language access requests into correct, first-match-safe policy updates via MCP tools.-