ctpf proxy
Intercept and replay MCP traffic for inspection, testing, and analysis.Commands
proxy start
Start the proxy with an interactive TUI.| Option | Required | Type | Description |
|---|---|---|---|
--transport | Yes | string | Transport type: stdio, sse, or streamable-http |
--target-command | When transport is stdio | string | Server command to proxy (stdio only) |
--target-url | When transport is sse or streamable-http | string | Server URL to proxy (HTTP transports only) |
--intercept | No | flag | Start in intercept mode (default: passthrough) |
--session-file | No | string | Auto-save session to this file on exit |
proxy replay
Replay captured messages against a live server.| Option | Required | Type | Description |
|---|---|---|---|
--session-file | Yes | string | Path to saved session file |
--target-command | Yes* | string | Server command for replay (stdio) |
--target-url | Yes* | string | Server URL for replay (SSE/HTTP) |
--output | No | string | Save replay results to JSON file |
--timeout | No | float | Per-message response timeout in seconds (default: 10.0) |
--no-handshake | No | flag | Skip auto-handshake; session must start with initialize |
--target-command or --target-url is required.
Examples:
By default, the replay engine sends a synthetic
initialize handshake before replaying messages. Use --no-handshake if your session already includes the full handshake sequence.proxy export
Export a session to JSON.| Option | Required | Type | Description |
|---|---|---|---|
--session-file | Yes | string | Path to saved session file |
--output | Yes | string | Output file path |
--output-format | No | string | Export format (default: json) |
proxy inspect
Print session contents to stdout for review.| Option | Required | Type | Description |
|---|---|---|---|
--session-file | Yes | string | Path to saved session file |
--verbose, -v | No | flag | Show full JSON payloads for each message |
-v to include full JSON payloads.
Message Direction
Ininspect output:
→denotes client-to-server messages (requests and notifications sent to the server)←denotes server-to-client messages (responses and notifications from the server)
proxy start):
▶denotes client-to-server messages◀denotes server-to-client messages⏸prefix on held messages (intercept mode)✕prefix on dropped messages
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Command error (invalid options, file not found, validation failure) |
| 130 | Interrupted by user (Ctrl+C) |