Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

mitmdump

$ mitmdump Community High Risk
mitmproxy Project · Browser & Web · MIT · macos / linux / windows

mitmdump is the non-interactive CLI companion to mitmproxy. It captures, inspects, replays (--server-replay), and exports HTTP/HTTPS traffic to .mitm or HAR files (--set hardump=...), or runs Python addon scripts (-s) for automated API debugging.

FCRS-1.0 Score
76 /100
Good
High Confidence
Zero-Friction Install
brew install mitmproxy
CLI vs MCP Decision CLI Only

Runs as a background local HTTP proxy or offline .mitm/.har analyzer; use -nr to read saved dumps without binding a port.

Agent-Readiness Checklist

Local Probe Evidence
— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md
Version
Mitmproxy: 12.2.3 binary
Startup
1336 ms
Exit Codes (help / invalid)
1 / 1
NO_COLOR Clean / Non-TTY Safe
Yes / Safe
Captured --help excerpt
usage: mitmdump [options] [filter]

positional arguments:
  filter_args           Filter expression, equivalent to setting both the
                        view_filter and save_stream_filter options.

options:
  -h, --help            show this help message and exit
  --version             show version number and exit
  --options             Show all options and their default values
  --commands            Show all commands and their signatures
  --set option[=value]  Set an option. When the value is omitted, booleans are
                        set to true, strings and integers are set to None (if
                        permitted), and sequences are emptied. Boolean values
                        can be true, false or toggle. Sequences are set using
                        multiple invocations to set for the same option.
  -q, --quiet           Quiet.
  -v, --verbose         Increase log verbosity.
  --mode, -m MODE       The proxy server type(s) to spawn. Can be passed
                        multiple times. Mitmproxy supports "regular" (HTTP),
                        "local", "transparent", "socks5", "reverse:SPEC",
                        "upstream:SPEC", and "wireguard[:PATH]" proxy servers.
                        For reverse and upstream proxy modes, SPEC is host
                        specification in the form of "http[s]://host[:port]".
                        For WireGuard mode, PATH may point to a file
                        containing key material. If no such file exists, it
                        will be created on startup. You may append
                        `@listen_port` or `@listen_host:listen_port` to
                        override `listen_host` or `listen_port` for a specific
                        proxy mode. Features such as client playback will use
                        the first mode to determine which upstream server to
                        use. May be passed multiple times.
  --no-anticache
  --anticache           Strip out request headers that might cause the server
                        to return 304-not-modified.
  --no-showhost
  --showhost            Use the Host header to construct URLs for display.
                        This option is disabled by default because malicious
                        apps may send misleading host headers to evade your
                        analysis. If this is not a concern, enable this
                        options for better flow display.
  --no-show-ignored-hosts
  --show

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 17 / 25

Non-interactive CLI (mitmdump vs TUI mitmproxy) with -nr offline reading, -s Python scripts, and HAR export, though live mode blocks as a daemon.

  • Non-interactive companion to mitmproxy; supports -nr, -s, and --set hardump
Trust & Safety 16 / 25

Man-in-the-middle TLS decryption handles sensitive ~/.mitmproxy CA private keys and records full auth headers/tokens in captures.

  • Generates local MITM CA private keys and logs unredacted HTTP credentials
Setup & Portability 13 / 15

Installed cleanly via brew, pip, uvx, or standalone binaries, though clients must trust the local CA for HTTPS.

  • Available via Homebrew, PyPI, and official binaries
Utility & Efficiency 13 / 15

Unmatched for inspecting mobile/SDK HTTP traffic, server-replay mocks, and exporting HAR files.

  • Native HAR export/import, -s Python addons, and --server-replay
Maintenance & Lineage 9 / 10

Actively maintained by the mitmproxy Project (mitmproxy/mitmproxy, MIT).

  • Official mitmproxy/mitmproxy repository
Docs & Verifiability 8 / 10

Clear official documentation covering addons, HAR export, and replay modes.

  • Official docs at docs.mitmproxy.org

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

Generates and uses local interception CA keys under ~/.mitmproxy/ to decrypt HTTPS traffic when clients trust the CA.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

Free, MIT open-source Python CLI.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# mitmdump Agent Rules
- `mitmdump` runs as a persistent proxy daemon unless `-nr` (offline read) is passed; start with an explicit timeout or background task and clean up when done.
- Captured `.mitm`/`.har` files contain full auth cookies and Bearer tokens—never commit or share raw captures.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect a saved traffic dump offline without starting a proxy
mitmdump -nr capture.mitm --flow-detail 2

Reads capture.mitm offline (-nr, no proxy server) and prints summary headers/bodies.

Controlled Writes & Previews

Run a headless proxy saving traffic to HAR
mitmdump -p 8080 --set hardump=traffic.har -q

Listens on port 8080 quietly (-q) and writes captured flows to traffic.har on exit.

Strengths for Agents

  • + Native HAR export (--set hardump=...) and offline capture inspection (-nr).
  • + Powerful -s Python addon API and --server-replay mocking.

Caveats & Pitfalls

  • ! Live proxy mode stays running indefinitely until signaled.
  • ! Captured .mitm/.har files store plaintext auth tokens and cookies.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI