# Connections

Connect Claude Code, Codex, Cursor or OpenCode to Silan with one click, make API keys for your own programs, and copy the setup text for any other MCP client.

The **Connections** page is where an AI app on this Mac gets its hands on your devices. One click writes Silan into the app's MCP settings. The first time the app calls a tool, Silan asks you once whether to allow it. A fold at the bottom, **For developers**, holds API keys and the addresses and setup text for anything that is not on the list.

## What it does

The page opens with a card, **Connect an AI app in 3 steps**, and a row per app with its state.

| App | State in the current release |
| --- | --- |
| Claude Code | Supported. Connect writes `~/.claude.json`. |
| Codex | Supported. Connect writes `~/.codex/config.toml`. |
| Cursor | Supported. Connect writes `~/.cursor/mcp.json`. |
| OpenCode | Supported. Connect writes `~/.config/opencode/opencode.json`. |
| Claude app | In testing. |

Each row reads **Not installed**, **Installed · not connected** with **Connect**, or **Connected · not tested yet** with **Test**. Connect writes the absolute path of `silan mcp` and no key, since a program on this Mac is known by its signature. A coding app is asked **Do you test your own app with <app>?** and the answer picks the tool set: **Just my devices** gives the core profile of 16 tools, **Test my app** gives the testing profile of 27. A window then shows three steps: pick the app, start it again, and type **Use Silan to list my devices**.

The first tool call from a connected app shows **Allow**, **Allow this time** and **Don't allow**. A refusal holds for 10 minutes. A program with no signature gets only **Allow this time**. If the app waits more than 45 seconds for your answer it is told why.

**Manage** on a connected row shows which phones the app may use, whether it may run flows and install builds, the safety switch read-only, its last two Activity rows and **Disconnect**, which removes the config it wrote.

**For developers** holds:

- **API keys.** **New key** asks for a name of up to 80 characters, every phone or some, and an expiry of 30 days, 90 days, 1 year or never. The key is shown once, with **Copy**, and only **Done** closes the sheet. **Revoke** ends it at once: the next REST, MCP or WebDriver call gets `401` and open streams end. The Mac's own local key is not listed and cannot be revoked.
- The MCP and WebDriver addresses on this Mac.
- **The setup text for other apps**, with **Copy**, for any MCP client that is not on the list.
- A line that says the Python library and remote access come later.

## Step by step

1. Open **Connections**. Find your app's row. If it reads **Not installed**, install the app first.
2. Click **Connect**. Answer **Do you test your own app with <app>?**.
3. Quit the app and open it again, then type **Use Silan to list my devices**.
4. When Silan asks, click **Allow**. The row now reads **Connected**.
5. For your own program, open **For developers** and click **New key**. Copy the key before you click **Done**.

The same setup by hand, the `claude mcp add` line, the key in `SILAN_API_KEY` and the Codex plugin are on [use Silan from your agent](/agents/).

## Limits

- The Claude app row, the notice banner for a connected app's first call, and a connected app acting on a phone from this page were proved by unit tests and offscreen pictures. Not yet proved on a real device.
- Connections are for apps on this Mac. Remote access and the Python library are coming soon.
- A revoked key cannot be brought back. Make a new one.

## Proof

:::note[Proof]
Proved on this Mac with no phone by a Silan worker: a new key of 52 characters answered `200` then `401` after Revoke, and an open stream ended 5 ms later, 14 Oct 2026, run `20261014-190535-89037`. Real Claude Code and real Codex connected by one click, the signed-by words on the first call, an unsigned Python program offered only Allow this time, and a refusal answered the client with `-32001`, 15 Oct 2026, runs `20261015-054025-90938` and `20261015-055213-59818`. Cursor by one click, the setup text pasted as given, and a key in `SILAN_API_KEY` that survived a restart, 24 Oct 2026, run `20261024-042236-97156`. Real OpenCode and Cursor with 27 and 16 tools, 31 Oct 2026, run `20261031-140512-62730`. Source: verify-silan feature map, connections.
:::

<figure class="shot"><img src="/media/connections.webp" alt="The Connections page: connect an AI app in three steps, and the For developers fold." width="1440" height="900" loading="lazy" /><figcaption>The Connections page: connect an AI app in three steps, and the For developers fold.</figcaption></figure>

<figure class="shot"><img src="/media/connections-connect-an-app.webp" alt="Connect an app, step 1 of 3: pick the AI app you use." width="1440" height="900" loading="lazy" /><figcaption>Connect an app, step 1 of 3: pick the AI app you use.</figcaption></figure>
<figure class="shot"><img src="/media/connections-for-developers.webp" alt="For developers: keys for scripts and test servers, and the addresses each needs a key for." width="1440" height="670" loading="lazy" /><figcaption>For developers: keys for scripts and test servers, and the addresses each needs a key for.</figcaption></figure>