MCP Server Reference
HailBytes ASM ships a built-in Model Context Protocol server. Point your AI client at it once and the agent has 16 tools spanning targets, scans, reconnaissance data, vulnerabilities, and OSINT — without writing a single wrapper.
Quick Start
1. Generate an API key
In the ASM admin UI: Administration › API Keys › Add Key. The key is shown only once and is SHA-256 hashed at rest.
2. Add the server to your client
Drop the JSON snippet below into your client’s MCP config. Transport is Streamable HTTP; the endpoint is /mcp/ on your ASM host.
3. Talk to it
Ask the agent to scan, triage, or build a target list. It will pick the right tools and chain calls without you naming them.
Endpoint & Authentication
The MCP server runs alongside the Django app on the ASM web port (443 in production). Auth is the same X-API-Key header used by the REST API.
Endpoint: https://<your-asm-host>/mcp/
Transport: Streamable HTTP
Auth: X-API-Key: <api_key>Rate limits and audit logging match the REST API: 200 authenticated requests/minute, 10 scan initiations/minute, every call recorded with actor, IP, user agent, and resource.
Client Configuration
Claude Desktop
Edit claude_desktop_config.json via Settings › Developer › Edit Config.
{
"mcpServers": {
"hailbytes-asm": {
"type": "streamable-http",
"url": "https://hailbytes-asm.yourcompany.com/mcp/",
"headers": { "X-API-Key": "YOUR_ASM_KEY" }
}
}
}Claude Code (CLI)
Add to .claude/settings.json in a project, or ~/.claude/settings.json globally.
{
"mcpServers": {
"hailbytes-asm": {
"type": "streamable-http",
"url": "https://hailbytes-asm.yourcompany.com/mcp/",
"headers": { "X-API-Key": "YOUR_ASM_KEY" }
}
}
}Cursor / Windsurf
Both editors accept the same Streamable HTTP config shape. Set transport to Streamable HTTP, URL to https://<host>/mcp/, and the X-API-Key header.
Transport: streamable-http
URL: https://<host>/mcp/
Header: X-API-Key: <api_key>Anthropic SDK (Python)
Pass the MCP server inline on a messages.create call.
import anthropic
client = anthropic.Anthropic()
client.messages.create(
model="claude-sonnet-4-6",
max_tokens=4096,
mcp_servers=[{
"type": "url",
"url": "https://hailbytes-asm.yourcompany.com/mcp/",
"name": "hailbytes-asm",
"headers": {"X-API-Key": "YOUR_ASM_KEY"},
}],
messages=[{"role": "user",
"content": "Scan example.com and tell me what you find."}],
)Tool Reference
All 16 tools the agent gets the moment you connect.
Target management
| Tool | Description |
|---|---|
list_targets | List all target domains with scan counts. Filter by project slug. |
add_target | Add a new domain to a project for reconnaissance. |
Scan lifecycle
| Tool | Description |
|---|---|
initiate_scan | Start a full recon scan: subdomain discovery, port scan, vulnerability detection, screenshots, and more via Celery workers. |
stop_scan | Abort a running scan and revoke its Celery tasks. |
get_scan_status | Pending, running, completed, and failed scans for a project. |
list_scan_history | Past scans with finding-count rollups (subdomains, endpoints, vulnerabilities). |
Reconnaissance data
| Tool | Description |
|---|---|
list_subdomains | Discovered subdomains with HTTP status, page title, CDN detection. Filter by target or scan. |
list_endpoints | Discovered HTTP endpoints/URLs with status codes and response times. |
list_technologies | Detected tech stack (frameworks, CMS, servers) with usage counts. |
list_ports | Open ports with service names. Filter by target or IP. |
Vulnerability intelligence
| Tool | Description |
|---|---|
list_vulnerabilities | Findings with severity (0–4), CVE IDs, descriptions, affected URLs. Filter by target, scan, or severity. |
get_most_vulnerable | Targets ranked by vulnerability count — prioritize what to fix first. |
OSINT
| Tool | Description |
|---|---|
list_emails | Email addresses harvested during OSINT scans. |
list_employees | Employee names and roles discovered via OSINT. |
Utilities
| Tool | Description |
|---|---|
search | Universal search across subdomains, endpoints, and vulnerabilities. |
whois_lookup | WHOIS lookup for any domain. Returns registrar, dates, nameservers. |
Example Workflows
Cold-start reconnaissance
You: Add example.com to the "client-pentest" project
and run a full scan.
Agent:
add_target(example.com, client-pentest)
initiate_scan(target_id, "Full Scan")
→ "Scan 42 started. I’ll check status in a few
minutes."
Triage critical findings
You: Show me critical and high vulns from the latest
scan of acme.com and suggest where to start.
Agent:
list_vulnerabilities(severity=4, target=acme.com)
list_vulnerabilities(severity=3, target=acme.com)
→ "2 SQLi, 1 exposed .git, 1 stored XSS in admin.
Start with the SQLi on api.acme.com/search."
Build an attack-surface report
You: Give me subdomains, open ports, and tech stack
for acme.com.
Agent:
list_subdomains(acme.com)
list_ports(acme.com)
list_technologies(acme.com)
→ structured narrative with risky surface flagged.
OSINT → phishing target list
You: Build me a phishing target list for acme.com
based on what HailBytes found.
Agent:
list_emails(acme.com)
list_employees(acme.com)
→ CSV ready to import into a SAT campaign.
Chaining With Other Security MCPs
Most MCP-aware clients let you connect several servers at once. A common shape for engagement work is to put HailBytes ASM next to your phishing engine and your active-testing tools, then let the agent orchestrate.
{
"mcpServers": {
"hailbytes-asm": {
"type": "streamable-http",
"url": "https://hailbytes-asm.yourcompany.com/mcp/",
"headers": { "X-API-Key": "ASM_KEY" }
},
"hailbytes-sat": {
"type": "streamable-http",
"url": "https://hailbytes-sat.yourcompany.com:3333/api/mcp/",
"headers": { "Authorization": "Bearer SAT_KEY" }
},
"burpsuite": {
"type": "streamable-http",
"url": "http://127.0.0.1:9876/sse"
}
}
}Single agent prompt, three tools cooperating: ASM enumerates the surface and the people, the SAT engine sends the simulated phish, Burp probes the most interesting endpoints. The agent picks tools, you review the output.
Operational Notes
- Auth. Every MCP request carries
X-API-Key. Keys are SHA-256 hashed; the plaintext value is never stored. Keys can be expired or deactivated; rejected at the request boundary. - Network. The MCP endpoint sits on the same port as the web UI behind Nginx (443 in production). Restrict access with firewall rules or a VPN if your threat model demands it.
- TLS. Always use HTTPS. The MCP endpoint inherits the Nginx TLS configuration.
- Rate limits. Same as REST: 200 authenticated requests/minute, 10 scan initiations/minute. Anonymous traffic is rejected.
- Scan safety.
initiate_scanrespects engine configurations, scope restrictions, and tool selections. It cannot bypass safety controls configured by an admin. - Audit trail. Every MCP call lands in the same audit log as REST and UI actions, with actor, IP, user agent, and resource recorded.
- Versioning. The MCP server tracks the platform release. Tool names, parameters, and return shapes are stable; we add tools in additive releases.
Troubleshooting
| Symptom | Fix |
|---|---|
401 Missing X-API-Key | Add the X-API-Key header to your client’s MCP server config. |
403 Invalid or inactive | Key is wrong, expired, or deactivated. Generate a new one. |
| Connection refused | ASM not reachable on the expected host/port. |
| TLS certificate error | Client doesn’t trust your ASM cert; add to its trust store or fix the cert. |
Scan engine not found | Check available engines under Scan Engines in the UI. |
MCP server not available | The mcp Python package is missing in the container; check ASM logs. |
| Slow vulnerability queries | Add a target_id or scan_id filter to narrow the result set. |
Requirements
- HailBytes ASM with the MCP server enabled (shipped on all marketplace deployments since the April 2026 release).
- An MCP-compatible client: Claude Desktop, Claude Code, Cursor, Windsurf, or anything that supports the Streamable HTTP transport.
- Network reachability from the client to the ASM web host (default 443).
- At least one scan engine configured (the platform ships with sensible defaults).
Want to deploy first?
One-shot CLI deployments on AWS or Azure.