send_request
Send HTTP/1.1 requests through Burp by mutating a history entry or building a new request from scratch, with optional inheritance of cookies and authentication.
Instructions
Issue an HTTP/1.1 request via Burp (no Repeater tab) and return the response. Two usage modes:
Mutate a history entry: pass
history_idplus any of method/path/ set_headers/remove_headers/body.Build from scratch: pass
url+ method + headers + body. Optionallyinherit_from_history_idto copy cookies/auth from a baseline.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| history_id | No | ||
| url | No | ||
| method | No | ||
| path | No | ||
| set_headers | No | ||
| remove_headers | No | ||
| headers | No | ||
| body | No | ||
| inherit_from_history_id | No | ||
| page_size | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/burp_mcp_plus/server.py:332-408 (handler)The 'send_request' tool handler function. It issues an HTTP/1.1 request via Burp (no Repeater tab) and returns the response. Two modes: (1) mutate a history entry by history_id, or (2) build from scratch with url+method+headers+body. Uses burp_client.call('send_http1_request', ...) to send.
@mcp.tool() async def send_request( history_id: int | None = None, url: str | None = None, method: str | None = None, path: str | None = None, set_headers: dict[str, str] | None = None, remove_headers: list[str] | None = None, headers: dict[str, str] | None = None, body: str | None = None, inherit_from_history_id: int | None = None, page_size: int = 200, ) -> str: """Issue an HTTP/1.1 request via Burp (no Repeater tab) and return the response. Two usage modes: 1. Mutate a history entry: pass `history_id` plus any of method/path/ set_headers/remove_headers/body. 2. Build from scratch: pass `url` + method + headers + body. Optionally `inherit_from_history_id` to copy cookies/auth from a baseline. """ if history_id is not None and url is not None: raise ValueError("pass either history_id or url, not both") if history_id is None and url is None: raise ValueError("must pass history_id or url") if history_id is not None: payload = await burp_client.call( "get_proxy_http_history", {"count": page_size, "offset": 0}, ) entry = _extract_baseline(payload, history_id) base = parse_raw_request(_entry_raw_request(entry)) new = apply_overrides( base, method=method, path=path, set_headers=set_headers, remove_headers=remove_headers, body=body, ) host, port, https = _derive_target(new, entry) else: base_headers: dict[str, str] = {} if inherit_from_history_id is not None: payload = await burp_client.call( "get_proxy_http_history", {"count": page_size, "offset": 0}, ) entry = _extract_baseline(payload, inherit_from_history_id) baseline = parse_raw_request(_entry_raw_request(entry)) for h in baseline.headers: if h.name.lower() in {"host", "content-length"}: continue base_headers[h.name] = h.value if headers: for k, v in headers.items(): base_headers[k] = v new = from_url(method or "GET", url, headers=base_headers, body=body or "") host, port, https = host_port_https(new, scheme_hint="https" if url.startswith("https") else "http") wire = build_wire(new) response = await burp_client.call( "send_http1_request", { "content": wire, "targetHostname": host, "targetPort": port, "usesHttps": https, }, ) return _format_response({ "ok": True, "warnings": lint(new), "wire_preview": wire[:1024], "response": response, }) - src/burp_mcp_plus/server.py:332-332 (registration)The '@mcp.tool()' decorator on line 332 registers 'send_request' as an MCP tool with the FastMCP server.
@mcp.tool() - src/burp_mcp_plus/server.py:333-344 (schema)The function signature defines the input schema/parameters for the send_request tool: history_id, url, method, path, set_headers, remove_headers, headers, body, inherit_from_history_id, page_size.
async def send_request( history_id: int | None = None, url: str | None = None, method: str | None = None, path: str | None = None, set_headers: dict[str, str] | None = None, remove_headers: list[str] | None = None, headers: dict[str, str] | None = None, body: str | None = None, inherit_from_history_id: int | None = None, page_size: int = 200, ) -> str: