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

# OpenCode MCP setup

> Configure Qubrics MCP in OpenCode.

Use this page to connect Qubrics MCP to your AI client.

## Hosted OAuth

Use the hosted endpoint when the client supports remote MCP OAuth:

```text theme={null}
https://mcp.qubrics.com/mcp
```

Add this to `opencode.json`.

```json theme={null}
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "sendmux": {
      "type": "remote",
      "url": "https://mcp.qubrics.com/mcp",
      "enabled": true
    }
  }
}
```

Authenticate when prompted, or run:

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

## Local stdio

> [!WARNING]
>
> Before upgrading an existing installation, keep its working package environment,
> dependency state, and MCP client and tool configuration. Version 2.0.0 removes
> local `file_path` and roots inputs from MCP attachment tools. Before switching
> existing agents, follow the [upgrade and rollback guidance](https://github.com/qubrics/qubrics-sdk/blob/main/packages/python/mcp/README.md#200-upgrade).

Install the local package once:

```bash theme={null}
pip install --upgrade sendmux-mcp
```

Use a mailbox key for Mailbox or Sending:

```bash theme={null}
export QUBRICS_MBX_KEY=smx_mbx_...
```

Use a root key for Management:

```bash theme={null}
export QUBRICS_ROOT_KEY=smx_root_...
```

Add this to `opencode.json`.

```json theme={null}
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "sendmux-mailbox": {
      "type": "local",
      "command": ["sendmux-mcp-mailbox"],
      "environment": {
        "QUBRICS_API_KEY": "smx_mbx_..."
      },
      "enabled": true
    }
  }
}
```

## Private HTTP

Start a local HTTP MCP server:

```bash theme={null}
QUBRICS_API_KEY=smx_mbx_... \
QUBRICS_MCP_HTTP_BEARER_TOKEN=local-mcp-token \
sendmux-mcp-mailbox --transport http --host 127.0.0.1 --port 8765
```

Use `http://127.0.0.1:8765/mcp` as the client URL.

```json theme={null}
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "sendmux-local": {
      "type": "remote",
      "url": "http://127.0.0.1:8765/mcp",
      "oauth": false,
      "headers": {
        "Authorization": "Bearer local-mcp-token"
      },
      "enabled": true
    }
  }
}
```


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