# Install Openline (instructions for AI agents)

Openline gives an AI agent a phone number, an email inbox and WhatsApp. It is a remote MCP server:

- URL: `https://openline.run/mcp`
- Transport: streamable HTTP
- Auth: OAuth 2.1 (PKCE). The agent opens Openline's sign-in page in the user's browser. There is no API key.

## Rules

- Never ask the user for a sign-in code, password or token in chat. The user types the 6-digit email code only on Openline's page.
- Add the server once, at user scope, named `openline`. If an `openline` server already exists, do not add another.
- Ask the user before running commands that change their agent configuration.

## Recommended: one command (Claude Code, Codex, Cursor, VS Code)

If you can run terminal commands, use the Openline installer. It opens Openline's sign-in page in the user's browser and, after the user signs in, saves Openline into the config of each agent it finds. The user does not need to click Install, Connect or run `/mcp`.

Your tool call may time out before the user finishes signing in, so start and wait in two steps:

```bash
npx -y openline-mcp install --no-wait
```

It prints a sign-in link and tries to open the browser. **Show the user the link**, and tell them to finish sign-in there. Then run, allowing up to 10 minutes:

```bash
npx -y openline-mcp wait
```

When it prints `Openline connected to …`, tell the user to start a new session of their agent. Add `--agent claude-code` (or `cursor`, `vscode`, `codex`) to `install` to configure only that agent. The installer never prints the saved key.

To remove Openline: `npx -y openline-mcp uninstall`. To check: `npx -y openline-mcp status`.

If `npx` is not available (no Node.js 18+), use the per-agent steps below.

## Steps by agent (without the installer)

### Claude Code

```bash
claude mcp add --transport http --scope user openline https://openline.run/mcp
```

Then tell the user: "Start a new Claude Code session, run `/mcp`, pick **openline** and choose **Authenticate**. Finish sign-in in the browser."

### Codex

```bash
codex mcp add openline --url https://openline.run/mcp
codex mcp login openline
```

`codex mcp login` opens the sign-in page. Tell the user to finish it in the browser, then start a new Codex session.

### Cursor

Add this to `~/.cursor/mcp.json` (merge with existing `mcpServers`; do not remove other servers):

```json
{ "mcpServers": { "openline": { "url": "https://openline.run/mcp" } } }
```

Or give the user this one-click link:
`cursor://anysphere.cursor-deeplink/mcp/install?name=openline&config=eyJ1cmwiOiJodHRwczovL29wZW5saW5lLnJ1bi9tY3AifQ%3D%3D`

Then tell the user: "Open Cursor Settings → MCP and click **Connect** next to openline to sign in."

### VS Code

Run in a terminal:

```bash
code --add-mcp '{"name":"openline","type":"http","url":"https://openline.run/mcp"}'
```

VS Code opens sign-in the first time the agent uses Openline.

### Claude (web, desktop, mobile)

These apps cannot be configured from a terminal. Tell the user: "In Claude, open Settings → Connectors → **Add custom connector**, paste `https://openline.run/mcp`, and click **Connect**."

### Any other MCP client

Add a remote MCP server named `openline` with URL `https://openline.run/mcp` (streamable HTTP, OAuth). The client must support MCP OAuth with dynamic client registration or client ID metadata documents.

## After sign-in

New MCP servers usually load in a new session or after a reload. Then call the `connect` tool to confirm the session, and tell the user their Openline phone number and inbox address. Usage guide for agents: https://openline.run/skill
