Zero-dependency stdio MCP server for htb-hosts. Speaks MCP over line-delimited JSON-RPC 2.0 on stdin/stdout. Exposes tools that add/remove/select/show/clean HTB host entries in /etc/hosts without sudo, backed by the shared core library.
htb-hosts provides 9 well-named, domain-specific tools with clear descriptions and mostly complete schemas. Naming follows verb_noun convention (htb_hosts_add, htb_hosts_remove, etc.), making intent obvious. Descriptions are detailed (100-250 chars typical) and explain WHAT, WHEN, and consequences. Input schemas use proper JSON Schema with types and descriptions for most parameters. However, several parameters lack descriptions (e.g., htb_hosts_retag and htb_hosts_list_backups have empty input objects with no guidance), and output schemas are not documented, LLMs cannot predict response structure. Error handling is minimal; no recovery guidance or actionable error messages visible in source. The tool set is well-composed (each does one thing) and idempotent operations are safe for retry.
Add or update an HTB host entry in /etc/hosts (no sudo needed). Use this whenever you need a hostname like machine.htb to resolve to a box IP. Entries go in a managed block and can be cleaned later.
Save an explicit snapshot of /etc/hosts (never auto-pruned).
Remove managed host entries. No args wipes the whole block; `tag` removes one box by its exact tag; `match` removes the entries htb_hosts_select would return for the same patterns (every pattern must match); `exclude` is the inverse keep-list, removing everything EXCEPT entries matching ANY pattern. The three are mutually exclusive. Set dry_run to preview what would go without touching the file.
List available /etc/hosts snapshots, oldest first.
Remove an HTB host entry from the managed block by hostname or IP.
Restore /etc/hosts from a snapshot (most recent if no name is given).
Output schemas not documented. LLMs cannot predict response structure (e.g., what fields does htb_hosts_show return? Is it flat or nested?). This forces agents to guess and wastes tokens on trial-and-error.
htb_hosts_retag and htb_hosts_list_backups have empty input schemas (no properties). While this is technically valid for no-argument tools, descriptions should explain what the tool does and when to call it. Currently minimal guidance.
No error handling guidance visible. Tools like htb_hosts_remove and htb_hosts_clean are destructive but descriptions do not explain recovery steps, dry-run patterns, or what errors might occur. Agents cannot self-correct on failure.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 59 | 2026-07-28+ | v2 |
Recompute every entry's tag from its box name (fixes bulk tag=imported).
Look up managed entries by fuzzy pattern and return just their bare values, ready to feed into another command. `patterns` matches against ip/tag/hostname, and several patterns NARROW (every one must match). `field` picks what comes back: 'ip' (default) or 'host'. Use this to resolve a box name to its IP before scanning.
Structured overview of the managed hosts, both flat ('entries') and grouped by box ('groups'). `patterns` narrows to the entries they select, exactly as htb_hosts_select does. Set full=true to also include unmanaged/system entries (localhost, etc.).
htb_hosts_clean description is complex (3 mutually exclusive modes: tag, match, exclude) but does not explicitly state they are mutually exclusive in the schema. LLMs may pass multiple at once, causing ambiguous behavior.
htb_hosts_select 'index' parameter accepts multiple formats (integer, string range '2-4', list '1,3') but the description does not clearly document all valid formats. LLMs may pass invalid syntax.