> ## 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](/concepts/the-probe) 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](/cli/overview#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

<ParamField path="--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](/concepts/urls-and-paths#a-non-default-mcp-route).
  </Warning>
</ParamField>

<ParamField path="--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](/concepts/urls-and-paths#slug-rules).
</ParamField>

<ParamField path="--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](/account/custom-domains).
</ParamField>

<ParamField path="--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](/security/authentication).
  </Warning>
</ParamField>

<ParamField path="--all-paths">
  Forward every path, not just `/mcp*` and `/.well-known/*`.

  This makes your whole local server publicly reachable. See
  [What is exposed](/security/what-is-exposed#all-paths).
</ParamField>

## 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](/concepts/the-inspector) 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](/concepts/sessions#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](/cli/overview#exit-codes), this is enough to wire a tunnel into a
larger script.

## Common problems

<AccordionGroup>
  <Accordion title="Too many tunnels open">
    Hobby allows 3 at once, Pro allows 10. `heymcp sessions` shows what's live.
  </Accordion>

  <Accordion title="That slug is taken, or reserved">
    Pick another, or drop `--slug` and use your reserved one.
  </Accordion>

  <Accordion title="--slug or --domain refused">
    Both are Pro features. Check with `heymcp whoami`.
  </Accordion>

  <Accordion title="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](/lint).
  </Accordion>

  <Accordion title="Could not reach the local server">
    The target is wrong or nothing is listening. `curl` the same address to
    confirm, then check the port.
  </Accordion>
</AccordionGroup>
