Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/mplogas/mitmproxy-mcp/claude-mdgit clone --depth 1 https://github.com/mplogas/mitmproxy-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/mplogas/mitmproxy-mcp/claude-md)<a href="https://agentmods.dev/instructions/mplogas/mitmproxy-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/mplogas/mitmproxy-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00820 | $0.00820 |
| Opus 5 | $0.00410 | $0.00410 |
| Sonnet 5 | $0.00164 | $0.00164 |
| Haiku 4.5 | $0.00082 | $0.00082 |
Grade A, and why
mitmproxy-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code when working with code in this repository.
Project
mitm-mcp is an MCP server that orchestrates mitmproxy (mitmdump) and tshark for network-level TLS interception of IoT device traffic, exposing capture and analysis operations as MCP tools over stdio transport.
Architecture
MCP client (Claude Code, etc.)
|
stdio transport
|
mitm-mcp (server.py)
|
tools.py -> session.py -> subprocess (mitmdump, tshark)
|
addon.py (standalone, runs inside mitmdump)
|
Pi network stack (hostapd AP on wlan0, eth0 uplink)
session.py is the ONLY module that manages long-lived subprocesses (Popen). Everything else talks to session.py. This prevents race conditions from split connection ownership.
addon.py is standalone -- no imports from mitm_mcp. It runs inside the mitmdump process which may use a different Python environment. It communicates with the MCP server via JSONL files only.
Safety Model
Three tiers enforced at the MCP server boundary:
- read-only: full autonomy (list_clients, get_flows, get_findings, capture_status)
- allowed-write: autonomous but logged (start_ap, stop_ap, start_proxy, stop_proxy, start_capture, stop_capture)
- approval-write: reserved for future response injection (no MVP tools)
Build and Run
# Install
pip install -e ".[dev]"
# Run server (stdio transport, spawned by MCP client)
python -m mitm_mcp
# Tests (no network hardware needed)
pytest
# Integration tests (AP + network setup required)
pytest tests/ -m network
Prerequisites
- mitmproxy installed (provides mitmdump): pip install mitmproxy
- tshark installed: apt install tshark
- WiFi AP configured via
scripts/ap-setup.sh(idempotent, run once or rerun to change values) - Operator must be SSH'd over Ethernet, not WiFi
AP Scripts
scripts/ap-setup.sh-- one-time setup. Installs packages, writes hostapd/dnsmasq configs, creates NetworkManager connection, enables IP forwarding. Idempotent. Use--dry-runto preview. Override defaults with--ssid,--passphrase,--channel,--subnet,--interface.scripts/ap-toggle.sh-- per-engagement.startbrings up hostapd + dnsmasq + iptables rules (NAT MASQUERADE, FORWARD ACCEPT for wlan0<->eth0, REDIRECT 80/443/8883 to mitmproxy),stoptears them down. Called by the MCP server's start_ap/stop_ap tools.start --passthrough(or--no-redirect) skips the REDIRECT rules, leaving a plain NAT AP. Use for sacrificial-pair captures where TLS plaintext is not needed (still get SNI / DNS / endpoint shape via tshark), or for any AP-as-AP scenario without interception. The MCP toolstart_apexposes this via thepassthroughboolean argument.stopis idempotent regardless of which start mode was used.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 85 lines · 820 tokens per session scan A 99ed76736738
mitmproxy-mcp CLAUDE.md is an instructions file published in the GitHub repository mplogas/mitmproxy-mcp (1 stars, last pushed 2mo ago), licensed MIT. It adds 820 tokens to every session, about $0.0041 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
mdb-esp32-cashless AGENTS.md
Instructions for nodestark/mdb-esp32-cashless, covering vmflow — agent context, 1. mqtt rpc — real-time device control, 2. supabase rest — data & credits, 3. agent playbooks and notes.
iot-dc3 AGENTS.md
AGENTS.md instructions for pnoker/iot-dc3, covering agents.md, scope and precedence, sources of truth, project overview and repository map.
iot-dc3 CLAUDE.md
Claude Code instructions for pnoker/iot-dc3: This file provides guidance to AI coding assistants when working with code in this repository.
AetherEdge AGENTS.md
Instructions for EvanL1/AetherEdge, covering aetheredge agent instructions, product direction, repository map, architecture boundaries and ai safety.
devices-mcp CLAUDE.md
Instructions for sandraschi/devices-mcp, covering devices-mcp -- claude code guide, entry points, standards and ports.
CLIronChef AGENTS.md
Instructions for sidkandan/CLIronChef, covering ai agent operating contract, about this project, fresh session bootstrap, non-negotiable rules and first commands.