Advanced mitmproxy MCP Server logo

Advanced mitmproxy MCP Server

Community
snapspecter

MCP Server that wraps mitmproxy and exposes it as a tool to any MCP client, allows your AI agents to inspect traffic, filter traffic, intercept & modify traffic, request reply, set global headers, and start/stop mitmproxy as needed.

Publishersnapspecter
Repositorymitmproxy-mcp
LanguagePython
Forks
30
Stars
131
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Advanced mitmproxy MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    131 stars and 30 forks from the linked repository.

mitmproxy MCP Server

A Model Context Protocol (MCP) server that transforms mitmproxy into a powerful toolset for AI agents. This allows LLMs (like Claude, GPT-4, or local models) to inspect, modify, and replay HTTP/HTTPS traffic in real-time.

New in this build (the fun stuff)

This project has grown beyond simple capture + replay. You can now:

  • Search traffic quickly with filters by domain/method/body text.
  • Extract data from responses using JSONPath or CSS selectors.
  • Use session variables to grab tokens from one response and reuse them in later replays.
  • Run lightweight fuzzing against query params or JSON body fields for quick DAST checks.
  • Reconstruct API patterns and export an OpenAPI-style spec from captured traffic.
  • Detect auth patterns (Bearer/JWT/API key/session cookie/CSRF/OAuth hints).
  • Generate starter scraper code from real captured flows.

Why use this?

Standard "web search" or "fetch" tools are stateless and easily detected. mitmproxy-mcp provides:

  • Deep Debugging: The agent can inspect full request/response cycles (headers, payloads, cookies) to identify why a frontend is failing or why an API is returning a 4xx/500 error.
  • API Reverse Engineering: Let the LLM observe undocumented internal APIs, map out JSON schemas, and generate client libraries or documentation automatically.
  • Automated Security Testing: Perform DAST (Dynamic Application Security Testing) by allowing the agent to inject payloads into specific parameters and analyze the response.
  • Live Interception: Modify traffic on the fly: inject headers, mock responses for testing, or block tracking pixels to reduce noise.
  • Stealth Replay: Uses curl-cffi to mimic Chrome/Safari TLS fingerprints, bypassing basic anti-bot measures that standard Python libraries trigger.

Key Features

  • Lifecycle Control: Start and stop the mitmproxy instance directly from the LLM.
  • Deep Inspection: Capture full request/response cycles, including headers, bodies, and timing.
  • Traffic Search & Filtering: Scope by domain, then search flows by query/method so context stays clean.
  • Active Interception: Dynamic rules to inject headers, replace body content via regex, or block requests.
  • Stealth Replay: Re-execute flows using curl-cffi to impersonate modern browser TLS fingerprints (e.g., Chrome).
  • Session-Aware Workflows: Extract dynamic values (like CSRF tokens) and re-inject them into replayed traffic.
  • Response Data Extraction: Pull structured values from HTML/JSON responses via CSS selectors and JSONPath.
  • API Discovery: Group similar endpoints, identify path/query params, and export OpenAPI JSON.
  • Security Recon Helpers: Detect common auth patterns and run targeted fuzz payloads.
  • Scraper Bootstrapping: Generate executable curl-cffi automation code from observed traffic.

Quickstart

Option 1: Using uvx (Recommended)

Add this to your MCP client configuration (e.g., Claude Desktop, Cursor, or AntiGravity):

json
{
  "mcpServers": {
    "mitmproxy-mcp": {
      "command": "uvx",
      "args": ["mitmproxy-mcp"]
    }
  }
}

Option 2: From a Cloned Repository

If you want to run from a local clone (useful for development or testing unreleased changes):

bash
git clone https://github.com/snapspecter/mitmproxy-mcp.git

Then add this to your MCP client configuration, replacing the path with your clone location:

json
{
  "mcpServers": {
    "mitmproxy-mcp": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mitmproxy-mcp", "mitmproxy-mcp"]
    }
  }
}

Installation

Option 1: Global Install (with uv)

bash
uv tool install mitmproxy-mcp

Option 2: Docker (Isolated Environment)

bash
# Build and run
docker build -t mitmproxy-mcp .
docker run -p 8080:8080 mitmproxy-mcp

Option 3: Manual Pip Install

bash
python -m venv venv
source venv/bin/activate
pip install mitmproxy-mcp

Available Tools

Lifecycle & Configuration

  • start_proxy(port=8080): Starts the mitmproxy server.
  • stop_proxy(): Shuts down the proxy.
  • set_scope(allowed_domains): Filters recorded traffic (e.g., ["api.github.com", "example.com"]).
  • list_tools(): Returns all exposed MCP tools and input schemas.

