BunkerWeb

v0.8.0
io.github.bunkerity/bunkerweb-mcp Checked 9 hours ago Published 1 day ago

Operate BunkerWeb, the open-source WAF, through its API: services, bans, configs, jobs.

Values you need

VariableWhat it is
BUNKERWEB_BASE_URLrequired Base URL of the BunkerWeb API, reachable from inside the container.
BUNKERWEB_API_TOKENrequired secret BunkerWeb API bearer token. The server authenticates to BunkerWeb with it.
BUNKERWEB_WEBSOCKET_TOKENrequired secret Token MCP clients send as Authorization: Bearer <token>. Required so /mcp/, /rpc and /ws are not open.
MCP_ALLOWED_HOSTSoptional Host header values accepted by the DNS rebinding protection. Change it with the published port. Default: localhost,localhost:8080,127.0.0.1,127.0.0.1:8080
SEARCH_MODEoptional Documentation search. disabled keeps the server free of an external search service. Default: disabled

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add bunkerweb-mcp -e 'BUNKERWEB_API_TOKEN=<BUNKERWEB_API_TOKEN>' -e 'BUNKERWEB_BASE_URL=<BUNKERWEB_BASE_URL>' -e 'BUNKERWEB_WEBSOCKET_TOKEN=<BUNKERWEB_WEBSOCKET_TOKEN>' -- uvx bunkerweb-mcp==0.8.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "bunkerweb-mcp": {
      "args": [
        "bunkerweb-mcp==0.8.0"
      ],
      "command": "uvx",
      "env": {
        "BUNKERWEB_API_TOKEN": "<BUNKERWEB_API_TOKEN>",
        "BUNKERWEB_BASE_URL": "<BUNKERWEB_BASE_URL>",
        "BUNKERWEB_WEBSOCKET_TOKEN": "<BUNKERWEB_WEBSOCKET_TOKEN>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "bunkerweb-mcp": {
      "args": [
        "bunkerweb-mcp==0.8.0"
      ],
      "command": "uvx",
      "env": {
        "BUNKERWEB_API_TOKEN": "<BUNKERWEB_API_TOKEN>",
        "BUNKERWEB_BASE_URL": "<BUNKERWEB_BASE_URL>",
        "BUNKERWEB_WEBSOCKET_TOKEN": "<BUNKERWEB_WEBSOCKET_TOKEN>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "BUNKERWEB_API_TOKEN",
      "id": "bunkerweb-api-token",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "BUNKERWEB_BASE_URL",
      "id": "bunkerweb-base-url",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "BUNKERWEB_WEBSOCKET_TOKEN",
      "id": "bunkerweb-websocket-token",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "bunkerweb-mcp": {
      "args": [
        "bunkerweb-mcp==0.8.0"
      ],
      "command": "uvx",
      "env": {
        "BUNKERWEB_API_TOKEN": "${input:bunkerweb-api-token}",
        "BUNKERWEB_BASE_URL": "${input:bunkerweb-base-url}",
        "BUNKERWEB_WEBSOCKET_TOKEN": "${input:bunkerweb-websocket-token}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.bunkerweb-mcp]
command = "uvx"
args = ["bunkerweb-mcp==0.8.0"]
env = { "BUNKERWEB_API_TOKEN" = "<BUNKERWEB_API_TOKEN>", "BUNKERWEB_BASE_URL" = "<BUNKERWEB_BASE_URL>", "BUNKERWEB_WEBSOCKET_TOKEN" = "<BUNKERWEB_WEBSOCKET_TOKEN>" }

For AI agents

  1. Ask the user for: BUNKERWEB_BASE_URL, BUNKERWEB_API_TOKEN, BUNKERWEB_WEBSOCKET_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: create_api_token, ping_api, diagnose_bunkerweb, list_instances, ping_instances, stop_instances, get_instance, create_instance, ….
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json