opik-mcp

opik-mcp

MCP.Pizza Chef: comet-ml

Opik is Comet's tool for recording what an AI product actually said to people, and this official add-on hands an assistant six ways into that record: look one thing up, browse a list, write a score or a comment, save a new prompt version, put a question to Opik's built-in helper Ollie, and start an evaluation run. The last two work only on Comet's hosted service. It is aimed at teams already running Opik, and you supply a Comet key.

Coding
Data

Use This MCP server To

Find out why one of my experiments got worse Look up a recorded conversation by its number Score an answer and leave a note explaining why Save a new version of a prompt I just improved List the experiments my team ran this week Ask why three test cases failed overnight

README

Opik MCP Server

The official Model Context Protocol (MCP) server for Opik, the open-source LLM observability and evaluation platform, built by Comet. Plug your AI host (Claude Code, Cursor, VS Code Copilot, MCP Inspector) directly into your Opik workspace: read traces, log scores, save prompt versions, and ask Ollie, Opik's in-product AI assistant, investigative questions, all from the chat.

Built for LLM engineers who already run Opik and want to drive it from the same AI assistant they code with.

Migrating from the old npx opik-mcp? The TypeScript server is deprecated and sunsets on 2026-11-15. Swap npx -y opik-mcp for uvx opik-mcp@latest in your MCP client config. Full guide: legacy/typescript/MIGRATION.md.

You:    "Why did the experiment 'gpt-4o-rerank-v3' regress on factuality?"
Claude: → ask_ollie → reads experiment + traces → "Three traces failed because…"

You:    "Score trace 7f2e… 0.9 on helpfulness with reason 'great recovery'."
Claude: → write(score.create) → done

Install

opik-mcp is a Python package (requires Python 3.13+). The recommended way to run it is uvx, which fetches and runs the latest published version on demand — no global install, no virtualenv juggling.

Install uv once:

curl -LsSf https://astral.sh/uv/install.sh | sh   # macOS / Linux
# or: brew install uv

You'll need two things from your Opik workspace:

  • OPIK_API_KEY — get it from comet.com/api/my/settings/.
  • OPIK_WORKSPACE — your workspace name (lowercase, as it appears in the URL). E.g. https://www.comet.com/acme-ai/... → OPIK_WORKSPACE=acme-ai. Optional — defaults to default (the Opik SDK convention), which is correct for local/OSS installs; cloud users with a named workspace should set it. COMET_WORKSPACE is accepted as a deprecated alias.

Pre-release note: opik-mcp (Python) is not yet published to PyPI. Until the first PyPI release lands, replace uvx opik-mcp in any snippet below with: uvx --from git+https://github.com/comet-ml/opik-mcp.git opik-mcp

OPIK_WORKSPACE is optional. Omit the OPIK_WORKSPACE line/key in any snippet below and the server uses the default workspace (correct for local/OSS installs). Set it only if you connect to a named cloud workspace.

Claude Code

Add the server with one command:

claude mcp add --transport stdio opik-mcp \
  --env OPIK_API_KEY=<your-key> \
  --env OPIK_WORKSPACE=<your-workspace> \
  -- uvx opik-mcp

Or edit ~/.claude.json directly:

opik-mcp FAQ

Do I need an account and a key?
Yes. You need an Opik workspace plus a key from your Comet settings page, which you paste into your app's configuration.
Is this any use if I don't already run Opik?
Not really. Everything it does happens inside an existing Opik workspace, so there is nothing to look at until your AI product is recording there.
Can I use this to ask why an experiment got worse?
Yes. The Ollie tool reads the experiment and the conversations behind it and explains what went wrong, but it only works on Comet's hosted service, not a self-hosted install.
Which apps does it work in?
Claude Code, Cursor, and VS Code Copilot all have written instructions, and there is a testing setup for the MCP Inspector.
Is there anything that does not work well?
On Cursor, long Ollie questions hit a hard one-minute cutoff and fail. The older version run through npx is also being retired in November 2026.
How hard is the setup?
You install the uv runner once with a single command, then paste a short block with your key. It needs a recent Python on the machine.
Can it change my recorded data?
Yes. It writes scores, comments, new recorded conversations, prompt versions, and test suites, so it is not a read-only viewer.