# OpenCode MCP Setup

The fastest way to use Yavy with OpenCode is the CLI. Search your docs and generate Skills. For real-time access, connect via MCP.

## Quick Start with CLI

Install the CLI, authenticate, and search. No MCP setup required.

```terminal
npm install -g @yavydev/cli && yavy init
```

```terminal
yavy search "your query"
```

[Full CLI documentation](/content/docs/skills/cli/index.html)

## MCP Configuration

Add the Yavy MCP server to your OpenCode configuration:

```opencode.json
{
  "mcp": {
    "yavy": {
      "type": "remote",
      "url": "https://yavy.dev/mcp/your-org/your-project"
    }
  }
}
```

### Setup Steps

1. **Create or open the configuration file:**  
   - Global: `~/.config/opencode/opencode.json`  
   - Project: `opencode.json`
2. **Copy the configuration above and merge it into your `opencode.json` file**
3. **Restart OpenCode for changes to take effect**

## Next Steps

[Learn about Skills packages](/content/docs/skills/index.html) [Getting Started guide](/content/docs/getting-started/index.html)
