mitmproxy-mcp
v0.6.1MITM proxy manager with MCP integration
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
start_proxy
Start the mitmproxy instance. Args: port: Port to listen on (default 8080) dump_file: Optional file path to save raw mitmproxy .flow data. Prefix with + to append to an existing file.
| Parameter | Type | Description |
|---|---|---|
dump_file | string | |
port | integer |
stop_proxy
set_scope
| Parameter | Type | Description |
|---|---|---|
allowed_domains * | array |
set_global_header
| Parameter | Type | Description |
|---|---|---|
key * | string | |
value * | string |
remove_global_header
| Parameter | Type | Description |
|---|---|---|
key * | string |
get_traffic_summary
| Parameter | Type | Description |
|---|---|---|
limit | integer |
inspect_flow
Get full details of a captured flow. Args: flow_id: The ID of the captured flow full_body: If True, return full request body instead of 2000-char preview
| Parameter | Type | Description |
|---|---|---|
flow_id * | string | |
full_body | boolean |
inspect_flows
Batch inspect multiple flows in one call. Reduces context usage vs calling inspect_flow N times. Args: flow_ids: Comma-separated list of flow IDs to inspect fields: Comma-separated list of DB columns to select. e.g. "id,url,method,request_headers,request_body" to skip response data. Default: all columns. full_body: If True, return full request body instead of preview
| Parameter | Type | Description |
|---|---|---|
flow_ids * | string | |
fields | string | |
full_body | boolean |
get_flow_schema
Infer a simple schema from a flow's JSON response body.
| Parameter | Type | Description |
|---|---|---|
flow_id * | string |
load_traffic_file
Import flows from a HAR or mitmproxy flow file into the traffic database. After import, all traffic inspection tools work on the imported data. No proxy needs to be running. Args: file_path: Path to .har or .mitm/.flow file append: If True, keep existing traffic. If False (default), clear first. scope: Comma-separated list of domains to filter by during import. Only flows matching these domains are imported.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
append | boolean | |
scope | string |
extract_from_flow
Extract specific data from a flow's response body using JSONPath or CSS selectors. Args: flow_id: The ID of the captured flow json_path: A JSONPath expression to extract data from a JSON response css_selector: A CSS selector to extract data from an HTML/XML response
| Parameter | Type | Description |
|---|---|---|
flow_id * | string | |
css_selector | string | |
json_path | string |
search_traffic
Search captured traffic using filters. Args: query: Keywords to search in URL or body domain: Filter by domain name method: Filter by HTTP method (GET, POST, etc.) limit: Max results to return
| Parameter | Type | Description |
|---|---|---|
domain | string | |
limit | integer | |
method | string | |
query | string |
set_session_variable
Manually set a session variable to use in replayed flows.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
value * | string |
extract_session_variable
Extract a value from a flow's response body using a regex and store it as a session variable. Args: name: Variable name (referenced as $name in replay_flow) flow_id: The ID of the flow to extract from regex_pattern: The regex pattern with capture groups group_index: Which regex capture group to extract (default: 1)
| Parameter | Type | Description |
|---|---|---|
flow_id * | string | |
name * | string | |
regex_pattern * | string | |
group_index | integer |
clear_traffic
Clear all captured traffic from the database.
fuzz_endpoint
Fuzz an endpoint by substituting a target parameter with a category of DAST payloads. Args: flow_id: The flow to replay as the base request. target_param: The name of the parameter to replace. param_type: The location of the parameter: 'query' or 'json_body'. payload_category: The category of payloads ('sqli', 'xss', 'path_traversal').
| Parameter | Type | Description |
|---|---|---|
flow_id * | string | |
param_type * | string | |
payload_category * | string | |
target_param * | string | |
timeout | number |
replay_flow
Replay a captured flow, optionally with modified method, headers, or body. Supports session variable injection (e.g., $token) in headers and body.
| Parameter | Type | Description |
|---|---|---|
flow_id * | string | |
body | string | |
headers_json | string | |
method | string | |
timeout | number |
add_interception_rule
| Parameter | Type | Description |
|---|---|---|
action_type * | string | |
rule_id * | string | |
key | string | |
method | string | |
phase | string | |
search_pattern | string | |
url_pattern | string | |
value | string |
list_rules
clear_rules
list_tools
List all available tools with their descriptions.
export_openapi_spec
Exports captured API traffic patterns to an OpenAPI v3 JSON specification. Args: domain: Filter traffic by domain limit: Max number of traffic flows to analyze. None = all flows.
| Parameter | Type | Description |
|---|---|---|
domain | string | |
limit | integer |
get_api_patterns
Cluster captured traffic into endpoint patterns. Args: domain: Filter traffic by domain limit: Max number of flows to analyze. None = all flows.
| Parameter | Type | Description |
|---|---|---|
domain | string | |
limit | integer |
detect_auth_pattern
| Parameter | Type | Description |
|---|---|---|
flow_ids | string |
generate_scraper_code
Generate executable scraper/automation code from a comma-separated list of flow IDs. Args: flow_ids: Comma-separated list of flow IDs to include in the script. target_framework: The framework to generate code for.
| Parameter | Type | Description |
|---|---|---|
flow_ids * | string | |
target_framework | string |