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

# Connect to Hosts

> Tunnel your local server to ChatGPT and Claude

![Connect to Hosts](https://docs.skybridge.tech/images/tunnel.webp)

ChatGPT and Claude connect to MCP servers over the internet, and your dev server lives on localhost. The tunnel bridges the two: it exposes your local server on a public URL, so real hosts run your app while it keeps reloading on every file save.

> [!NOTE]
>
> Desktop MCP clients (VSCode, Goose, Postman, MCPJam) connect directly to `http://localhost:3000/mcp`: no tunnel needed.

## Start the Tunnel

Pass the `--tunnel` flag to the dev server, or toggle **Tunnel** in the [DevTools](https://docs.skybridge.tech/test/devtools.md) header:

```bash npm theme={null}
npm run dev -- --tunnel
```

```bash pnpm theme={null}
pnpm dev --tunnel
```

```bash yarn theme={null}
yarn dev --tunnel
```

```bash bun theme={null}
bun dev --tunnel
```

```bash deno theme={null}
deno task dev --tunnel
```

Skybridge runs an [Alpic tunnel](https://docs.alpic.ai/cli/tunnel), then prints your public URL (e.g., `https://cool-marmot-fondue-420.alpic.dev/mcp`).

## Connect to Hosts

### ChatGPT

1. Go to [ChatGPT Plugins](https://chatgpt.com/plugins) and select the **+** button
2. Enter a name and description, then the printed `/mcp` URL
3. Create the connection, then select your plugin with the **+** button in a new conversation

> [!NOTE]
>
> Creating plugins requires developer mode to be enabled: **Settings → Security and login → Developer mode**.

### Claude

1. Go to **Customize → Connectors → Add custom connector**
2. Enter your app name and the printed `/mcp` URL
3. Click **Add**, then enable the connector in a new conversation

## Iterate Without Reconnecting

The Alpic tunnel URL is stable across restarts: register the plugin or connector once. Hot reload works through it too: view edits show up in the host on save, on desktop and mobile alike.

## Read View Logs on Mobile or Desktop Apps

When your app runs in the ChatGPT or Claude desktop or mobile app, there's no console to open, so the [view](https://docs.skybridge.tech/build/view.md)'s logs are out of reach. Vite's [`forwardConsole`](https://vite.dev/config/server-options#server-forwardconsole) prints them in the terminal running your dev server. The [scaffold](https://docs.skybridge.tech/get-started/quickstart.md#scaffold-your-project) limits it to errors: add the levels you want to `logLevels` in `vite.config.ts`.

```ts vite.config.ts theme={null}
server: {
  forwardConsole: {
    unhandledErrors: true,
    logLevels: ["error"], // [!code --]
    logLevels: ["error", "warn", "log"], // [!code ++]
  },
},
```

> [!NOTE]
>
> A log placed in a component's render body appears twice per render: views run under React `StrictMode` in development, which invokes each render twice.

## Limitation

ChatGPT and Claude cache your tool definitions at registration. When the server schema changes (a [tool](https://docs.skybridge.tech/build/tools.md) added or renamed, an [input schema](https://docs.skybridge.tech/api-reference/register-tool.md#inputschema-outputschema) edited), refresh the app or connector in the host so the model sees the new definitions.

## Go Further

> [card] [DevTools](https://docs.skybridge.tech/test/devtools.md)
>
> Call tools and render views locally, without a host

> [card] [Playground](https://docs.skybridge.tech/test/playground.md)
>
> Chat with a real model running your app

> [card] [Audit](https://docs.skybridge.tech/test/audit.md)
>
> Catch spec and platform issues before submission


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