# Connect with an API token

Connect an AI app that can’t sign in, with a token made for it.

Most AI apps sign in, and that is the way to choose first. Use a token for an app that can’t. ChatGPT, Claude and Raycast sign in only.

A token reaches one workspace. It works until it expires, you revoke it, or its maker loses the access it needs.

## Make the token

*Cloud and Self-hosted only:*

1. In GoRunner, open **MCP** in the sidebar. With no app connected yet, the page lists the apps. Otherwise press **Connect an AI app** at the top.
2. Choose your app, then press **Use an API token instead**.
3. Check the **Name**. Under **It may**, choose **Read only**, **Draft and run** or **Draft, run and publish**. **Draft and run** is chosen for you.
4. Under **Expires**, choose **30 days**, **90 days**, **1 year** or **Never**. **90 days** is chosen for you.
5. Press **Create token**.

*Embed only:*

1. In the product you use, open **MCP**, press **Connect an AI app**, choose your app, then press **Use an API token instead**.
2. Under **It may**, choose what it may do. Under **Expires**, choose **30 days**, **90 days** or **1 year**. An embed token always expires.
3. Press **Create token**. Only an editor can make one. Anyone else pastes the token they were given.

The address is the one the panel shows. It ends in `/mcp/tools`, or `/mcp/build` when the product lets apps build.

*Cloud and Self-hosted only:*

![The Use an API token view for Claude Code: Name, It may and Expires, with Create token ringed.](https://docs.gorunner.io/img/ai-apps/ai-token-light.jpg)

You should see the token inside the command, setting or header your app needs. It isn’t shown again, so copy it now.

## Add it to your app

Press **Copy** and paste it where the panel says.

*Cloud and Self-hosted only:*

For Claude Code, it is a command with the token inside:

```terminal
claude mcp add --transport http gorunner https://api.gorunner.io/mcp/build/w/YOUR_WORKSPACE_ID --header "Authorization: Bearer YOUR_TOKEN"
```

The address ends in your workspace’s ID, because a token reaches one workspace.

Each app takes the token in its own place:

- **[Cursor](https://docs.gorunner.io/mcp/cursor)**: A setting in `~/.cursor/mcp.json`
- **[VS Code](https://docs.gorunner.io/mcp/vscode)**: A setting in `.vscode/mcp.json`
- **[Devin Desktop](https://docs.gorunner.io/mcp/devin)**: A setting in `~/.config/devin/mcp_config.json`
- **[Zed](https://docs.gorunner.io/mcp/zed)**: A setting in `settings.json → context_servers`
- **[Claude Code](https://docs.gorunner.io/mcp/claude-code)**: A command to run
- **[Codex](https://docs.gorunner.io/mcp/codex)**: A setting in `~/.codex/config.toml`
- **[Gemini CLI](https://docs.gorunner.io/mcp/gemini-cli)**: A command to run
- **[Goose](https://docs.gorunner.io/mcp/goose)**: A header to add
- **[LM Studio](https://docs.gorunner.io/mcp/lm-studio)**: A setting in `mcp.json (Program → Install → Edit mcp.json)`
- **[Another app](https://docs.gorunner.io/mcp/another-app)**: A header to add

*Cloud and Self-hosted only:*

**What if I can’t make a token?**

Only a workspace admin can create a token. Ask one for a token. Then, in the same view, paste it under **Paste the token you were given**. The command fills itself in. Until you paste one, it says YOUR_TOKEN.

## Revoke it

*Cloud and Self-hosted only:*

Apps that use an API token don’t appear under **Connected apps** on the MCP page. Tokens are in **Settings › Workspace › API tokens**, where a workspace admin can revoke one. See [Make an API token](https://docs.gorunner.io/build/api-tokens).

*Embed only:*

Revoke it under **Tokens** on the same **MCP** page.

## For developers

An API token starts with `grt_` and goes in the `Authorization: Bearer` header. *Cloud and Self-hosted only:* Its address is `https://api.gorunner.io/mcp/build/w/<workspace ID>`.

An app that signs in gets `gra_` and `grr_` tokens instead. You never handle those. See [Sign-in for developers](https://docs.gorunner.io/mcp/oauth).

## Related

- [Make an API token](https://docs.gorunner.io/build/api-tokens): Settings › Workspace › API tokens · 3 min
- [Choose what an AI app may do](https://docs.gorunner.io/mcp/permissions): What each choice allows · 3 min
- [Build tools](https://docs.gorunner.io/mcp/build-tools): What an app can do on the build server

Source: https://docs.gorunner.io/mcp/api-token
