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

# OpenCode

> Connect OpenCode to Dreamtune MCP and install scoped workflow skills.

<img src="https://mintcdn.com/dreamtune/alDlJCy5wJhi5BBd/images/agents/opencode.svg?fit=max&auto=format&n=alDlJCy5wJhi5BBd&q=85&s=18e515fd84f14b332b5364a271d8e669" alt="OpenCode official logo" width="48" height="48" data-path="images/agents/opencode.svg" />

## Before you connect

Create a Dreamtune workspace API key with only the permissions you need.
Hosted HTTP setup needs no Dreamtune package installation. Local stdio setup
requires Node.js 22.20 or later and the published CLI.

## Configure

Merge this server entry into opencode.json. Preserve any other servers or settings.

```json theme={null}
{
  "mcp": {
    "dreamtune": {
      "type": "remote",
      "url": "https://mcp.dreamtunelabs.com/mcp",
      "oauth": false,
      "headers": {
        "X-Dreamtune-API-Key": "{env:DREAMTUNE_API_KEY}"
      }
    }
  }
}
```

Set DREAMTUNE\_API\_KEY in OpenCode's process environment. oauth false selects direct header authentication; Dreamtune execution MCP does not require an OAuth browser login. The outer property is mcp.

## Verify the connection

Restart the client after changing settings or its environment. Open its MCP
server/tool status view and check that Dreamtune tools are listed. Ask it:

> Use Dreamtune to read model request limits. Do not execute a model, tool or GPU.

Confirm model\_limits returns limits before authorizing paid work. Then inspect a
catalog schema and use one explicitly approved operation. Keep client approval
controls enabled. Never put the key in a chat message, URL or repository.

## Add workflow instructions

Install the [Dreamtune skills](/connect/skills-install) into the skills directory
supported by your client, or copy the platform skill into a user instruction
workflow. A skill guides the agent; MCP provides execution. Neither grants extra
key permissions. See [troubleshooting](/errors) for 401, missing scopes, timeouts
and key/environment problems.

Configuration verified against [the official client documentation](https://opencode.ai/docs/mcp-servers/).


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