Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

On this pageOverview

Opik's MCP server

Your coding assistant already writes the code. Connect it to Opik and it can also see what that code does when it runs: read the traces, find the ones that failed, score them, and fix the code against real data instead of your description of it.

One command connects your assistant to your traces and teaches it how to create them in the first place. It needs uv and no Opik SDK:

  1. Install uv, if you don't have it

    macOS / Linux
    curl -LsSf https://astral.sh/uv/install.sh | sh
    Windows
    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

    Open a new terminal afterwards so uvx is on your PATH.

  2. Run the setup command

    Bash
    uvx opik mcp configure

    It detects your AI client (Claude Code, Cursor, VS Code Copilot, Codex, opencode), picks the right server for your Opik deployment, configures it, installs the Opik skill pack, and checks that what it just wrote works.

  3. Start a new session

    Assistants read their configuration at startup, so start a new session before trying anything. On Opik Cloud, complete the browser sign-in when your client prompts for it, then ask your assistant to confirm the connection:

    Check it worked
    List my Opik projects.

Cursor and VS Code can also be set up in one click, and any other coding agent with a prompt you paste into it:

Cursor VS Code Install prompt

Writing the config yourself, or the CLI didn't detect your client? Advanced setup has the exact block for each one.

Instrument this project

It adds tracing in the right places for your framework, runs the app, and reads the trace back to prove it arrived.

Why did this trace fail?

It reads the whole span tree, the errors and the feedback scores directly, instead of you pasting screenshots into chat.

What's breaking in production?

It queries your failing, slowest and most expensive traces over any time window, and tells you what they have in common.

Build a test suite from real traces

It filters your traces, turns the interesting ones into suite items, and runs an experiment over them.

Use cases has the prompts to paste for each of these.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu