HTTPX_MCP
- agent-framework
An MCP tool for HTTP interface testing, built on the httpx library, designed for AI.
About
What is HTTPX_MCP?
HTTPX_MCP is an MCP (Model Context Protocol) tool for HTTP interface testing, built on the httpx library and designed for AI-driven interactions. It enables sending arbitrary HTTP requests and parsing raw request text (e.g., from Burp Suite) directly within MCP-compatible environments.
How to use HTTPX_MCP?
Install via pip (pip install httpx-mcp) or from source with pip install -e .. Add the server to your MCP configuration file as either "python -m httpx_mcp.server" (with optional cwd) or simply "httpx-mcp". Use the provided tools (http_request and http_raw) by passing parameters such as URL, method, headers, body, etc.
Key features of HTTPX_MCP
- Full HTTP method support: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
- Multiple request formats: JSON, form data, raw text
- Custom headers and SSL verification control
- Raw request parsing β paste Burp Suite captured requests directly
- Response details: status code, headers, body, and timing statistics
- Easy MCP server configuration with two alternative commands
Use cases of HTTPX_MCP
- API Testing: Quickly test REST API endpoints with various HTTP methods
- Security Testing: Send custom payloads for security assessments
- Interface Debugging: View detailed request/response information with timing
- Request Replay: Directly replay Burp Suite captured HTTP requests
FAQ from HTTPX_MCP
What HTTP methods are supported?
HTTPX_MCP supports GET, POST, PUT, DELETE, PATCH, HEAD, and OPTIONS via the method parameter of the http_request tool.
How can I reuse Burp Suite captured requests?
Use the http_raw tool and paste the raw HTTP request text (including headers and body) into the raw_request parameter, optionally providing a base_url.
Is SSL verification configurable?
Yes. Both tools have a verify_ssl boolean parameter (default true) to enable or disable SSL certificate verification.
How do I install HTTPX_MCP?
You can install it via pip: pip install httpx-mcp, or by cloning the repository and running pip install -e . from the httpx-mcp directory.
What license is HTTPX_MCP released under?
The project is licensed under the MIT license.
Details
- Author
- zhefox
- Category
- agent-framework
- Repository
- zhefox/httpx_mcp
HTTPX MCP
An MCP tool for HTTP interface testing, built on the httpx library, designed for AI.Features
- π Full HTTP Method Support: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS - π Multiple Request Formats: JSON, form data, raw text - π§ Custom Headers: Support for arbitrary HTTP headers - π Raw Request Parsing: Directly paste Burp Suite captured requests - β±οΈ Response Details: Status code, response headers, response body, timing statistics - π SSL Control: Optional SSL certificate verificationInstallation
``bash
cd httpx-mcp
pip install -e .
`
or
`
pip install httpx-mcp
`
MCP Configuration
Add to your MCP configuration file:
`json
{
"mcpServers": {
"httpx-mcp": {
"command": "python",
"args": ["-m", "httpx_mcp.server"],
"cwd": "c:/Users/ZHEFOX/Desktop/mcptools/httpx-mcp"
}
}
}
`
Or use directly after installation:
`json
{
"mcpServers": {
"httpx-mcp": {
"command": "httpx-mcp"
}
}
}
`
Available Tools
1.
http_request - General HTTP Request
Send any HTTP request, switch request method via the method parameter.
Parameters:
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| url | string | β
| - | Full URL |
| method | string | - | GET | HTTP method: GET/POST/PUT/DELETE/PATCH/HEAD/OPTIONS |
| params | string | - | - | URL query parameters, JSON or key=value format |
| headers | string | - | - | Request headers, JSON format |
| body | string | - | - | Request body |
| content_type | string | - | application/json | Content-Type |
| timeout | number | - | 30 | Timeout in seconds |
| follow_redirects | boolean | - | true | Whether to follow redirects |
| verify_ssl | boolean | - | true | Whether to verify SSL |
| include_headers | boolean | - | true | Whether response includes headers |
Examples:
`
GET request
method="GET", url="https://httpbin.org/get"
GET with query parameters
method="GET", url="https://httpbin.org/get", params='{"page": "1", "size": "10"}'
POST JSON
method="POST", url="https://httpbin.org/post", body='{"name": "test", "value": 123}'
PUT update
method="PUT", url="https://httpbin.org/put", body='{"id": 1, "name": "updated"}'
DELETE
method="DELETE", url="https://httpbin.org/delete"
With authentication header
method="GET", url="https://api.example.com/users", headers='{"Authorization": "Bearer token123"}'
POST form
method="POST", url="https://httpbin.org/post", body="username=admin&password=123", content_type="application/x-www-form-urlencoded"
Disable SSL verification
method="GET", url="https://self-signed.example.com", verify_ssl=false
`
2.
http_raw - Raw HTTP Request
Directly parse raw HTTP requests captured by tools like Burp Suite.
Parameters:
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| raw_request | string | β
| - | Raw HTTP request text |
| base_url | string | - | - | Base URL (if request doesn't contain full URL) |
| verify_ssl | boolean | - | true | Whether to verify SSL |
Example:
`
raw_request="""
POST /api/login HTTP/1.1
Host: example.com
Content-Type: application/json
Cookie: session=abc123
{"username":"admin","password":"123456"}
"""
base_url="https://example.com"
`
Response Format
The tool returns formatted response information:
`
HTTP/1.1 200 OK
=== Response Headers ===
content-type: application/json
date: Mon, 01 Jan 2024 00:00:00 GMT
...
=== Response Body ===
{
"result": "success",
"data": {...}
}
=== Request Info ===
Time: 0.234s
Size: 1024 bytes
``







