Imperva Cloud WAF MCP Server
OfficialThis server lets AI assistants read-only query and analyze Imperva Cloud WAF configurations (sites, domains, policies, and rules) through natural language MCP tools.
Get Sites: fetch sites by account, names, IDs, or sub-account IDs, with pagination and details like status, CNAMEs, and creation time.
Get Domains: fetch domains by account, site IDs, domain IDs, or names; includes A records, CNAME, status, and creation date.
Get Policies: query policies with filters by site, policy ID/name/type/sub-account, and optionally retrieve full extended settings, asset assignments, and sub-account permissions.
Get Rules: retrieve rate, security, forward, redirect, and rewrite rules with filters by site, rule ID/name/category/sub-account, including rule actions, filters, rate limits, redirects, rewrites, and block duration details.
All operations are read-only in this beta; creating, modifying, or deleting assets is not supported.
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., "@Imperva Cloud WAF MCP Server List all ACL policies for my production sites"
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.
Imperva Cloud WAF MCP Server (Beta)
A Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with Imperva Cloud WAF. This integration allows you to query, analyze, and manage your Cloud WAF configuration through natural language conversations.
Note: This is a beta version with read-only capabilities. Write operations are not yet supported.
What is MCP?
The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect to external data sources and tools. Think of it as a universal adapter that lets Claude and other AI assistants interact with your services.
Related MCP server: Cloudflare Control
Why Use This?
Managing Cloud WAF configurations often requires:
Navigating through multiple dashboards and interfaces
Running complex API queries with specific filters
Understanding relationships between sites, domains, policies, and rules
Analyzing security configurations across multiple accounts
With this MCP server, you can ask your AI assistant questions like:
"Show me all the security rules for my production site"
"Which sites are using the WAF policy named 'strict-security'?"
"List all domains that have rate limiting rules configured"
"What's the current configuration of site ID 12345?"
Your AI assistant will use the MCP tools to fetch the information and present it in a clear, conversational format.
Available Tools
The server provides four powerful tools for Cloud WAF management:
Beta Scope
Read-Only Scope
This beta is designed for inspection and analysis, operating in read-only mode.
While you can comprehensively query and explore your configurations, creating, modifying, or deleting assets (policies, rules, sites, or domains) is not currently supported through this MCP server.
For write operations, please use the Imperva Cloud WAF Console.
These capabilities may be added in future releases. For now, use the Imperva Cloud WAF Console to perform write operations.
Beta Feedback - We Need Your Input!
This is a beta release, and your feedback will shape future development.
What we're looking to learn:
Which queries do you run most frequently?
What configuration tasks would you want your AI assistant to help with?
What features would save you the most time?
What's confusing or unclear?
Please share your feedback by opening an issue on GitHub or contacting your Imperva representative.
Installation
Choose your preferred AI assistant to get started:
Option 1: Claude Desktop
Prerequisites
Claude Desktop - Download here
Docker Desktop - Required to run the MCP server
Imperva Cloud WAF API Credentials
API ID and API Key with appropriate permissions
Contact Imperva Support to obtain credentials
Configuration
Locate your Claude Desktop configuration file:
# macOS/Linux ~/Library/Application Support/Claude/claude_desktop_config.json # Windows %APPDATA%\Claude\claude_desktop_config.jsonIf the file doesn't exist, create it:
# macOS/Linux mkdir -p ~/Library/Application\ Support/Claude touch ~/Library/Application\ Support/Claude/claude_desktop_config.json # Windows (PowerShell) New-Item -Path "$env:APPDATA\Claude\claude_desktop_config.json" -ItemType File -ForceAdd the MCP server configuration, replacing
YOUR_API_IDandYOUR_API_KEYwith your actual Imperva credentials:{ "mcpServers": { "imperva-cloudwaf": { "command": "docker", "args": [ "run", "--rm", "--pull", "always", "-i", "-e", "API_ID=YOUR_API_ID", "-e", "API_KEY=YOUR_API_KEY", "ghcr.io/thalesgroup/imperva-cloud-waf-mcp-server:latest" ] } } }If you already have other MCP servers configured, add the
imperva-cloudwafblock inside the existingmcpServersobject.
Restart Claude Desktop.
Verification
After restarting Claude Desktop, the application should start without errors. Within a few seconds, the Imperva Cloud WAF tools will appear in the MCP tools section.
Option 2: VS Code with GitHub Copilot
Prerequisites
Visual Studio Code - Download here
GitHub Copilot - Install the GitHub Copilot extension and ensure you have an active subscription
Docker Desktop - Required to run the MCP server
Imperva Cloud WAF API Credentials
API ID and API Key with appropriate permissions
Contact Imperva Support to obtain credentials
Configuration
Open VS Code and launch the Command Palette:
macOS:
Command + Shift + PWindows/Linux:
Ctrl + Shift + P
Type
MCPand select MCP: Add ServerWhen prompted, select Command (Stdio) as the server type
Enter the following command, replacing
YOUR_API_IDandYOUR_API_KEYwith your actual Imperva credentials:docker run --rm --pull always -i -e API_ID=YOUR_API_ID -e API_KEY=YOUR_API_KEY ghcr.io/thalesgroup/imperva-cloud-waf-mcp-server:latestGive the server a name when prompted (e.g.,
Imperva)VS Code will open the
mcp.jsonconfiguration file showing all your MCP servers. Find the Imperva entry and wait for its status to change to RunningThis may take a few minutes while Docker downloads the image
Verification
Once the server status shows Running in the mcp.json file, open GitHub Copilot and test the connection by asking:
How many sites are there under my account in Imperva?Copilot should use the Imperva MCP server to fetch and display your Cloud WAF sites.
Usage Examples
Once configured, you can interact with your Cloud WAF account through natural language:
Example 1: Querying Sites
You: Show me all active sites in my account
Your AI assistant will use the get_sites_tool to fetch and display
your sites with their current status, CNAMEs, and configuration details.Example 2: Checking Domain Configuration
You: What's the DNS configuration for my domain example.com?
Your AI assistant will use the get_domains_tool to find the domain and show you
the A records, CNAME, and current status.Example 3: Analyzing Security Policies
You: List all WAF policies that are assigned to site ID 12345
Your AI assistant will use the get_policies_tool to retrieve policies
filtered by site ID and policy type, showing you their settings and configurations.Example 4: Reviewing Security Rules
You: Show me all rate limiting rules for my production sites
Your AI assistant will use the get_rules_tool with the "Rates" category filter
to display rate limiting rules and their configurations.Example 5: Complex Analysis
You: Compare the security policies between my staging and production sites
Your AI assistant will fetch policies for both sites using the appropriate filters and
provide a comparison of their configurations.Authentication
The MCP server supports API Key authentication. Your credentials are passed securely through environment variables and are never stored or logged by the MCP server.
Advanced: Running as a Remote HTTP Server
The Docker image also supports running as a shared HTTP server (STDIO=false) instead of the
per-client stdio mode used by the Claude Desktop / VS Code setups above — for example in
Docker with -p 8050:8050, or in Kubernetes. If you run it this way, note the following:
Caller authentication is required. The server refuses to start
streamable-http(STDIO=false) unlessAUTH_MODE=pluginis set with a real caller-verifyingAuthStrategysupplied viaAUTH_PROVIDER— the defaultAUTH_MODE=api_keyonly attaches this server's own outbound Imperva credentials, it never verifies who's calling. This is a deliberate fail-closed default, added after a responsibly-disclosed report that earlier versions started with no inbound authentication at all (seeSECURITY.md). To explicitly accept that risk instead (not recommended), setALLOW_UNAUTHENTICATED_HTTP=true.Breaking change for existing
STDIO=falsedeployments: the HTTP bind address now defaults toHTTP_HOST=127.0.0.1instead of0.0.0.0. If you're running this behind Docker's-pport publishing or a Kubernetes Service, you must explicitly setHTTP_HOST=0.0.0.0— container/pod port-forwarding reaches the container's real network interface, not loopback, so the previous all-interfaces behavior needs to be requested explicitly rather than assumed. The same applies to the Prometheus metrics port (PROMETHEUS_CLIENT_ENABLED=true).
Troubleshooting
Server Not Appearing
For Claude Desktop:
Verify Docker Desktop is running
Check that your
claude_desktop_config.jsonis valid JSONEnsure API credentials are correctly set
Restart Claude Desktop completely
Check Claude Desktop logs for error messages
For VS Code with GitHub Copilot:
Verify Docker Desktop is running
Check that the
mcp.jsonfile was created correctlyEnsure API credentials are correctly set in the command
Wait for the server status to show "Running" (may take a few minutes)
Restart VS Code if the server doesn't appear
Authentication Errors
Verify your API ID and API Key are correct
Ensure your API credentials have the necessary permissions
Check that your credentials haven't expired
Connection Issues
Verify you have internet connectivity
Check if Docker can pull and run images
Ensure no firewall is blocking Docker or your AI assistant application
Tool Errors from the MCP Server
If you start receiving errors from the MCP tools, you may be running an outdated version of the MCP server.
Since the Docker configuration uses --pull always, simply restarting your AI assistant application will automatically pull the latest Docker image.
For Claude Desktop: Fully quit the application (ensure the process is completely killed) before restarting to ensure the old container is removed and a fresh one starts with the latest version.
For VS Code: Close and reopen VS Code, or use the Command Palette to reload the MCP server configuration.
Development
Running Locally
For development or testing, you can run the server directly with Python:
Clone the repository
Install dependencies:
curl -LsSf https://astral.sh/uv/install.sh | sh uv syncCreate a
.envfile:API_ID=your_api_id API_KEY=your_api_keyRun the server:
uv run python -m cwaf_external_mcp.server
Running Tests
pytest tests/Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the Apache License - see the LICENSE file for details.
Warning All the requirements listed have their own License.
Support
For issues related to:
This MCP server: Open an issue on GitHub
Imperva Cloud WAF API: Contact Imperva Support
Claude Desktop: Visit Claude Help Center
Learn More
Built with FastMCP and powered by the Imperva Cloud WAF API.
Available Tools
4 toolsget_domains_by_filters_toolA
Fetches the domains associated with a specific site under a given account. To get a single domain details provide the domain ID, or the domain name. Use the most effective filter according to the context, for example, if you have the domain ID use it; if you have the domain name use it. If you get an empty list, it means that the domain does not exist, or you do not have access to it, avoid getting all domains and filter on your side. Terminology: CloudWAF site can have multiple domains; Domains that do not match the site name are sometimes referred to as CNAME reuse domains, alternative domains, or vanity domains.
Inputs: account_id (required), domain_ids, site_ids, names, +2 more. Returns: result
get_polices_of_account_by_filter_toolC
Fetches all policies of a given account.
Inputs: account_id (required), site_ids, sub_accounts_ids, policies_ids, +5 more. Returns: result
get_rules_of_account_toolC
Fetches the custom rules details associated with the sites under the given account. The supported type of rules are: rate rules, security rules, forward rules, redirect rules, rewrite rules
Inputs: account_id (required), site_ids, sub_accounts_ids, rules_ids, +4 more. Returns: result
get_sites_details_of_a_given_account_toolA
Fetches the list of sites for a given account. To get a single site details provide the site Id or the site name. Use the most effective filter according to the context, for example, if you have the site ID use it; if you have the site name use it; If you get an empty list, it means that the site does not exist, or you do not have access to it, avoid getting all sites and filter on your side. Terminology: The site name is not always the domain name, to get the list of domains use the domains_get_domains_of_specific_site_tool.
Inputs: account_id (required), site_ids, names, sub_account_ids, +2 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct resource (domains, policies, rules, sites) with clear descriptions, so there is no ambiguity about which tool to use for a given purpose.
Tool names are inconsistent: some use 'by_filters', others 'of_account', and one uses 'of_a_given_account'. The 'tool' suffix is unnecessary and varies in placement. Naming pattern is not uniform.
With 4 tools, the set covers the main entities (sites, domains, policies, rules) without being overly numerous or sparse for a read-only WAF information server.
Only read operations are provided; there are no create, update, or delete tools for any resource. Agents cannot manage the WAF configuration, only retrieve existing data.
Maintenance
Related MCP Connectors
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Ask about your Kodem Security data and act on findings in plain language, with your permissions.
The WAF for agents. Pattern-based + heuristic firewall scans prompts, RAG documents, tool argume...
Ask your Quickbase apps in plain language. Read-only by default; writes need human approval.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides seamless integration with Fastly's Next-Gen Web Application Firewall API, enabling AI assistants to manage web application security through natural language interactions.291MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Cloudflare infrastructure including DNS records, cache purging, SSL settings, Workers, and analytics through the Cloudflare API. Eliminates dashboard context-switching by allowing natural language control of domain management and infrastructure operations.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Check Point CloudGuard WAF configuration through natural language, including assets, profiles, practices, and policy.1Apache 2.0

crowdsec-local-mcpofficial
AlicenseBqualityCmaintenanceGenerates, validates, and deploys CrowdSec WAF rules and scenarios through natural language.2426MIT