BunkerWeb MCP Server is the official MCP server for BunkerWeb, designed to expose the BunkerWeb API to MCP clients. It provides BunkerWeb management capabilities through tools, read-only resources, and tool guidance prompts.
Main capabilities:
- Manage services, instances, bans, configuration snippets, plugins, and scheduled jobs.
- Support streaming HTTP or local stdio subprocess connections, and retain the legacy JSON-RPC HTTP and WebSocket endpoints.
- Provide 36 API tools, named in the verb_noun format.
- Optional tools include log reading (list_logs, read_log) and documentation search (search_bunkerweb_docs), which require corresponding configuration.
- Provide read-only resources such as jobs://jobs and bans://active.
- Built-in 13 BunkerWeb Agent Skills (59 files), readable through MCP resources.
- Support the MCP skills extension (io.modelcontextprotocol/skills), providing the skills/list and skills/get methods.
Usage:
- An accessible BunkerWeb API and its credentials (when authentication is enabled) are required.
- Can be run via Docker Compose, or use the published image.
- Clients connect to the streaming HTTP endpoint /mcp/ (note the trailing slash), and must carry the Authorization: Bearer <token> header (when a token is set).
- The stdio method can also be used, installed via Python 3.11+, generating the .venv/bin/bunkerweb-mcp executable, with an absolute path used in the client configuration.
- A demo stack is provided, including BunkerWeb 1.6.13, the scheduler, the API, MariaDB, Redis, and this server.
Applicable scenarios:
- Integrate BunkerWeb management into AI clients (such as Claude Code, Claude Desktop) or automated workflows (such as n8n).
- Need to programmatically manage BunkerWeb configuration, instances, bans, etc.
Limitations and security considerations:
- The server does not store BunkerWeb state and depends on the availability of the BunkerWeb API.
- Starting from 0.8.0, the HTTP server fails closed by default: it refuses to start when write tools are enabled and BUNKERWEB_WEBSOCKET_TOKEN is not set.
- MCP_READ_ONLY=true can be set to provide only read-only tools; or MCP_ALLOW_UNAUTHENTICATED=true can be set to accept the risk (not recommended).
- The token is enforced on /mcp/, /rpc, and /ws; x-mcp-token and ?token= are deprecated.
- MCP_ALLOWED_HOSTS and MCP_ALLOWED_ORIGINS need to be configured to pass Host and Origin checks.
- Tools can modify configuration, stop instances, delete services, and install plugins, and should only be authorized to trusted clients.
- The server has no per-client roles.
- Log content should be treated as untrusted data.
- Documentation search requires a separate service; set SEARCH_MODE=remote and SEARCH_API_URL.
- Provides Prometheus metrics (/metrics), health checks (/health), and readiness checks (/ready).
- Testing requires 80% coverage, using mocked upstream HTTP calls.
For more details, please refer to the official documentation and security guide.