---
title: "OpenCode"
description: "Add mixetape to OpenCode, the open-source terminal coding agent."
---

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

# OpenCode

1. **Create an API key**

   Create a key under **API keys** at [mixetape.com](https://mixetape.com/api-keys) with the permissions the agent needs — see [API keys and permissions](/concepts/api-keys). Copy it; it is shown once.
2. **Add the server**

   In `opencode.json` (the project) or `~/.config/opencode/opencode.json` (every project):

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "mixetape": {
      "type": "remote",
      "url": "https://mixetape.com/mcp",
      "headers": { "Authorization": "Bearer {env:MIXETAPE_API_KEY}" },
      "enabled": true
    }
  }
}
```

   and set the key in that variable:

```sh
export MIXETAPE_API_KEY="mxt_…"
```
3. **Try it**

   Ask the agent to "list my mixetape channels". It calls `list_accounts` and answers with your connected channels. To add one from the agent, see [Connecting channels](/connect-an-agent/mcp#connecting-channels).

Source: https://docs.mixetape.com/connect-an-agent/opencode/index.mdx
