Skip to main content
Glama

Start MITM proxy

proxy_start

Starts a local HTTPS MITM proxy and returns the LAN IP:port to set as your device's Wi-Fi proxy, enabling interception and mocking of network traffic with passthrough for unmatched requests.

Instructions

Bring up the mockttp HTTPS MITM proxy. Returns the LAN IP : port to type into the device's manual Wi-Fi proxy settings. Unmatched requests pass through to the real headend. If the device is an Android emulator, pass hostRewrites to map its 10.0.2.2 alias (means 'host loopback', only valid inside the emulator) to 127.0.0.1 so Metro/dev-server passthrough can reach the Mac.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoTCP port to listen on (default 8889).
scopeNoCapture-scope hostnames: only traffic for these hosts (and their subdomains) is retained in the log, to keep agent context small. Default [] (or omitted) = retain all captured traffic. Entries are hostnames or wildcard '*.example.com'. The proxy still MITMs and serves ALL hosts — scope only controls what is retained in proxy_list_traffic. Adjust at runtime with proxy_scope.
hostRewritesNoRewrite the upstream dial target for passthrough traffic. Use this when a device reaches the dev PC via a special alias that is not a real address on the Mac — e.g. the Android emulator's 10.0.2.2:8081 (maps to host loopback only from inside the emulator) -> 127.0.0.1:8081.
passthroughHostsNoHost:port entries whose traffic should bypass MITM interception entirely (e.g. the React Native Metro bundler). Each entry is 'hostname' or 'hostname:port'. The hostname is matched against CONNECT tunnels; port globs (e.g. ':808*') are recorded for future HTTP-level filtering. Example: ['192.168.0.2:8081', 'localhost:8081'].
restoreTransformsNoPath to a JSON file previously saved by proxy_save_transforms. Transforms are restored idempotently (by method+url+regex).
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and does so exceptionally well. It discloses that unmatched requests pass through, that scope only affects retained logs (not MITM behavior), and that the proxy still MITMs all hosts. This goes beyond a simple 'start' operation and sets accurate expectations, including a caveat about the Android emulator alias.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single paragraph of four sentences, front-loading the core purpose in the first sentence. Each sentence earns its place: purpose/output, passthrough behavior, and a specific configuration hint. No redundant filler, perfectly sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (5 parameters, no output schema, no annotations), the description offers a complete picture: what it does, what it returns (LAN IP:port), how to use it with emulators, and how scope affects logging. It even warns about the proxy MITMing all hosts despite scope, covering edge cases. This is sufficient for an agent to invoke and interpret the result correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already has 100% coverage with detailed per-parameter descriptions, so baseline is 3. The description adds extra value by explicitly explaining the practical use of hostRewrites (mapping 10.0.2.2 to 127.0.0.1) and clarifying that scope only controls log retention, not actual MITM behavior. This enriches the schema's information, justifying a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's primary action: 'Bring up the mockttp HTTPS MITM proxy.' It also specifies the output ('Returns the LAN IP : port') and distinguishes itself from siblings by being the start operation, unlike proxy_stop or proxy_list_traffic. The verb 'Bring up' is specific to the resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides valuable contextual guidance, such as using hostRewrites for Android emulator devices and clarifying that unmatched requests pass through to the real headend. However, it does not explicitly contrast with alternatives like proxy_mock_response or proxy_scope, though the tool's role as the start command makes this implicit. The guidance is specific enough to be actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shahfazliz/proxy-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server