AutomationFlowsAI & RAG › Test Waf Security Interactively with an AI Agent and Waftester Mcp

Test Waf Security Interactively with an AI Agent and Waftester Mcp

ByQandil @qandil on n8n.io

A conversational AI agent that connects to WAFtester via MCP (Model Context Protocol) for interactive Web Application Firewall security testing. Type natural language requests — the agent picks the right tools, runs the tests, and explains the results.

Chat trigger trigger★★☆☆☆ complexityAI-powered6 nodesChat TriggerAgentMcp Client ToolOpenAI Chat
AI & RAG Trigger: Chat trigger Nodes: 6 Complexity: ★★☆☆☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #13443 — we link there as the canonical source.

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "name": "Test WAF security interactively with AI agent and WAFtester MCP",
  "tags": [],
  "nodes": [
    {
      "id": "f22a0b1c-3c36-4ca0-87b7-a2eb1b08ed91",
      "name": "Chat Trigger",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "notes": "Opens the n8n chat interface. Type your security testing requests here.",
      "position": [
        -192,
        288
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "fe0e963b-e2f8-44ef-9047-a658abe23a49",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "notes": "Routes chat messages to WAFtester tools. The system prompt guides the agent through the standard testing workflow.",
      "position": [
        48,
        288
      ],
      "parameters": {
        "options": {
          "systemMessage": "You are a WAF security testing assistant powered by WAFtester. You help users test their Web Application Firewalls by running scans, detecting WAF vendors, discovering attack surfaces, finding bypasses, and generating security assessments.\n\nYour typical workflow:\n1. detect_waf - Identify the WAF vendor protecting the target\n2. discover - Map the attack surface (endpoints, parameters, technologies)\n3. learn - Generate a targeted test plan based on discovery\n4. scan - Fire attack payloads and measure detection rate\n5. bypass - Find WAF evasion techniques using the mutation matrix\n6. assess - Generate a formal WAF grade with F1/MCC metrics\n\nAlways start with detect_waf when given a new target. Be explicit about what each tool does and what the results mean. When scans find bypasses, explain the security impact clearly.\n\nAsync tools (scan, assess, bypass, discover, discover_bypasses, event_crawl) return a task_id. Use get_task_status to poll for results.\n\nAvailable attack categories: sqli, xss, traversal, auth, ssrf, ssti, cmdi, xxe, nosqli, graphql, cors, crlf, redirect, upload, jwt, oauth, prototype, deserialize."
        }
      },
      "typeVersion": 2
    },
    {
      "id": "87146f4d-a2ba-4cfc-98ac-5e83612fbde1",
      "name": "WAFtester MCP",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "notes": "Connects to WAFtester MCP server via SSE. All 18 WAFtester tools are auto-discovered.",
      "position": [
        192,
        496
      ],
      "parameters": {
        "sseEndpoint": "={{ $env.WAFTESTER_SSE_URL || 'http://waftester:8080/sse' }}"
      },
      "typeVersion": 1
    },
    {
      "id": "4d2d9f26-1870-4ea1-82b6-1b45d070d0f1",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "notes": "Configure your OpenAI API credentials here. GPT-4o recommended for best results.",
      "position": [
        48,
        496
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "60117f92-b6c4-4de6-a8d8-3304545f5725",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        0
      ],
      "parameters": {
        "width": 640,
        "height": 780,
        "content": "### How it works\n\nChat with an AI agent that has access to WAFtester's 18 security testing tools via MCP (Model Context Protocol).\n\n**Chat Trigger** receives your message, **AI Agent** decides which tools to call, **WAFtester MCP** executes the tests and returns results.\n\nThe agent follows a standard testing workflow:\n1. Detect the WAF vendor protecting the target\n2. Discover endpoints and parameters\n3. Run attack payload scans across 18 categories\n4. Find WAF bypass techniques\n5. Generate a formal security assessment with grading\n\nAsync operations (scans, assessments) are automatically polled.\n\n### Setup steps\n\n1. Start WAFtester MCP server:\n```\ndocker run -p 8080:8080 ghcr.io/waftester/waftester:latest mcp --http :8080\n```\n2. Add OpenAI credentials: **Settings \u2192 Credentials \u2192 New \u2192 OpenAI API**\n3. Click the OpenAI Chat Model node and select your credential\n4. If WAFtester runs on a different host, set `WAFTESTER_SSE_URL` env variable\n5. Activate the workflow and open the chat interface\n\n### Customization tips\n\n- Try: \"Scan https://example.com for SQLi and XSS\"\n- Try: \"Find WAF bypasses for https://example.com\"\n- Customize the system prompt in the AI Agent node"
      },
      "typeVersion": 1
    },
    {
      "id": "236b3768-06a3-4b28-8968-bf1fea98c548",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        0
      ],
      "parameters": {
        "width": 720,
        "height": 144,
        "content": "## AI Agent chain\n\nChat Trigger sends messages to the AI Agent, which calls WAFtester MCP tools with OpenAI as the reasoning layer."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "Chat Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WAFtester MCP": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "description": "## What it does\n\nA conversational AI agent that connects to WAFtester via MCP (Model Context Protocol) for interactive WAF security testing. Ask the agent to scan targets, detect WAF vendors, discover attack surfaces, find bypasses, and generate security assessments through natural language.\n\n## Who it's for\n\n- Security engineers running ad-hoc WAF assessments\n- Penetration testers who want AI-assisted reconnaissance\n- DevSecOps teams exploring WAF coverage interactively\n\n## How it works\n\n1. Open the n8n chat interface\n2. Type a request like \"Scan https://example.com for SQLi\"\n3. The AI Agent calls WAFtester MCP tools to execute tests\n4. Results are returned in chat with explanations\n\nThe agent has access to 18 WAFtester tools covering WAF detection, attack surface discovery, scanning across 18 categories (SQLi, XSS, SSRF, etc.), bypass discovery, and formal security grading.\n\n## How to set up\n\n1. Start WAFtester: `docker run -p 8080:8080 ghcr.io/waftester/waftester:latest mcp --http :8080`\n2. Add OpenAI credentials in Settings \u2192 Credentials \u2192 New \u2192 OpenAI API\n3. Activate the workflow and start chatting\n\n## Requirements\n\n- WAFtester MCP server (Docker)\n- OpenAI API key\n\nOnly test targets you have authorization to test."
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

A conversational AI agent that connects to WAFtester via MCP (Model Context Protocol) for interactive Web Application Firewall security testing. Type natural language requests — the agent picks the right tools, runs the tests, and explains the results.

Source: https://n8n.io/workflows/13443/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Build an MCP server with Airtable. Uses chatTrigger, agent, memoryBufferWindow, mcpClientTool. Chat trigger; 13 nodes.

Chat Trigger, Agent, Memory Buffer Window +4
AI & RAG

Build an MCP server with Airtable. Uses chatTrigger, agent, memoryBufferWindow, mcpClientTool. Chat trigger; 13 nodes.

Chat Trigger, Agent, Memory Buffer Window +4
AI & RAG

This template is designed for anyone who wants to integrate MCP with their AI Agents using Airtable. Whether you're a developer, a data analyst, or an automation enthusiast, if you're looking to lever

Chat Trigger, Agent, Memory Buffer Window +4
AI & RAG

This n8n template can setup a embeddable web chat widget for your Shopify store. A user sends a message in the n8n Chat UI (public chat trigger). The AI Agent interprets the request. The agent calls C

Memory Buffer Window, Agent, OpenAI Chat +2
AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Chat Trigger, Agent, OpenAI Chat +3