← Back to directory
O

Opik MCP Server

Official
Connect your AI host directly to your Opik workspace: read traces, log scores, and manage prompts.
GitHub source repository ↗
★ 217 Stars Category · Dev Tools Very popular Source revision dba9b378ab26
67FMRS · C
Reliability
8/20
Security and permissions
14/20
Maintenance
18/20
Documentation
15/20
Setup experience
12/20

Opik MCP Server is the official MCP server for Opik, designed for LLM observability and evaluation. It offers a comprehensive tool set and good client support, but some advanced features are limited, and security configuration requires attention.

Read the FMRS scoring method →

Opik MCP Server is the official Model Context Protocol (MCP) server for Opik, the open-source LLM observability and evaluation platform built by Comet. It enables AI hosts like Claude Code, Cursor, and VS Code Copilot to interact with your Opik workspace, allowing you to read traces, log scores, save prompt versions, and ask Ollie, Opik's in-product AI assistant, investigative questions. The server provides six tools—read, list, write, ask_ollie, schema, and run_experiment—covering the full lifecycle from reading and annotating to curating, authoring, and iterating.

Tools

read
Read Opik entities (project, trace, span, test_suite, experiment, prompt) by id, name, or opik:// URI.
list
List Opik entities with optional name filter and pagination.
ask_ollie
Investigate and synthesize via Opik's in-product AI assistant, able to answer complex queries and execute writes.
write
Universal write operation for logging traces/spans, scoring, commenting, saving prompts, and managing test suites and experiments.
schema
Introspect write-operation schemas, required fields, and examples to construct valid payloads.
run_experiment
Run an evaluation experiment end-to-end via Ollie and write results back to Opik.

Setup

  1. Install uv (curl -LsSf https://astral.sh/uv/install.sh | sh)
  2. Obtain OPIK_API_KEY from your Opik workspace; optionally set OPIK_WORKSPACE (defaults to default)
  3. Add the server to your MCP client config using uvx opik-mcp and set environment variables as shown
  4. Restart the client, verify connection, and start using tools
claude_desktop_config.json
{
  "mcpServers": {
    "opik-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": ["opik-mcp"],
      "env": {
        "OPIK_API_KEY": "<your-key>",
        "OPIK_WORKSPACE": "<your-workspace>"
      }
    }
  }
}

Fit and risk

Best for

  • LLM engineers already using Opik
  • Developers who want to manage LLM observability directly from their coding environment
  • Workflows needing deep integration with the Opik platform

Not for

  • Users not using Opik
  • Those not interested in LLM observability
  • Users needing offline or non-cloud features (ask_ollie and run_experiment are Comet Cloud only)

Required permissions

  • Read access to Opik projects, traces, spans, test suites, experiments, and prompts
  • Write access to traces, spans, scores, comments, prompt versions, and experiments
  • Access to Opik API key (required)

Risks and side effects

  • Requires API key, which poses security risks if exposed
  • ask_ollie and run_experiment are limited to Comet Cloud; not available for self-hosted
  • Cursor enforces a 60-second tool-call timeout; long operations may fail
  • Default YOLO mode auto-approves Ollie's writes, potentially leading to unintended modifications

Troubleshooting

  1. If ask_ollie complains about missing API key, verify the environment variables are in the MCP client's env block
  2. If ask_ollie hangs, it may be a cold-start issue; retry
  3. Self-hosted deployments do not support ask_ollie or run_experiment; use read/list/write instead
  4. Cursor timeouts can be mitigated by shortening queries or using Claude Code

Use cases

Quickly fetch details about projects, traces, and spans
Add scores and comments to traces or spans for evaluation
Save and version prompts
Analyze experiment regressions with Ollie
Run evaluation experiments and inspect results

Supported clients

Claude CodeFull support
CursorPartial support
VS Code CopilotFull support
MCP InspectorPartial support