EZ XBow Challenge MCP
A competition for AI driven penetration testingModel Context Protocol (MCP) server This tool provides a complete API interface that enables LLM to autonomously participate in CTF challenges.
Suggestions and kimi-cli-for-xbow Used in conjunction or integrated into your own Agent workflow
feature
- Challenge Management -List, attempt, and submit solutions for CTF challenges
- knowledge base -Built in CTF technical documentation covering 9 vulnerability categories
- Persistent Kali container -Execute security tools (nmap, sqlmap, gobuster, etc.) in an isolated environment
- Attempt history -Through automatic note management, cross session tracking, and shared discovery
- Multiple protocols -Supports STDio, SSE, and HTTP/2 streaming modes
Quick Start
Prerequisites
- Go 1.24.7+
- Docker supporting buildx
build
go build -o xbow-mcp ./cmd/main.goRun (test) using a simulation platform
in ./mock-challenges Create corresponding competition question files based on the template.
{
"challenge_code": "XBEN-123-24",
"difficulty": "easy",
"points": 200,
"target_info": {
"ip": "192.168.5.37",
"port": [32820]
},
"hint_viewed": false,
"solved": true,
"hint_content": "Sometimes the AuthN/AuthZ checks are vulnerable to TOCTOU issues if they are not implemented properly",
"solution": "flag{xxxx}"
}startup command
./xbow-mcp --mock -listen 127.0.0.1:8080Run on a real platform
./xbow-mcp \
-xbow-url https://your-xbow-platform.com \
-xbow-token YOUR_AUTH_TOKEN \
-mode streamable \
-listen 127.0.0.1:8080Available tools
| Tool | Description |
|---|---|
list_challenges | Obtain the challenges of the current stage, including difficulty and target information |
do_challenge | Mark the challenge as ongoing and increase the try counter |
get_challenge_hint | Search prompt (score deducted) |
submit_answer | Submit Flag and receive rating results |
get_ctf_skill | Access technical documents (xss, SQL, SSTI, SSRF, IDOR, XXE, LFI, Codei, AFR&PT) |
write_challenge_note | Save discovery and attempt records for future reference |
read_challenge_note | View historical notes (automatically reset after every 9 attempts) |
kail_terminal | Execute commands in persistent Kali containers |
get_terminal_history | Retrieve command execution results by ID |
Command line options
# 服务器模式
-mode, -m [stdio|sse|streamable] MCP 服务器协议 (默认: streamable)
-listen, -l ADDR:PORT 监听地址 (默认: 127.0.0.1:8080)
# 平台配置
-xbow-url, -u URL XBow API 基础 URL
-xbow-token, -t TOKEN 认证 Token
# Docker 配置
-docker-container, -c NAME 容器名称 (默认: xbow-kail)
-docker-image, -i IMAGE:TAG Docker 镜像 (默认: xbow-kail:latest)
-dockerfile-dir, -f PATH Dockerfile 路径 (默认: ./Dockerfile)
-docker-exec-log-dir, -d DIR 执行日志目录 (默认: ./.kail-history)
# 模拟平台(本地测试)
--mock 启用模拟平台服务器
-mock-addr ADDR:PORT 模拟服务器地址 (默认: 127.0.0.1:8000)
-mock-dir PATH 模拟挑战目录 (默认: ./mock-challenges)integration
MCP client
Add to your MCP client configuration:
{
"mcpServers": {
"ezmcp": {
"url": "http://127.0.0.1:8080/mcp"
}
}
}local storage
.challenge_history/{challenge_code}/-Attempt metadata, notes, and history records.kail-history/-Command Execution Record
ALL
- Automatically compile and launch XBOW shooting range and configure competition information.
license
Open source. Please refer to the LICENSE document for details.
contribution
Welcome to submit Issue and Pull Requests.
