> ## Documentation Index
> Fetch the complete documentation index at: https://docs.heymcp.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# heymcp share

> Open a tunnel to a local MCP server and stay attached.

```bash theme={null}
heymcp share <target>
```

Gives your local MCP server a public HTTPS URL, runs the
[handshake probe](https://docs.heymcp.dev/concepts/the-probe.md) against it, and then stays in the
foreground streaming a live ticker of everything that happens.

Ctrl-C closes the tunnel.

```bash theme={null}
heymcp share localhost:8000
```

```
●  myapp — https://amber-jetty.t.heymcp.dev/mcp
✓  handshake ok — 3 tools
→  inspector: https://app.heymcp.dev/s/x7k2

14:02:31  CALL  place_order              ✗  120ms
14:02:34  CALL  place_order              ✓   62ms
```

## Target

A port, a host, or a URL. See [specifying a target](https://docs.heymcp.dev/cli/overview.md#specifying-a-target)
for every accepted shape.

A bare hostname defaults to `http`. Herd and Valet secured sites are served over
HTTPS, so write the scheme for those: `heymcp share https://myapp.test`.

## Options

**--path \<PATH>** (default: /mcp)

The MCP route on the local server, if it is not `/mcp`.

> [!WARNING]
>
> Currently needs `--all-paths` alongside it, or the URL it advertises will
> answer `-32003`. See [URLs and paths](https://docs.heymcp.dev/concepts/urls-and-paths.md#a-non-default-mcp-route).

**--slug \<SLUG>**

Ask for a specific slug instead of your reserved one. **Pro.**

```bash theme={null}
heymcp share 8000 --slug pizza-sesh
```

3–63 characters, lowercase letters, digits and hyphens, no leading or
trailing hyphen, no `--`, and not one of the
[reserved names](https://docs.heymcp.dev/concepts/urls-and-paths.md#slug-rules).

**--domain \<HOST>**

Serve on a verified custom domain. **Pro.**

```bash theme={null}
heymcp share 8000 --domain mcp.example.com
```

The domain must already be verified — see
[Custom domains](https://docs.heymcp.dev/account/custom-domains.md).

**--bearer \<TOKEN>** (default: none)

Require a static bearer token at the edge, and strip it before forwarding.
Also reads `HEYMCP_BEARER`.

```bash theme={null}
heymcp share 8000 --bearer s3cret
```

> [!WARNING]
>
> Claude.ai cannot send a bearer token and will fail silently. See
> [Authentication](https://docs.heymcp.dev/security/authentication.md).

**--all-paths**

Forward every path, not just `/mcp*` and `/.well-known/*`.

This makes your whole local server publicly reachable. See
[What is exposed](https://docs.heymcp.dev/security/what-is-exposed.md#all-paths).

## Reading the ticker

Each row is one exchange: time, kind, subject, outcome, latency.

```
14:02:31  CALL  place_order              ✗  120ms
14:02:34  CALL  place_order              ✓   62ms
```

The kinds are `INIT`, `LIST`, `CALL`, `NOTIF`, `RPC`, `ERROR`, `HTTP`, `OPAQUE`
and `DROP`, with a `←` on the response half. A replayed call is tagged `REPLAY`.

| Glyph | Meaning |
| - | - |
| `●` | The tunnel is up |
| `✓` | Succeeded |
| `✗` | Failed |
| `!` | Warning |
| `→` | Informational |

Housekeeping frames are filtered out of the ticker so they don't drown the
interesting ones. The latency is measured at the edge, so it includes the round
trip to your machine — the number an agent actually experiences.

For anything more than a glance, open the inspector link. The terminal ticker
is a heartbeat; the [timeline](https://docs.heymcp.dev/concepts/the-inspector.md) is where you can expand
payloads and replay calls.

## Reconnects

If your network drops, the CLI backs off and retries — quietly for the first 30
seconds, so a blink doesn't spam your terminal. Reconnecting within 15 minutes
[resumes the same session](https://docs.heymcp.dev/concepts/sessions.md#reconnects-dont-fork-your-history)
rather than starting a new one.

Your URL doesn't change either way.

## Scripting

```bash theme={null}
heymcp share 8000 --json
```

Emits machine-readable output. Combined with the
[exit codes](https://docs.heymcp.dev/cli/overview.md#exit-codes), this is enough to wire a tunnel into a
larger script.

## Common problems

> [accordion] Too many tunnels open
>
> Hobby allows 3 at once, Pro allows 10. `heymcp sessions` shows what's live.

> [accordion] That slug is taken, or reserved
>
> Pick another, or drop `--slug` and use your reserved one.

> [accordion] --slug or --domain refused
>
> Both are Pro features. Check with `heymcp whoami`.

> [accordion] The handshake reports failures
>
> The tunnel is still up and usable. The report is telling you what will break
> with real clients — see the [checks reference](https://docs.heymcp.dev/lint.md).

> [accordion] Could not reach the local server
>
> The target is wrong or nothing is listening. `curl` the same address to
> confirm, then check the port.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.