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/moha-abdi/mitmproxy-mcp/agents-mdgit clone --depth 1 https://github.com/moha-abdi/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/moha-abdi/mitmproxy-mcp/agents-md)<a href="https://agentmods.dev/instructions/moha-abdi/mitmproxy-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/moha-abdi/mitmproxy-mcp/agents-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.02436 | $0.02436 |
| Opus 5 | $0.01218 | $0.01218 |
| Sonnet 5 | $0.00487 | $0.00487 |
| Haiku 4.5 | $0.00244 | $0.00244 |
Grade A, and why
mitmproxy-mcp AGENTS.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 — 337 lines — stays where its author put it; the contents beside it link to each section on GitHub.
mitmproxy-mcp Development Guide for AI Agents
Project: MCP Server for mitmproxy -- HTTP traffic analysis via Model Context Protocol
Status: Feature-complete (v0.1.0), pre-PyPI publish
Stack: Python 3.10+, mitmproxy 11, MCP SDK, Pydantic v2 (v1 compat API)
Repo: moha-abdi/mitmproxy-mcp
Architecture
MCP server runs inside mitmproxy as an addon. Not a separate process -- it's embedded directly in the proxy event loop via the running() hook and asyncio.create_task().
mitmproxy (proxy process)
addon.py (thin wrapper, loads from mitmproxy_mcp.addon)
MitmproxyAddon
flow hooks: request(), response(), error()
MCP server: SSE on port 9011 (default)
20 tools across 4 categories
The SSE transport uses Starlette + uvicorn. Each connecting client gets its own ServerSession with a unique session ID -- multi-client is handled natively by the MCP SDK.
Dependency Management
Always use uv, never pip:
uv pip install -e ".[dev]"
uv pip install <package>
uv pip install --upgrade <package>
Python Version
- Minimum: Python 3.10 (required by
mcppackage) - System Python: 3.9.6 (too old, don't use)
- Available:
/Users/moha/.local/bin/python3.10
/Users/moha/.local/bin/python3.10 -m venv .venv
source .venv/bin/activate
uv pip install -e ".[dev]"
mitmproxy-mcp install-shims --force
Project Structure
mitmproxy-mcp/
addon.py thin wrapper (mitmproxy loads this)
pyproject.toml package config, dependencies
pytest.ini asyncio_mode=auto
README.md user docs with client setup guides
SKILL.md agent skill definition (agentskills.io format)
LICENSE MIT
.github/workflows/ci.yml CI: ruff + mypy + pytest
mitmproxy_mcp/ main package
__init__.py version = "0.1.0"
__main__.py CLI stub
addon.py mitmproxy addon, MCP server lifecycle
models.py pydantic models for flow serialization
storage.py thread-safe in-memory flow storage
privacy.py redaction engine (tokens, keys, passwords, JWTs)
transport.py stdio, sse, tcp transport layer
tools/
__init__.py
flows.py 8 flow query/export tools
replay.py 4 replay and modification tools
intercept.py 5 interception control tools
config.py 3 proxy configuration tools
tests/ 174 tests, all passing
conftest.py shared fixtures
test_models.py model serialization tests
test_flow_tools.py flow query tool tests
test_replay_tools.py replay tool tests
test_intercept_tools.py intercept tool tests
test_config_tools.py config tool tests
test_privacy.py redaction engine tests
test_transport.py transport layer tests
test_integration.py addon integration tests
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 · 337 lines · 2,436 tokens per session scan A 61908b3d58bc
mitmproxy-mcp AGENTS.md is an instructions file published in the GitHub repository moha-abdi/mitmproxy-mcp (9 stars, last pushed 6mo ago), licensed MIT. It adds 2,436 tokens to every session, about $0.0122 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
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.