Operata MCP Server
Connect your AI assistant directly to Operata's traces, insights, and knowledge base using the Model Context Protocol.
Preview ReleaseThis is a Preview Release of the Operata MCP Server. Features and configuration options may change as we refine the implementation based on updates to the specification and customer feedback.
Overview
The Operata MCP Server enables you to query traces, run analytics, and retrieve knowledge from Operata directly within your AI workflow using the Model Context Protocol (MCP). This integration allows AI assistants like Claude, ChatGPT, and developer tools to access your CX observability data with structured, programmatic precision.
What is Model Context Protocol?
Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect to external data sources and tools. Think of MCP like a USB-C port for AI applications - it provides a standardized way for AI models to access the context they need to provide more accurate and relevant responses.
Key Benefits
- Structured data access: Query trace data with precise filters, aggregations, and time ranges
- Full trace retrieval: Fetch complete OpenTelemetry traces with all spans, logs, and insights
- Cross-service analytics: Run scalar, series, table, rate, and facet queries across all service views
- Knowledge integration: Access Operata's knowledge base without leaving your workflow
- Flexible authentication: Sign in with your Operata user credentials over OAuth (recommended), or use a long-lived API key for machine-to-machine integrations
- Group-aware: Discover and switch between the groups your account can access, with every query scoped to the active group
- Multi-client support: Works with Claude Desktop, Claude Code, ChatGPT, OpenCode, Cursor, and any MCP-compatible client
- Schema-driven: Self-describing schema tool ensures correct query construction
Available Tools
The Operata MCP Server provides nine tools for accessing your data:
get_schema
Returns the complete data schema including available services, column paths, query types, aggregate functions, and filter operators. Call this tool first to understand what data is available and how to construct queries.
Use cases:
- Discover available column paths for each service
- Understand which aggregate functions are supported
- Learn the correct filter syntax before querying
Parameters:
query_reason(string, optional): Why the schema is being requested
Example:
{
"name": "get_schema",
"arguments": {
"query_reason": "understanding available fields for agent_interaction"
}
}knowledge
Retrieve information from the Operata knowledge base. This tool is useful for understanding Operata features, troubleshooting, and getting contextual help about CX observability concepts.
Use cases:
- "What is MOS score and how is it calculated?"
- "How does Operata integrate with Amazon Connect?"
- "How to troubleshoot poor audio quality"
Parameters:
query(string, required): Your question about Operata features or concepts
Example:
{
"name": "knowledge",
"arguments": {
"query": "What is MOS score and how is it calculated"
}
}list_groups
List the groups your authenticated account can access. When signed in over OAuth, this returns every group your Operata user is scoped to; when using an API key, it returns only the single group the key belongs to.
Use cases:
- Discover which groups you can query
- Find the
groupIdto pass toswitch_groupor to individual tools - Confirm the region a group is hosted in
Parameters:
- None
Example:
{
"name": "list_groups",
"arguments": {}
}Each result includes groupId, groupName, and region.
switch_group
Set the active group for the current session. All subsequent tool calls use this group unless you override it with an explicit groupId parameter on the call.
Use cases:
- Select a group before running queries (OAuth sessions)
- Move between groups without re-authenticating
Parameters:
groupId(string, required): The group ID to switch to. Must be a group your account can access.
Example:
{
"name": "switch_group",
"arguments": {
"groupId": "5bbbd17a-fd70-45ad-a048-c4674035f406"
}
}Note
API keys are restricted to their own group. Calling
switch_groupwith any other group on an API-key session returns403 "API key access is restricted to its own group". Use the OAuth endpoint to work across multiple groups.
traces_list
List and search traces with filtering, sorting, and cursor-based pagination. Returns trace summaries with metadata like duration, span count, and status.
Use cases:
- Browse recent traces sorted by time
- Filter traces by span name (e.g.,
cx.interaction.agent,cx.ai.conversation) - Find long-running calls or error traces
- Paginate through large result sets
Parameters:
startTime(string, required): ISO 8601 UTC start timeendTime(string, required): ISO 8601 UTC end timefilters(array, optional): Filter objects withpathand operator (eq, gt, lt, etc.)sort(string, optional):"asc"or"desc"(default: desc)limit(integer, optional): Results per page, 1-1000 (default: 100)cursor(object, optional): Pagination cursor from previous responsegroupId(string, optional): Group to query against. Defaults to the active group set viaswitch_group
Example:
{
"name": "traces_list",
"arguments": {
"startTime": "2026-05-01T00:00:00Z",
"endTime": "2026-06-01T00:00:00Z",
"filters": [
{ "path": "SpanName", "eq": "cx.interaction.agent" }
],
"sort": "desc",
"limit": 10
}
}Available filter fields: SpanName, ServiceName, StatusCode, SpanKind, Duration
traces_query
Execute analytical queries against Operata trace data. Supports five query types that can be combined in a single request: scalar, series, table, rate, and facet.
Each query must specify a key (unique identifier) and service (one of: agent_interaction, node_interaction, ai_interaction, journey_interaction).
Query types:
| Type | Purpose | Key Fields |
|---|---|---|
| Scalar | Aggregated values (count, avg, p90, etc.) with optional grouping | aggregates, grouping, filters |
| Series | Time-bucketed aggregations for trends | aggregates, interval (seconds) |
| Table | Raw row data with selected columns | columns, limit, orders |
| Rate | Occurrence rates (e.g., poor MOS rate) | rates with filter definitions |
| Facet | Unique values for a field with counts | path, limit |
Parameters:
startTime(string, required): ISO 8601 UTC start timeendTime(string, required): ISO 8601 UTC end timequeries(object, required): Object containing arrays for each query typegroupId(string, optional): Group to query against. Defaults to the active group set viaswitch_group
Example (scalar + rate combined):
{
"name": "traces_query",
"arguments": {
"startTime": "2026-05-01T00:00:00Z",
"endTime": "2026-06-01T00:00:00Z",
"queries": {
"scalar": [
{
"key": "agent_overview",
"service": "agent_interaction",
"aggregates": [
{ "name": "count", "fn": "count", "path": "*" },
{ "name": "avg_mos", "fn": "avg", "path": "Attributes.cx.webrtc.audio.mos_score" },
{ "name": "p90_mos", "fn": "p90", "path": "Attributes.cx.webrtc.audio.mos_score" }
]
}
],
"rate": [
{
"key": "quality_rates",
"service": "agent_interaction",
"rates": [
{ "name": "poor_mos", "filters": [{ "path": "Attributes.cx.webrtc.audio.mos_score", "lt": 3.0 }] },
{ "name": "high_jitter", "filters": [{ "path": "Attributes.cx.webrtc.audio.jitter_ms", "gt": 50 }] }
]
}
]
}
}
}Services:
- agent_interaction: One row per agent WebRTC/telephony session. Fields use
Attributes.cx.*paths. Best for call quality, agent performance, WebRTC diagnostics. - node_interaction: One row per IVR/contact-flow node execution. Fields use
Attributes.cx.flow.*. Best for IVR flow analysis and error rates. - ai_interaction: One row per bot conversation, enriched with agent handoff context. Fields use
Attributes.cx.ai.*. Best for AI bot effectiveness and NLU analysis. - journey_interaction: One row per complete customer journey. Fields use
Attributes.*directly. Best for end-to-end CX analysis, transfers, and wait times.
traces_get
Retrieve a single trace by ID in full OpenTelemetry JSON format with all spans and logs.
Use cases:
- Inspect the complete span tree for a specific call
- Review agent, softphone, and WebRTC session details
- Analyze parent-child span relationships
Parameters:
traceId(string, required): The 32-character hex trace identifierincludeInternal(boolean, optional): Include internaloperata.*spans (default: false)groupId(string, optional): Group to query against. Defaults to the active group set viaswitch_group
Example:
{
"name": "traces_get",
"arguments": {
"traceId": "8b1c0813ca3ca75494be82e036177ef1",
"includeInternal": false
}
}traces_span_insights
Get insights (detected issues and anomalies) associated with a specific span within a trace.
Use cases:
- Check if a specific call had quality issues
- Review detected anomalies for an agent session
- Investigate why a call was flagged
Parameters:
traceId(string, required): The 32-character hex trace identifierspanId(string, required): The 16-character hex span identifiergroupId(string, optional): Group to query against. Defaults to the active group set viaswitch_group
Tip
Insights resolve at the
cx.telephonyspan of a trace. If you pass a child span (for example thecx.interaction.agentspan) you may receive404 "span not found"even though the span exists — retrieve the trace withtraces_getand use thecx.telephonyspan ID.
Example:
{
"name": "traces_span_insights",
"arguments": {
"traceId": "8b1c0813ca3ca75494be82e036177ef1",
"spanId": "89faf69ce53bc085"
}
}traces_span_logs
Get paginated logs for a specific span within a trace. Returns softphone logs, CCP events, and other diagnostic log records.
Use cases:
- Review softphone error logs for a problematic call
- Inspect CCP event sequences during a session
- Debug WebRTC connection issues
Parameters:
traceId(string, required): The 32-character hex trace identifierspanId(string, required): The 16-character hex span identifierlimit(integer, optional): Max log records to return, 1-1000 (default: 50)cursor(object, optional): Pagination cursor from previous responsegroupId(string, optional): Group to query against. Defaults to the active group set viaswitch_group
Example:
{
"name": "traces_span_logs",
"arguments": {
"traceId": "8b1c0813ca3ca75494be82e036177ef1",
"spanId": "89faf69ce53bc085",
"limit": 100
}
}Authentication and Endpoints
The Operata MCP Server offers two endpoints. Choose based on who (or what) is connecting:
| OAuth endpoint (recommended) | API endpoint | |
|---|---|---|
| URL | https://mcp.operata.io/mcp | https://api.operata.io/v1/mcp |
| Authenticates as | Your Operata user (short-lived OAuth session) | An API key (long-lived) |
| Best for | People using an AI client | Machine-to-machine integrations |
| Group access | Every group your user is scoped to | The single group the key belongs to |
| SSO | Supported | n/a |
OAuth (recommended)
OAuth signs you in as your Operata user. Your session is short-lived, scoped to your role, and can reach any group your account has access to — switch between them with switch_group. SSO sign-in is supported.
Requirements:
- An Operata user with the Admin or User role. Viewer accounts cannot use the MCP Server.
- RBAC users are not supported.
There is nothing to create ahead of time — the first time your client connects to https://mcp.operata.io/mcp it opens an Operata sign-in in your browser to authorize the session.
API key (machine-to-machine)
API keys are long-lived bearer credentials for automated, non-interactive use. An API key authenticates as an API user with full API privileges and is restricted to the single group it was created in — it cannot list or switch to other groups.
To create an API key:
- Log in to your Operata account
- Navigate to Group Settings > API Management
- Click Create New Key
- Give your key a descriptive name (e.g., "MCP Server - CI pipeline")
- Copy and securely store the key - you won't be able to see it again
Prerequisites
Before setting up the Operata MCP Server, ensure you have:
- An active Operata subscription
- Credentials for your chosen endpoint:
- OAuth — an Operata user account with the Admin or User role, or
- API key — an Operata API key (see API key)
- Claude Desktop, Claude Code, ChatGPT, OpenCode, Cursor, or another MCP-compatible client
Supported AI Clients
The Operata MCP Server currently supports the following AI clients:
| Client | Status | Auth | Configuration Method |
|---|---|---|---|
| Claude Desktop | Supported | OAuth / API key | MCP configuration file |
| Claude Code | Supported | OAuth / API key | CLI (claude mcp add) |
| ChatGPT | Supported | OAuth | Connector settings |
| OpenCode | Supported | OAuth / API key | MCP configuration file |
| Cursor | Supported | OAuth / API key | MCP configuration file |
Configuration
OAuth is the recommended way to connect. Use an API key only for machine-to-machine integrations that run without a human present.
After connecting over OAuth, select the group you want to work in with list_groups followed by switch_group (or pass groupId on individual calls). API-key sessions are already scoped to their single group.
Option A — OAuth (recommended)
Point your client at the OAuth endpoint. No header or stored secret is required — mcp-remote runs the browser sign-in flow on first connect and caches the session.
Claude Desktop / OpenCode / Cursor
-
Locate your client's MCP configuration file:
- Claude Desktop (macOS):
~/Library/Application Support/Claude/claude_desktop_config.json - Claude Desktop (Windows):
%APPDATA%\Claude\claude_desktop_config.json - OpenCode / Cursor:
opencode.jsonor your client's MCP configuration
- Claude Desktop (macOS):
-
Add the Operata MCP Server configuration:
{
"mcpServers": {
"operata": {
"command": "npx",
"args": [
"mcp-remote@latest",
"https://mcp.operata.io/mcp"
]
}
}
}- Restart your client. On first use a browser window opens to sign in to Operata and authorize the session.
Claude Code (CLI)
Add the server with the OAuth endpoint:
claude mcp add --transport http operata https://mcp.operata.io/mcpThen run /mcp inside Claude Code and follow the prompt to authenticate. Use /mcp again at any time to reconnect or re-authenticate.
Option B — API key (machine-to-machine)
Use the API endpoint with a long-lived key. Remember the key can only access the single group it was created in.
Claude Desktop / OpenCode / Cursor
{
"mcpServers": {
"operata": {
"command": "npx",
"args": [
"mcp-remote@latest",
"https://api.operata.io/v1/mcp",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer <your_operata_api_key>"
}
}
}
}Replace <your_operata_api_key> with your actual Operata API key, then restart your client.
Claude Code (CLI)
claude mcp add --transport http operata https://api.operata.io/v1/mcp \
--header "Authorization: Bearer <your_operata_api_key>"Testing the MCP Server
You can verify that the MCP server is working correctly using curl commands before integrating with your AI client.
Note
The curl examples below use the API endpoint with a bearer API key, since it authenticates with a single header. The OAuth endpoint (
https://mcp.operata.io/mcp) uses an interactive browser sign-in that is handled by your MCP client rather than by curl.
Remember to replace<your_operata_api_key>with your actual API key in all examples below.
List Available Tools
Verify the MCP server is responding and see all available tools:
curl -sS -X POST "https://api.operata.io/v1/mcp" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer <your_operata_api_key>" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list",
"params": {}
}'Expected response (abbreviated):
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"tools": [
{ "name": "get_schema", "description": "Get the traces data schema..." },
{ "name": "knowledge", "description": "Retrieve facts from the knowledge base..." },
{ "name": "list_groups", "description": "List groups the authenticated user can access..." },
{ "name": "switch_group", "description": "Set the active group for this session..." },
{ "name": "traces_list", "description": "List and search traces with filtering..." },
{ "name": "traces_query", "description": "Execute analytical queries against traces data..." },
{ "name": "traces_get", "description": "Retrieve a single trace by ID..." },
{ "name": "traces_span_insights", "description": "Get insights for a specific span..." },
{ "name": "traces_span_logs", "description": "Get paginated logs for a specific span..." }
]
}
}Test the Knowledge Tool
Query the Operata knowledge base:
curl -sS -X POST "https://api.operata.io/v1/mcp" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer <your_operata_api_key>" \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "knowledge",
"arguments": {
"query": "What is MOS score and how is it calculated"
}
}
}'Test the Schema Tool
Retrieve the query schema:
curl -sS -X POST "https://api.operata.io/v1/mcp" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer <your_operata_api_key>" \
-d '{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "get_schema",
"arguments": {
"query_reason": "initial schema discovery"
}
}
}'Test the Traces Query Tool
Run a scalar aggregation query:
curl -sS -X POST "https://api.operata.io/v1/mcp" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer <your_operata_api_key>" \
-d '{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "traces_query",
"arguments": {
"startTime": "2026-05-01T00:00:00Z",
"endTime": "2026-06-01T00:00:00Z",
"queries": {
"scalar": [
{
"key": "total_calls",
"service": "agent_interaction",
"aggregates": [
{ "name": "count", "fn": "count", "path": "*" }
]
}
]
}
}
}
}'Using the MCP Server
Once configured, you can interact with the Operata MCP Server through your AI client. The recommended workflow is:
- Select your group with
list_groupsthenswitch_group(OAuth sessions). API-key sessions are already locked to their group, so you can skip this step. - Start with
get_schemato understand available fields and query structure - Use
traces_listto browse and filter traces by time range, span name, or duration - Use
traces_queryfor analytics: counts, averages, trends, rates, and facets - Use
traces_getto drill into specific traces for full span detail - Use
traces_span_insightsandtraces_span_logsfor deep diagnostics on individual spans - Use
knowledgefor documentation and troubleshooting guidance
Example questions for your AI assistant:
- "Show me the average MOS score by queue for the last 7 days"
- "What percentage of calls had poor audio quality (MOS < 3.0) this month?"
- "Get the full trace for trace ID abc123... and summarize what happened"
- "Which agents had the most holds in the past week?"
- "What are the top disconnect reasons for our inbound calls?"
- "Explain how Operata's WebRTC diagnostics work"
Regional Support
The Operata MCP Server uses unified endpoints that serve all regions:
- OAuth endpoint:
https://mcp.operata.io/mcp - API endpoint:
https://api.operata.io/v1/mcp - Supported Regions: All
Individual groups are hosted in a specific region (for example ap-southeast-2 or us-east-2). The region of each group you can access is returned by list_groups.
Connection Details
The Operata MCP Server uses the following technical specifications:
- Protocol: HTTPS
- Transport: Server-Sent Events (SSE) / JSON-RPC
- Authentication: OAuth user session (
mcp.operata.io) or bearer API key via Authorization header (api.operata.io) - API Version: v1 (API endpoint)
Best Practices
Security
- Prefer OAuth for people: OAuth sessions are scoped to the signing-in user's role and groups, so access follows least privilege. API keys authenticate as an API user with full API privileges — reserve them for machine-to-machine integrations.
- Key Management: Store API keys securely using environment variables or secure vaults
- Key Rotation: Regularly rotate your API keys following your organization's security policies
- Group Scoping: Confirm the active group (
switch_group) or per-callgroupIdbefore running queries, so you operate against the intended group
Performance
- Schema First: Always call
get_schemabefore constructing complex queries to ensure correct field paths - Time Range Scoping: Use the narrowest time range that meets your needs to reduce response time
- Batch Queries: Combine multiple query types (scalar, series, rate, facet) in a single
traces_querycall to minimize round-trips - Rate Limiting: The MCP server is subject to standard Operata API rate limits of 100 requests per minute per API key. Implement appropriate retry logic with exponential backoff if building custom integrations
- Pagination: Use cursor-based pagination for
traces_listandtraces_span_logswhen working with large result sets
Query Construction
- Service Selection: Choose the correct service for your analysis level --
agent_interactionfor call quality,journey_interactionfor end-to-end CX,ai_interactionfor bot analysis,node_interactionfor IVR flows - Column Paths: Path conventions differ by service. Use
Attributes.cx.*for agent_interaction,Attributes.*directly for journey_interaction - Boolean Filters: Fields like
had_agent,had_bot,had_queueare stored as strings. Filter with"eq": "true", not booleantrue - SpanName Limitation:
SpanNamecannot be used intraces_queryfilters. Usetraces_listwith a SpanName filter instead
Privacy
- Data Scoping: Ensure you are operating against the intended group — set it with
switch_group(OAuth), or rely on the single group an API key is scoped to - PII Handling: Be mindful of personally identifiable information in queries and responses
- Compliance: Ensure usage aligns with your organization's data privacy policies
Troubleshooting
MCP Server Not Responding
Problem: The MCP server returns connection errors or timeouts.
Solutions:
- Check that the endpoint URL is correct:
https://mcp.operata.io/mcp(OAuth) orhttps://api.operata.io/v1/mcp(API key) - Ensure your network allows HTTPS connections to
mcp.operata.ioand/orapi.operata.io - OAuth: reconnect to refresh an expired session (in Claude Code, run
/mcp) - API key: verify the key is valid, hasn't been revoked, and has appropriate permissions
Tools Not Available in AI Client
Problem: The AI client doesn't show or use Operata tools.
Solutions:
- Restart your AI client after updating the configuration
- Verify the MCP configuration file syntax is correct (valid JSON)
- Check the AI client logs for MCP-related errors
- Ensure
mcp-remoteis installed: runnpx mcp-remote@latest --helpto verify
Authentication Errors
Problem: Receiving 401 Unauthorized or 403 Forbidden errors.
Solutions:
- OAuth: Re-authenticate — sessions are short-lived and expire. Reconnect your client (in Claude Code, run
/mcp) to start a fresh sign-in. - OAuth: Confirm your Operata user has the Admin or User role. Viewer accounts and RBAC users cannot use the MCP Server.
- API key: Regenerate your key and update the configuration; verify it is correctly formatted in the Bearer authorization header and hasn't been revoked.
403 "API key access is restricted to its own group"means an API-key session tried to use a group other than the key's own. Use the OAuth endpoint to work across multiple groups.
Can't See or Switch to a Group
Problem: A group you expect is missing from list_groups, or switch_group is rejected.
Solutions:
- API key: keys only ever see their own group. To reach other groups, connect over the OAuth endpoint.
- OAuth:
list_groupsreturns only the groups your user is scoped to — confirm your account has access to the group in Operata. - Verify your role is Admin or User (not Viewer), and that you are not an RBAC user.
Query Returns Empty Results
Problem: Data queries return null or empty result sets.
Solutions:
- Verify your time range contains data -- try expanding to 30 or 60 days
- Confirm the active group is correct — set it with
switch_groupor passgroupIdon the call (API-key sessions are fixed to their own group) - Use
get_schemato confirm correct column paths for the service you're querying - For
ai_interactionornode_interaction, confirm bots or IVR flow logging are configured in your environment - Use
traces_listwithout filters first to confirm data exists in the time range
Trace or Span Not Found
Problem: traces_get, traces_span_insights, or traces_span_logs returns 404.
Solutions:
- Verify the trace ID is exactly 32 hex characters
- Verify the span ID is exactly 16 hex characters
- Confirm the trace exists by searching with
traces_listortraces_query(table query) first - Ensure the span belongs to the specified trace
Support and Feedback
We value your feedback to help improve the Operata MCP Server. To provide feedback, share your use cases and feature requests with your Customer Support Manager.
Updated 22 days ago
