Skip to main content
httpmon includes a built-in Model Context Protocol (MCP) server that lets LLM agents inspect captured traffic, replay requests, manage scripts, and control throttling — all programmatically.

Starting the MCP server

Pass --mcp to enable the server on the default address (127.0.0.1:9551):
httpmon --mcp
Use --mcp-addr for a custom address:
httpmon --mcp-addr 127.0.0.1:9000
When the MCP server is active, the status bar shows MCP :9551 (or your custom port).

Authentication

The MCP server uses bearer token authentication. A 32-byte random hex token is generated on first use and stored in ~/.httpmon/config.json (in the mcp_token field). Every request must include the token:
Authorization: Bearer <token>
Print the token without starting the proxy:
httpmon --mcp-token
The token is also printed to stderr on startup:
MCP server listening on 127.0.0.1:9551 (token: 3f8a2c...)

Available tools

The server exposes 14 tools organized into three categories:

Read tools

Inspect captured traffic without side effects.
ToolDescription
list_requestsPaginated flow listing with optional filter
search_requestsSubstring search on host and path
get_requestFull flow details (headers, bodies)
get_request_countCount flows matching a filter
export_harExport flows to HAR 1.2 JSON

Simulation tools

Replay requests and control proxy behavior.
ToolDescription
replay_requestResend a captured request or compose a new one
mock_responseIntercept matching URLs and return synthetic responses
set_throttleApply bandwidth throttling (preset or custom)
get_throttleQuery current throttle state

Script tools

Manage JavaScript hooks.
ToolDescription
list_scriptsAll scripts with metadata and status
create_scriptWrite a new JavaScript hook
get_scriptFetch script source and metadata
toggle_scriptEnable or disable a script
delete_scriptRemove a script
For full parameter and return value documentation, see the MCP tools reference.

Transport

The server uses HTTP Streamable transport (JSON-RPC 2.0 over HTTP POST). It listens on localhost only by default for security.

Integration

See MCP integration guide for configuration snippets for Claude Desktop, Cursor, and Claude Code.