# Prontaro MCP server

Source: https://prontaro.com/docs/cli/mcp/

Debug failing webhooks and verify handler fixes straight from your coding agent, with no cloud relays.

`prontaro mcp` exposes **8 tools** and **2 prompts** over `stdio` JSON-RPC 2.0, works on every plan including [Free](https://prontaro.com/docs/billing/plans.md), and keeps tunnel inspection strictly local on `127.0.0.1`.

## Connect your MCP client

Prontaro is listed in the Official MCP Registry as `com.prontaro/mcp`.

### Option 1. Quick setup via `@prontaro/mcp` (CLI in `PATH`)

`@prontaro/mcp` is a thin launcher without a bundled binary — it invokes `prontaro` (`0.5.0` or later) from `PATH`. On Windows, it requires the native `prontaro.exe` installer; a global npm `prontaro.cmd` shim will not work (use Option 2 instead).

Add Prontaro in Claude Code or Codex with one command:

**Claude Code**

```bash
claude mcp add prontaro -- npx -y @prontaro/mcp
```

To enable Prontaro across all projects rather than only the current directory, pass `--scope user`: `claude mcp add -s user prontaro -- npx -y @prontaro/mcp`.

On Windows (without WSL), wrap `npx` with `cmd /c`: `claude mcp add prontaro -- cmd /c npx -y @prontaro/mcp`.

**Codex (writes to ~/.codex/config.toml)**

```bash
codex mcp add prontaro -- npx -y @prontaro/mcp
```

For Cursor, Windsurf, and other MCP hosts configured via `mcp.json`, add an entry to your `mcpServers` map (in VS Code `.vscode/mcp.json`, use `servers` as the top-level key):

**mcp.json**

```json
{
  "mcpServers": {
    "prontaro": {
      "command": "npx",
      "args": ["-y", "@prontaro/mcp"]
    }
  }
}
```

### Option 2. Without installing CLI (`npx -y prontaro mcp`)

Use this option when `prontaro` is not in `PATH`, or on Windows if you installed `prontaro` via [npm](https://prontaro.com/docs/cli/npm.md) rather than the native installer:

**Claude Code**

```bash
claude mcp add prontaro -- npx -y prontaro mcp
```

On Windows (without WSL): `claude mcp add prontaro -- cmd /c npx -y prontaro mcp`.

**Codex**

```bash
codex mcp add prontaro -- npx -y prontaro mcp
```

**mcp.json**

```json
{
  "mcpServers": {
    "prontaro": {
      "command": "npx",
      "args": ["-y", "prontaro", "mcp"]
    }
  }
}
```

### Option 3. Direct CLI binary (`prontaro mcp`)

If you already installed `prontaro` and prefer not to run through `npx`, point your MCP client straight at the `prontaro` binary:

**Claude Code**

```bash
claude mcp add prontaro -- prontaro mcp
```

**Codex**

```bash
codex mcp add prontaro -- prontaro mcp
```

**mcp.json**

```json
{
  "mcpServers": {
    "prontaro": {
      "command": "prontaro",
      "args": ["mcp"]
    }
  }
}
```

If your editor cannot find `prontaro` in `PATH`, set `command` to the full path returned by `which prontaro` (on Windows, use the native `prontaro.exe` path from `where.exe prontaro.exe`, not an npm `prontaro.cmd` shim).

The server communicates strictly over standard input and output (`stdio`), so your editor manages its lifecycle automatically without opening extra network ports.

## Try it

1. Start a tunnel for your local server: `prontaro http 3000 --name webhooks`.
2. Send a failing webhook or test request through the tunnel’s public URL so the local inspector captures an error (for example, a `500` response).
3. Ask your coding agent (or invoke the `debug-last-error` prompt): *“Look at the last failed webhook in the `webhooks` tunnel, find why it failed, and replay it locally after the fix.”*
4. The agent runs the loop without leaving your editor: `list_requests` finds the latest error, `get_request` reads the redacted payload and response, and after a handler fix `replay_request` re-sends the request locally to check the new status (for example, `500 → 200`).

## Tools

By default, `prontaro mcp` exposes **8 tools**: 6 read-only tools plus `replay_request` and `clear_requests`. Pass `--read-only` to expose only the 6 read-only tools, or `--allow-edit` to enable the 9th tool (`replay_edited`).

| Tool | Mode | Key parameters | Purpose |
| --- | --- | --- | --- |
| `list_tunnels` | Read-only (always) | — | List active local inspectors and their HTTP/TCP tunnels (public URL, local address, status, request count, memory) |
| `list_requests` | Read-only (always) | `tunnel`, `method`, `path`, `status`, `kind`, `q`, `hide_assets`, `limit`, `port` | List captured HTTP requests newest first; supports status filters (`500`, `4xx`, `5xx`, `>=400`, `errors`) and asset hiding |
| `get_request` | Read-only (always) | `id` (required), `port`, `max_body_bytes` | Return redacted request and response headers and bodies for one captured request (`max_body_bytes` defaults to `16384`, range `256`–`65536`) |
| `wait_for_request` | Read-only (always) | `tunnel`, `method`, `path_prefix`, `status`, `hide_assets`, `timeout_sec`, `port` | Wait for the next matching request over the live local event stream without polling (`timeout_sec` defaults to `15`, max `30`; `hide_assets` defaults to `true`) |
| `get_status` | Read-only (always) | — | Read-only summary of account plan, static IPv4 addresses, tunnel slots, quotas, cached tunnels, and running inspectors (works with no active tunnels) |
| `run_doctor` | Read-only (always) | — | Read-only connectivity and environment diagnostics covering login, clock, proxy, API and server TLS, tunnel DNS, saved tunnel state, CLI version, and running inspectors (works with no active tunnels) |
| `replay_request` | Write (default) | `id` (required), `port` | Replay a captured request locally, preserving the captured body and applicable headers directly to the tunnel’s local server without crossing Prontaro servers or spending tunnel quota |
| `clear_requests` | Write (default) | `port` | Clear captured requests from the local inspector’s in-memory buffer |
| `replay_edited` | Write (`--allow-edit` only) | `id` (required), `method`, `path`, `headers`, `body`, `port` | Send an edited copy strictly to the original tunnel’s local server; omitted fields inherit raw values inside the inspector without exposing secrets |

## Prompts

MCP hosts that support reusable prompts expose two built-in workflows:

| Prompt | Optional arguments | Workflow |
| --- | --- | --- |
| `debug-last-error` | `tunnel` | Lists recent errors (`status: "errors"`), inspects the newest failure with `get_request`, correlates the cause with your local codebase, and verifies your fix with `replay_request` (the replay step requires default mode or `--allow-edit`; disabled under `--read-only`) |
| `catch-webhook` | `tunnel`, `path_prefix` | Confirms your active tunnel URL with `list_tunnels`, waits for the next matching delivery with `wait_for_request`, reads the payload with `get_request`, and summarizes its headers and schema |

## How tunnel discovery works

Whenever an agent calls an inspector tool, `prontaro mcp` probes `127.0.0.1:4040`–`4059` (skipping `4045`) in parallel with no state files on disk. Tunnels started or restarted during your coding session appear right away without restarting the MCP server.

- **Custom inspector port:** if you run `prontaro http` or `prontaro run` with `--inspect-port` outside `4040`–`4059`, pass `--port <port>` to `prontaro mcp` (for example `"args": ["mcp", "--port", "9090"]` in `mcp.json`, or `codex mcp add prontaro -- prontaro mcp --port 9090`).
- **One running inspector:** tools target it automatically—no `port` argument is needed.
- **Multiple running inspectors:** `list_tunnels` returns each active inspector with its `port`, and `list_requests` aggregates entries across all active processes with `inspector_port` on each item. Single-inspector tools (`get_request`, `wait_for_request`, `replay_request`, `replay_edited`, `clear_requests`) accept an optional `port` argument when more than one inspector is active; `wait_for_request` also resolves the port automatically if `tunnel` matches a single running inspector.
- **No running tunnels yet:** `prontaro mcp` starts normally even when no tunnels are active (or before `prontaro login`). `get_status` and `run_doctor` work immediately, while inspector tools return a hint to start `prontaro http` or `prontaro run`. If you launch a tunnel without an interactive terminal (from a script or an agent’s background shell), pass `--inspect` (`prontaro http 3000 --inspect`) so the local inspector starts.

## Flags and safety modes

```text
prontaro mcp [--port <port>] [--read-only] [--allow-edit]
```

| Flag | Effect |
| --- | --- |
| `--port <port>` | Connect only to a local inspector bound to `127.0.0.1:<port>` (`1`–`65535`) instead of scanning `4040`–`4059`. |
| `--read-only` | Expose only the 6 read-only tools, hiding `replay_request`, `clear_requests`, and `replay_edited`. Cannot be combined with `--allow-edit`. |
| `--allow-edit` | Enable the opt-in `replay_edited` tool for sending modified payloads to the original tunnel’s local server. Cannot be combined with `--read-only`. |

Pass flags directly in your MCP host configuration when you want strict read-only inspection or edited replays:

**mcp.json with read-only mode**

```json
{
  "mcpServers": {
    "prontaro": {
      "command": "prontaro",
      "args": ["mcp", "--read-only"]
    }
  }
}
```

## Privacy and scope boundaries

Because captured traffic originates from external callers and flows into a language model, `prontaro mcp` enforces strict local guardrails:

- **Recognized secrets stay masked:** `get_request` and `list_requests` never request secret unmasking (`?reveal=1`), so recognized sensitive headers, query parameters, and JSON or form fields always return `REDACTED` (pattern-based masking covers common field names and cannot catch arbitrary custom structures). Neither `get_status` nor `run_doctor` exposes CLI tokens or forwarding keys. When using `replay_edited`, any field the agent omits inherits the original value inside the local inspector process so credentials never leave your machine.
- **Untrusted-input markers:** captured traffic responses include `"untrusted_external_input": true` (and a security notice on `get_request`) reminding the model to treat external headers, paths, and bodies strictly as data rather than instructions.
- **Body truncation cap:** `get_request` trims request and response bodies to `16 KiB` by default (`max_body_bytes`, up to `64 KiB`) and marks trimmed bodies with `"truncated_for_mcp": true` to protect model context.
- **Loopback isolation:** the MCP server talks only to `127.0.0.1` without routing through `HTTP_PROXY` or following redirects. For full details on redaction patterns, ring-buffer memory caps, and local server security, see [Local web inspector](https://prontaro.com/docs/tunnels/inspector.md) and [Local inspector API](https://prontaro.com/docs/tunnels/inspector-api.md).
- **Intentional scope limits:** `prontaro mcp` does not start, stop, rename, or delete tunnels, does not change [access rules or IP allowlists](https://prontaro.com/docs/tunnels/access.md), and does not modify logins, account settings, or background services. Run those commands yourself in your terminal or the [Prontaro dashboard](https://my.prontaro.com/).

## Next steps

- [Install with npm](https://prontaro.com/docs/cli/npm.md) — run `prontaro` on demand with `npx` or install it globally through npm.
- [Local web inspector](https://prontaro.com/docs/tunnels/inspector.md) — browser UI workflow, replay behavior, memory limits, and keyboard shortcuts.
- [Local inspector API](https://prontaro.com/docs/tunnels/inspector-api.md) — zero-setup `/llms.txt` prompts, non-MCP tools, and direct loopback `curl` endpoints.
- [Webhooks: Stripe, GitHub, and Telegram](https://prontaro.com/docs/integrations/webhooks.md) — permanent local webhook URLs, HMAC signature verification, and delivery debugging.
- [prontaro CLI command reference](https://prontaro.com/docs/cli/commands.md) — full list of subcommands, global flags, and terminal examples.
