Htb
БесплатноНе проверенEnables assistants to interact with Hack The Box by wrapping HTB API operations as MCP tools for querying and operating HTB resources.
Описание
Enables assistants to interact with Hack The Box by wrapping HTB API operations as MCP tools for querying and operating HTB resources.
README
htb-mcp is an MCP server for Hack The Box.
It wraps HTB API operations as MCP tools so assistants can query and operate HTB directly.
Features
- MCP over
stdio(works with common local MCP clients) - Structured JSON responses from all tools
- Environment-based auth/config (no credential files required)
- API-focused actions for users, machines, challenges, VPN metadata, prolabs, seasons, badges, sherlocks, pwnbox
Requirements
- Python
3.10+ - Hack The Box App Token
Create your HTB App Token in:
https://app.hackthebox.com/account-settings
Installation
cd /path/to/htb-mcp
python3.10 -m venv .venv
source .venv/bin/activate
pip install -e .
For development:
pip install -e ".[dev]"
Environment Variables
Required:
HTB_APP_TOKEN: HTB App Token
Optional:
HTB_API_BASE_URL: defaulthttps://labs.hackthebox.com/api/HTB_USER_AGENT: defaulthtb-mcp/<version>HTB_VERIFY_SSL:true|false|1|0|yes|no(defaulttrue)HTB_HTTP_PROXYHTB_HTTPS_PROXY
MCP Configuration
Option A: installed command (htb-mcp)
{
"mcpServers": {
"htb": {
"command": "htb-mcp",
"env": {
"HTB_APP_TOKEN": "YOUR_HTB_APP_TOKEN"
}
}
}
}
Option B: run module directly from source
{
"mcpServers": {
"htb": {
"command": "python3.10",
"args": ["-m", "htb_mcp"],
"env": {
"PYTHONPATH": "/absolute/path/to/htb-mcp/src",
"HTB_APP_TOKEN": "YOUR_HTB_APP_TOKEN"
}
}
}
}
Running Manually
HTB_APP_TOKEN=YOUR_HTB_APP_TOKEN htb-mcp
Response Envelope
All tool responses follow one envelope:
Success:
{
"ok": true,
"data": {}
}
Error:
{
"ok": false,
"error": {
"type": "ErrorType",
"message": "Human readable message",
"details": {}
}
}
Tool Catalog
User:
htb_user_gethtb_user_activityhtb_user_respect
Machine:
htb_machine_listhtb_machine_gethtb_machine_activehtb_machine_starthtb_machine_stophtb_machine_resethtb_machine_extendhtb_machine_submit_flaghtb_machine_rate_flag
Challenge:
htb_challenge_listhtb_challenge_searchhtb_challenge_gethtb_challenge_submithtb_challenge_instance_starthtb_challenge_instance_stophtb_challenge_instance_status
Prolabs and Certificates:
htb_prolabs_listhtb_prolabs_gethtb_prolabs_submithtb_certificate_list
VPN:
htb_vpn_servers_listhtb_vpn_accessible_listhtb_vpn_switchhtb_vpn_active_connections
Pwnbox:
htb_pwnbox_statushtb_pwnbox_terminate
Sherlocks:
htb_sherlock_categorieshtb_sherlock_list
Badges:
htb_badges_list
Seasons:
htb_season_listhtb_season_detailshtb_season_current_machines
Development
Run tests:
PYTHONPATH=src python3.10 -m pytest -q
Quick syntax check:
PYTHONPATH=src python3.10 -m py_compile src/htb_mcp/*.py src/htb_mcp/htbapi/*.py
Project Layout
htb-mcp/
src/htb_mcp/
server.py
tools.py
config.py
client_factory.py
serialization.py
htbapi/
tests/
Notes
- This project depends on HTB API behavior and can be affected by HTB-side changes.
- Keep your
HTB_APP_TOKENsecret.
Установка Htb
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/cativist/htb-mcpFAQ
Htb MCP бесплатный?
Да, Htb MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Htb?
Нет, Htb работает без API-ключей и переменных окружения.
Htb — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить Htb в Claude Desktop, Claude Code или Cursor?
Открой Htb на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare Htb with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
