---
title: Connect an agent
description: Connect ChatGPT, Codex or another agent to openlaunch through OAuth or a bridge SDK token, grant device functions and follow their action results.
---

openlaunch supports MCP clients and direct SDK clients. ChatGPT and Codex can link through OAuth; any agent or app can use an owner-issued bridge SDK token. Both paths use the same per-device function grants. Linking an agent does not enroll a device or authorize every device in the workspace.

## ChatGPT and Codex

Use the device MCP endpoint `https://www.openlaunch.dev/mcp` and approve the connection through Clerk. Choose ChatGPT or Codex under **Devices → Access**, select its functions, and select **Save grant**. The downloadable [openlaunch plugin](/downloads/openlaunch-plugin.zip) includes this endpoint and the separate documentation MCP.

For Codex CLI:

```sh
codex mcp add openlaunch --url https://www.openlaunch.dev/mcp --oauth-resource https://www.openlaunch.dev/mcp --oauth-client-registration cimd
codex mcp login openlaunch --scopes openid,openlaunch:read,openlaunch:act --oauth-client-registration cimd
```

OAuth consent and device grants are separate. Reconnect your MCP client after granting newly published custom functions so it refreshes tool discovery.

## Any agent with the bridge SDK

In **Agents**, create a named bridge SDK token, set its expiry, and copy it when shown. The secret is shown once. Provide the bridge URL and token to your agent as environment secrets. Revoke it in Agents to end that connection. Never put the token in a prompt, source file, shell command, or log.

Install `@openlaunch/sdk` in the agent's runtime and use `createClient({ url, token })`. The client can list devices visible to that connection, request a granted function, and inspect or cancel its action. Use `broadcast()` for the same function on several devices. The owner grants functions separately for each device and can choose an expiry. Without a grant, a valid token cannot see or operate that device.

```sh
npm install https://www.openlaunch.dev/downloads/openlaunch-sdk.tgz
```

See the [Bridge SDK guide](/docs/sdk) for a minimal code example, action lifecycle, and adapter interface.

## Codex on your computer

For the local MCP bridge, start with [Get started](/docs/setup). The launcher prints a command tailored to your installation. For the default installation:

```sh
codex mcp add openlaunch -- node ~/.local/share/openlaunch/scripts/local-mcp.mjs
```

The adapter reads only its protected agent credential. It never forwards your owner session key. Restart Codex or refresh its MCP connections, then ask it to list its granted openlaunch devices. In Connections, grant this connection only the functions it needs on each device.

## MCP connections

Hosted MCP clients use the openlaunch MCP service with OAuth or an owner-issued connection token sent as an HTTP bearer credential. Use the exact MCP URL and client setup shown by your deployed console. Do not substitute the documentation MCP address or give an owner session key to an agent. A connection token cannot expand its own grants.

Each connection token belongs to one named agent connection. It has an expiry and can be revoked independently. Grant expiry, token expiry and device enrollment are separate controls; see [Pairing and permissions](/docs/pairing).

## Device tools

Custom functions published by an adapter appear after the owner grants them to a connection. Their tools include the device name and function schema. Standard functions available on the maintained hardware integrations are:

| Tool                    | Purpose                                             |
| ----------------------- | --------------------------------------------------- |
| `list_devices`          | List devices visible to this connection             |
| `request_device_health` | Ask a device for a fresh health result              |
| `set_led`               | Set the Uno's built-in LED                          |
| `show_text`             | Display up to 96 ASCII characters on the Uno matrix |
| `get_action`            | Read the actual action outcome                      |
| `cancel_action`         | Cancel an action that has not been delivered        |

An action ID is a receipt number, not proof that the board acted. Ask the agent to check `get_action` until it reaches a terminal result.

The maintained hardware integrations currently cover Uno R4 WiFi and Raspberry Pi. An agent can use any device family that has an openlaunch adapter and manifest; the bridge does not require a built-in profile for a custom kind. Start with the [custom function guide](/docs/functions) to publish bounded functions for another board or setup.

## Documentation for agents

The website has a separate, read-only MCP endpoint at `/docs-mcp`, built with Blume. It supports searching docs, reading pages, listing pages, and inspecting navigation. It needs no device credentials and cannot operate boards.

Each page is also available as Markdown: append `.md` to its URL. The website publishes `/llms.txt`, `/llms-full.txt`, `/skill.md` and `/.well-known/mcp.json` for discovery. The docs menu offers PDF and EPUB export; **Listen to this page** uses your browser's voices.
