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

# OpenCode

> Add Glasser to OpenCode and connect your account.

Use a remote MCP connection to make Glasser available to OpenCode. For the Skill and CLI
workflow, use the [OpenCode Skill guide](/docs/setup-skill/opencode).

**1. Add the server configuration**

Open or create `~/.config/opencode/opencode.json` to make Glasser available across your local projects.
Add `glasser` under `mcp`, keeping any existing servers:

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

To limit it to one project, use `opencode.json` in the project root instead.

**2. Sign in**

Run this in a terminal:

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

In the browser, sign in to Glasser, choose your Workspace, and select **Allow**.
Create an account and Workspace if needed. Then run `opencode mcp list` and check that
`glasser` is connected.

**3. Check the connection**

In a new session, ask:

```text wrap theme={null}
Use Glasser to check my available balance. Do not make any paid Runs.
```

The agent should use Glasser's `balance` tool and return your balance. This check is free;
a zero balance still means the connection works. If you need funds for a paid Run, add
them in the [Glasser console](https://app.glasser.ai).

## Try your first request

```text wrap theme={null}
Use Glasser to find recent news about Stripe. Show me the data you can retrieve and the price, then wait for my approval before any paid Run.
```

After you approve, the agent can retrieve the data and report the result and charge.

See the [OpenCode MCP documentation](https://opencode.ai/docs/mcp-servers/) for configuration
options and authentication help.


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