> ## 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.

# Installation

> Install the heymcp CLI, and control where it goes.

## The one-liner

```bash theme={null}
curl -fsSL https://heymcp.dev/install.sh | sh
```

That's the whole thing. macOS and Linux, Intel and ARM. Windows through
[WSL](#windows-via-wsl).

> [!NOTE]
>
> Homebrew and npm packages don't exist yet. If you see a `brew install heymcp`
> or `npm install -g heymcp` in an older writeup, it won't work — the installer
> above is the only supported route today.

## Windows, via WSL

There is no native Windows build yet. The installer maps `Darwin` and `Linux`
to a binary and refuses everything else, so running it from a Windows shell
stops at `unsupported OS`.

Inside WSL you are on Linux, and the ordinary install is the whole answer:

```bash theme={null}
wsl
curl -fsSL https://heymcp.dev/install.sh | sh
heymcp login
```

`heymcp login` is a device flow — it prints a short code and a URL. If a
browser doesn't open from inside WSL, paste that URL into your browser on
Windows and approve it there. The CLI waits either way.

> [!WARNING]
>
> **Run your MCP server inside WSL too.** `heymcp share localhost:8000` from a
> WSL shell resolves `localhost` on the Linux side. A server listening on
> Windows is not there, and this is the one that costs you an afternoon.
>
> If the server has to stay on Windows, bind it to `0.0.0.0` rather than
> `127.0.0.1`, then point `share` at the Windows host as Linux sees it:
>
> ```bash theme={null}
> ip route show | grep -i default | awk '{ print $3 }'   # e.g. 172.30.96.1
> heymcp share http://172.30.96.1:8000
> ```
>
> Or turn on mirrored networking — `networkingMode=mirrored` under `[wsl2]` in
> `%UserProfile%\.wslconfig`, Windows 11 22H2 and up — and `localhost` means
> the same thing on both sides.

## What the installer does

It is POSIX `sh`, and it is short enough to read before you pipe it anywhere —
`curl -fsSL https://heymcp.dev/install.sh` on its own prints it.

1. **Detects your platform** and refuses clearly on anything unsupported.
   Windows is not published.
2. **Picks a directory that's already on your `PATH`** and writable without
   `sudo`, trying `~/.local/bin`, `~/bin`, `/opt/homebrew/bin`, `/usr/local/bin`
   in that order, and falling back to `~/.local/bin`.
3. **Works out the current version** from `https://heymcp.dev/dl/latest` unless
   `HEYMCP_VERSION` pins one, and **downloads**
   `heymcp-{darwin|linux}-{arm64|x86_64}.tar.gz` from `https://heymcp.dev/dl`.
4. **Verifies the SHA-256** against the published `checksums.txt` and refuses to
   install on a mismatch.
5. **Installs the binary**, moving rather than copying so an upgrade over a
   running binary doesn't hit `ETXTBSY`.
6. **Fixes your `PATH`** if it had to use a directory that isn't on it — it
   appends a line to `.zshrc`, `.bashrc` or `.profile` rather than printing an
   instruction and hoping. Re-running never duplicates the line.

## Controlling the install

**HEYMCP\_INSTALL\_DIR** `string` (default: a writable directory already on PATH, else \~/.local/bin)

Where to put the binary. Set this and the auto-detection is skipped entirely.

**HEYMCP\_VERSION** `string` (default: the newest published version, read from /dl/latest)

Pin a version instead of taking the newest one. Write it `0.2.0` or `v0.2.0`,
either works. Setting it skips the `latest` lookup entirely, so it is also how
you install when that lookup is unreachable.

**HEYMCP\_DOWNLOAD\_BASE** `string` (default: [https://heymcp.dev/dl](https://heymcp.dev/dl))

Where to fetch binaries and checksums from. Mostly of interest if you mirror
releases internally — a mirror needs a `latest` file naming the current
version alongside the `v*` directories, or set `HEYMCP_VERSION` and it is
never read.

```bash theme={null}
HEYMCP_INSTALL_DIR=/usr/local/bin curl -fsSL https://heymcp.dev/install.sh | sh
```

## Verifying it worked

```bash theme={null}
heymcp version
```

If your shell says `command not found`, the installer told you which file it
edited — open a new terminal, or source it.

## Upgrading

Re-run the one-liner. It overwrites the existing binary in place.

## Uninstalling

Delete the binary and the config directory:

```bash theme={null}
rm "$(command -v heymcp)"
rm -rf ~/.config/heymcp
```

The `PATH` line the installer may have added to your shell rc file is marked
with a `# Added by the heymcp installer` comment; remove it if that directory
is now empty.

> [!TIP]
>
> Running `heymcp logout` before you uninstall revokes the CLI token server-side
> as well as deleting it locally. Just deleting the config file leaves the token
> valid until you roll it from your profile page.


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