> Documentation index: https://mydrops.io/llms.txt
> Every docs page is also available as Markdown by adding .md to its URL.

# OpenCode (https://mydrops.io/docs/agents/opencode)

Add MyDrops to OpenCode with one command, sign in, and let it search your saved drops and save new ones.

## Connect

### Add the server

```bash title="Terminal"
opencode mcp add mydrops --url https://mydrops.io/mcp --global
```

### Sign in

```bash title="Terminal"
opencode mcp auth mydrops
```

Your browser opens MyDrops. Choose **read** or **read and add**, and allow it. Inside OpenCode, `/mcps` does the same.

### Check it

```bash title="Terminal"
opencode mcp list
```

`mydrops` shows `connected`.

## Try it

```text title="Prompt"
What API design articles did I save in MyDrops? Group them by topic.
```

```text title="Prompt"
Save these benchmark results to MyDrops as a note in the Performance project.
```

## Use an API key instead

[Make a key](/docs/api/keys.md) and add the server to your OpenCode config with the key read from your environment:

```json title="opencode.json"
{
  "mcp": {
    "servers": {
      "mydrops": {
        "type": "remote",
        "url": "https://mydrops.io/mcp",
        "headers": { "Authorization": "Bearer {env:MYDROPS_API_KEY}" }
      }
    }
  }
}
```

## Add the skills

```bash title="Terminal"
npx skills add mydrops-io/skills
```

## Disconnect

Run `opencode mcp logout mydrops` and delete the entry, or disconnect it in **Settings › Agents** in MyDrops.

## Troubleshooting

**opencode mcp list shows it as failed**

Run `opencode mcp auth mydrops` again. If you use a key, check that `MYDROPS_API_KEY` is set in the shell that starts OpenCode.
