Skip to navigation
Getting StartedMCP Server

Opik's MCP server

View as Markdown

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.

A coding agent installing this for a user: run uvx opik-mcp@latest --help first and follow its steps.

Install in 30 seconds

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

Run the setup command

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

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.

2

Try with your agent

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:

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

What you can do with it

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.

Analyze your experiments

It finds the regressions and low performing cases, debugs the specific traces behind them, and turns that into conclusions and action items.

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

Go deeper