MCP Overview
TestNet implements the MCP (Model Context Protocol), enabling AI assistants such as Claude Code, Cursor, Windsurf, and Codex to directly leverage TestNet platform capabilities.
What is MCP?
MCP is an open standard protocol released by Anthropic for integrating AI assistants with external tools and systems. Through MCP, AI assistants can:
- Call Tools: Perform asset queries and mutations, trigger workflow orchestration, dispatch scanning tasks, conduct HTTP penetration testing, and search cyberspace
- Access Resources: Read project lists, workflow lists, and tool specifications
TestNet MCP Capabilities
The platform provides 11 core facade MCP tools and 3 MCP Resources for external AI agents. All facade tools remain permanently exposed in tools/list; each covers a complete business domain through an action parameter. Legacy fine-grained atomic tools have been consolidated into their facades and are no longer exposed individually — always call a facade with an action.

The 11 Core Facade Tools at a Glance
| # | Tool Name | Domain | Description |
|---|---|---|---|
| 1 | testnet_asset | Asset hub | Full CRUD, global search, batch tagging, deduplication & merging, and automatic tag matching across 8 asset types (company/domain/sub_domain/ip/port/web/api/vul) |
| 2 | testnet_query_asset_graph | Asset topology | Project-level risk statistics + root-oriented BFS topology subgraph (edges carry relation semantics; statsOnly/rootType/rootId/depth supported) |
| 3 | testnet_project | Project context | Project container management (idempotent creation); supports the strictScope switch — when enabled, HTTP relay/batch/diff targets must match a registered project asset or the request is rejected with SCOPE_DENIED |
| 4 | testnet_search_tools | Tool discovery | Intent-based search for scanning tools and workflows (mandatory before scanning) |
| 5 | testnet_workflow | Workflow orchestration | DAG workflow trigger, tracking, cancellation, and template discovery |
| 6 | testnet_task | Task dispatch | Single-tool scan dispatch, failure retry, batch await, log streams, chunked output reading, and cancellation |
| 7 | testnet_get_system_status | Cluster health | Probe cluster status and dispatch queue readiness |
| 8 | testnet_http | HTTP penetration | Precision relayed requests with audit, response diffing, batch probing, and chunked body reading |
| 9 | testnet_web_recon | Web recon | Headless DOM parsing, hidden parameter mining, and frontend JS static analysis |
| 10 | testnet_vuln | Vulnerability management | Severity-filtered search (with the changedSince incremental reconciliation cursor), triage state transitions, and false-positive deletion; remediation/comment capped at 60000 characters |
| 11 | testnet_cyberspace | Cyberspace mapping | Exposure search via FOFA/Hunter/Quake/Shodan engines plus quota monitoring |
3 MCP Resources
| Resource URI | Content |
|---|---|
testnet://projects | Project list |
testnet://workflows | Workflow list |
testnet://tools | Tool definitions list |
Usage Scenarios
Scenario 1: AI assistant performs full asset inventory and graph analysis
User: Analyze all externally exposed assets under project proj_001 and check for unfixed high-severity vulnerabilities
Claude: Let me query the TestNet asset graph and vulnerabilities...
[calls testnet_query_asset_graph(projectId="proj_001", statsOnly=true)]
[calls testnet_query_asset_graph(projectId="proj_001", rootType="DOMAIN", rootId="dom_001", depth=2)]
[calls testnet_vuln(action="search", projectId="proj_001", fixStatus="OPEN", severity="HIGH")]
The project currently owns 2 root domains, 15 subdomains, 8 open port services, and 2 unfixed high-severity vulnerabilities...Scenario 2: AI assistant runs an automated scanning workflow
User: Run the fully automated domain reconnaissance workflow against example.com
Claude: Sure, let me confirm the available workflows first and then trigger it for you...
[calls testnet_search_tools(query="domain reconnaissance")]
[calls testnet_workflow(action="run", workflowId="domain-recon-pipeline", target="example.com", assetType="DOMAIN", projectId="proj_001")]
Workflow started, run ID: run_abc123...Scenario 3: AI assistant assists HTTP penetration testing with audit evidence
User: Test whether https://api.example.com/user/profile is vulnerable to IDOR
Claude: I will use the TestNet HTTP facade for response diffing...
[calls testnet_http(action="diff", request_a={url: "https://api.example.com/user/profile?id=1001", headers: {Authorization: "Bearer token_a"}}, request_b={url: "https://api.example.com/user/profile?id=1002", headers: {Authorization: "Bearer token_a"}})]
The diff shows id=1002 also returns 200 with the user's phone number and address — IDOR confirmed...Scenario 4: Exploratory Drill-Down on the Asset Graph
User: Starting from the web site api.test.com, map out everything related to it
Agent: Locate the root asset ID via asset search first, then run a directed topology...
[calls testnet_asset(action="search", keyword="api.test.com")] # locates root IDs (web_001 / dom_001)
[calls testnet_query_asset_graph(projectId="proj_001", rootType="WEB", rootId="web_001", depth=2)]
# Returns the BFS subgraph rooted at the site; edges carry HOSTS_WEB / RESOLVES_TO / HAS_PORT semantics (300-node cap per call)
User: Expand the root-domain layer too
Agent: Switch the root to the domain and increase the depth...
[calls testnet_query_asset_graph(projectId="proj_001", rootType="DOMAIN", rootId="dom_001", depth=3)]MCP Transports & Endpoints
TestNet MCP supports Streamable HTTP (MCP 2025-03-26 spec, recommended), Legacy SSE Streaming, and REST API Extensions on the single unified endpoint /mcp/v1:
| Endpoint | Method | Description |
|---|---|---|
/mcp/v1 | POST | Streamable HTTP transport endpoint (submit JSON-RPC messages, responses as application/json; initialize negotiates the protocol version and assigns the Mcp-Session-Id response header; notifications/client responses return 202; batch arrays supported) |
/mcp/v1 | GET | Streamable HTTP server-initiated notification stream (opened when the Mcp-Session-Id header is present, delivering progress and log notifications); without a session header it serves the legacy SSE handshake (emits endpoint event) |
/mcp/v1 | DELETE | Streamable HTTP session termination (closes the notification stream and releases the session) |
/mcp/v1/sse | GET | Legacy MCP SSE transport handshake endpoint (emits endpoint event) |
/mcp/v1/message | POST | Legacy JSON-RPC 2.0 message handler (initialize, tools/list, tools/call, etc.) |
/mcp/v1/info | GET | Retrieve MCP server runtime configuration, version, and health status |
/mcp/v1/tools | GET | List tool definitions via REST |
/mcp/v1/tools/call | POST | Execute a tool via REST |
/mcp/v1/resources | GET | List available resources |
/mcp/v1/resources/read | GET | Read resource content |
/mcp/v1/prompts | GET | List prompt templates |
/mcp/v1/prompts/get | POST | Render a prompt template |
Streamable HTTP session lifecycle:
- The client sends an
initializerequest viaPOST /mcp/v1; the server negotiates the protocol version (echoes2024-11-05/2025-03-26/2025-06-18) and assigns a session via theMcp-Session-Idresponse header; - Subsequent requests must carry the
Mcp-Session-Idheader; sessions expire after idle timeout (testnet.mcp.session-ttl-ms, 24 hours by default) or a server restart — the server responds with404and the client automatically re-initializes; - The client may
GET /mcp/v1(with the session header) at any time to receive server-initiated notifications (notifications/progresslive progress,notifications/messagelog stream,notifications/tools/list_changedtool hot-reload), andDELETE /mcp/v1to terminate the session explicitly.
Related Documentation
- Claude / Cursor Integration — configuration guide for Claude Code, Cursor, and Windsurf
- MCP Action Reference — every action of the 12 facade tools