Docs

Documentation versions (currently viewingVaadin 25)
Documentation translations (currently viewingEnglish)

OpenCode

Learn how to configure OpenCode to access Vaadin documentation through the Model Context Protocol server

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.

Configuration

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

Source code
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.

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