Inspection

  • get_traffic_summary(limit=20): Returns a list of recent network flows.
  • inspect_flow(flow_id): Provides full details and a curl equivalent for a specific flow.
  • search_traffic(query, domain, method, limit=50): Filter captured traffic by keyword/domain/method.
  • clear_traffic(): Clears persisted traffic history.

Modification & Interception

  • add_interception_rule(rule_id, action_type, ...):
  • action_type: inject_header, replace_body, or block.
  • phase: request or response.
  • set_global_header(key, value): Injects a header into every request.
  • remove_global_header(key): Removes a previously injected global header.
  • list_rules(): Shows currently active interception rules.
  • clear_rules(): Flushes all active interception rules.

Replay

  • replay_flow(flow_id, method, headers_json, body): Re-sends a request with modifications using browser-grade impersonation.

Extraction & Session Variables

  • extract_from_flow(flow_id, json_path=None, css_selector=None): Extract values from captured response bodies.
  • set_session_variable(name, value): Manually set a session variable.
  • extract_session_variable(name, flow_id, regex_pattern, group_index=1): Extract and save a variable from a response body.

Security & API Analysis

  • fuzz_endpoint(flow_id, target_param, param_type, payload_category, timeout=10.0): Replay with payload substitutions and report anomalies.
  • get_api_patterns(domain=None, limit=50): Cluster captured traffic into endpoint patterns.
  • export_openapi_spec(domain=None, limit=50): Produce an OpenAPI v3 JSON spec from captured traffic.
  • detect_auth_pattern(flow_ids=None): Infer likely auth mechanisms from observed requests.

Code Generation

  • generate_scraper_code(flow_ids, target_framework="curl_cffi"): Generate starter scraper/automation code from captured flows.

Programmatic Usage

Note: These are JSON-RPC calls sent by the MCP Host (Client). You do not need to type these manually in the terminal.

  1. Initialize the Proxy: {"method": "tools/call", "params": {"name": "start_proxy", "arguments": {"port": 8080}}}
  2. Intercept & Block: {"method": "tools/call", "params": {"name": "add_interception_rule", "arguments": {"rule_id": "block-ads", "action_type": "block", "url_pattern": ".*analytics.*"}}}
  3. Modify Response: {"method": "tools/call", "params": {"name": "add_interception_rule", "arguments": {"rule_id": "mock-api", "action_type": "replace_body", "url_pattern": ".*user/profile.*", "action_value": "{\"name\": \"AI Agent\"}"}}}

Helpful Tips

  • Manage Context: Use set_scope immediately. LLMs perform poorly when flooded with background OS telemetry.
  • Browser Setup: Ensure your browser or application is configured to use the proxy (usually localhost:8080) and has the mitmproxy CA certificates installed for HTTPS inspection.
  • Stealth: The replay_flow tool uses curl-cffi specifically to avoid being flagged as a bot by services that check TLS fingerprints.

Development

bash
git clone [https://github.com/snapspecter/mitmproxy-mcp.git](https://github.com/snapspecter/mitmproxy-mcp.git)
cd mitmproxy-mcp
uv sync
uv run pytest

License: MIT

Installation

TypingMind
{
  "mcpServers": {
    "mitmproxy-mcp": {
      "command": "mitmproxy-mcp",
      "args": []
    }
  }
}

Use Advanced mitmproxy MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Advanced mitmproxy MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Advanced mitmproxy MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Advanced mitmproxy MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "mitmproxy-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Advanced mitmproxy MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Advanced mitmproxy MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Advanced mitmproxy MCP Server to help me with this task?
Advanced mitmproxy MCP Server
Sure. I read it.
Here is what I found using Advanced mitmproxy MCP Server.

Option 2: Add an MCP server URL

Use this when Advanced mitmproxy MCP Server is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter the MCP server URL from the provider in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste the MCP server URL from the provider into the Server URL field.
  2. Enter a connection name for Advanced mitmproxy MCP Server.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the Advanced mitmproxy MCP Server connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the Advanced mitmproxy MCP Server tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the Advanced mitmproxy MCP Server tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Advanced mitmproxy MCP Server to help me with this task?
Advanced mitmproxy MCP Server
Sure. I read it.
Here is what I found using Advanced mitmproxy MCP Server.

Frequently asked questions

What is the Advanced mitmproxy MCP Server MCP server used for?

Advanced mitmproxy MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Advanced mitmproxy MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Advanced mitmproxy MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Advanced mitmproxy MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Advanced mitmproxy MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Advanced mitmproxy MCP Server MCP to TypingMind?

Advanced mitmproxy MCP Server can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does Advanced mitmproxy MCP Server MCP provide in TypingMind?

Advanced mitmproxy MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Advanced mitmproxy MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Advanced mitmproxy MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