> Markdown version of [OpenCode](https://vaadin.com/docs/latest/building-apps/agentic-development/mcp/supported-tools/opencode). Section index: [llms.txt](https://vaadin.com/docs/latest/building-apps/llms.txt)

# OpenCode

OpenCode is an open source AI coding agent for the terminal. It supports remote MCP servers over HTTP, so it connects to the Vaadin MCP server directly.

## <a id="configuration"></a>Configuration

Add the following to `opencode.json` in your project root:

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "vaadin": {
      "type": "remote",
      "url": "https://mcp.vaadin.com/docs",
      "enabled": true
    }
  }
}
```

Create the file if it doesn’t exist. If it already has an `mcp` entry, add `vaadin` to it. Restart OpenCode afterwards.

## <a id="verify-the-setup"></a>Verify the Setup

After restarting OpenCode:

1. Start a new session in your project

2. Ask a question about Vaadin development (e.g., "How to create a Grid in Vaadin?")

3. OpenCode queries the Vaadin MCP server for relevant documentation

## <a id="resources"></a>Resources

- [OpenCode MCP Documentation](https://opencode.ai/docs/mcp-servers/)
