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

# OpenCode

> Add Lusor to OpenCode as a remote MCP server.

OpenCode connects to remote MCP servers and handles the Lusor sign-in itself.

**1. Add the server**

```bash theme={null}
opencode mcp add lusor --global --url https://mcp.lusor.ai/mcp
```

`--global` makes Lusor available in every project. Leave it out to add Lusor to the current project only.

**2. Sign in**

```bash theme={null}
opencode mcp auth lusor
```

OpenCode opens the Lusor sign-in in your browser. Sign in and choose your organization. You can also run `/mcps` inside OpenCode, select `lusor` and sign in there. Over SSH, copy the URL of the page that fails to load after sign-in and paste it into the prompt.

**3. Try it**

`opencode mcp list` shows `lusor` as connected. In a session, ask: *"List my Lusor phones."*

## Configure by hand

```jsonc opencode.jsonc theme={null}
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "servers": {
      "lusor": {
        "type": "remote",
        "url": "https://mcp.lusor.ai/mcp"
      }
    }
  }
}
```

Put it in `~/.config/opencode/opencode.jsonc` for every project, or `opencode.jsonc` in a project. OpenCode V1 configs list servers directly under `mcp`, without `servers`.

## Use an API key instead

```jsonc opencode.jsonc theme={null}
{
  "mcp": {
    "servers": {
      "lusor": {
        "type": "remote",
        "url": "https://mcp.lusor.ai/mcp",
        "oauth": false,
        "headers": {
          "Authorization": "Bearer {env:LUSOR_API_KEY}"
        }
      }
    }
  }
}
```

Use a key from your workspace's **API keys** page in the Lusor app, and keep it in the `LUSOR_API_KEY` environment variable rather than in the file.

See [Connect an AI app](https://docs.lusor.ai/connect.md) for what Lusor allows over MCP.


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