Skip to main content
Connect OpenCode to the Operata MCP Server so you can ask Operata-data questions from OpenCode’s chat. OAuth is the recommended way to connect. Use an API key only for automated, non-interactive integrations. For the difference, roles, and prerequisites, see the MCP overview.

Before you start

  • An Operata account. For OAuth, a user with the Admin or User role; for an API key, an Operata API key. See Before you start.
  • OpenCode, installed and signed in.

Open OpenCode’s MCP configuration

OpenCode reads MCP servers from its configuration file (opencode.json or your client’s MCP configuration). Add the server to the mcpServers object.

Add the Operata MCP server

Connect over OAuth

opencode.json

Connect with an API key

Use the API key endpoint for automated integrations. The key can only reach the single group it was created in.
opencode.json
Replace <your-operata-api-key> with your key.

Reload OpenCode

Restart OpenCode. On an OAuth connection, a browser window opens on first use to sign in to Operata and authorize the session.

Select a group

On an OAuth session, pick the group you want to query: run list_groups, then switch_group. An API-key session is already fixed to its own group. See Groups and regions.

Ask OpenCode a question that uses Operata data

In OpenCode’s chat, ask a question that needs Operata data:
Run a query against Operata for the average MOS across all contacts yesterday.
OpenCode calls the right Operata tool — traces_query for an aggregate like this — and renders the result.

Result

OpenCode lists operata as a connected MCP server with the full Operata tool surface. A chat question that needs Operata data invokes a tool and returns a real value from your account. A 401 in the tool-call trace means the credential is wrong or expired; a 403 means a group problem. See Troubleshooting.