# Opik

Connects an AI assistant to Opik workspaces so you can inspect traces, experiments, datasets and prompts, score results, and save prompt versions from chat.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 225
- Author: comet-ml
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/comet-ml/opik-mcp
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/opik

## What it does

Opik connects Claude Code and other MCP clients to an Opik workspace. An assistant can inspect traces, experiments, datasets and prompts, assign a score to a trace with a reason, and save prompt versions. That keeps Opik checks close to the coding conversation.

For Opik Cloud, the server uses HTTP at `https://www.comet.com/opik/api/v1/mcp` and signs in through the browser with OAuth, so no API key is handled. Self-hosted and open-source Opik run locally as `uvx opik-mcp` over stdio; configuration uses `OPIK_API_KEY`, `OPIK_WORKSPACE`, `OPIK_URL`, and `COMET_URL_OVERRIDE`. Local setup requires `uv`, so the server will not start without it. Start a new client session after configuration.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Remote server: `https://www.comet.com/opik/api/v1/mcp`
- Environment variables: `OPIK_API_KEY`, `OPIK_WORKSPACE`, `OPIK_URL`, `COMET_URL_OVERRIDE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI: remote server**
```bash
claude mcp add --transport http opik-mcp https://www.comet.com/opik/api/v1/mcp
```

2. **Platform CLI**
```bash
claude mcp add --env OPIK_API_KEY=<OPIK_API_KEY> --env OPIK_WORKSPACE=<OPIK_WORKSPACE> --env OPIK_URL=<OPIK_URL> --env COMET_URL_OVERRIDE=<COMET_URL_OVERRIDE> --transport stdio opik -- uvx opik-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from opik-mcp <command>

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add opik --url https://www.comet.com/opik/api/v1/mcp
```

2. **Platform CLI**
```bash
codex mcp add opik --env OPIK_API_KEY=<OPIK_API_KEY> --env OPIK_WORKSPACE=<OPIK_WORKSPACE> --env OPIK_URL=<OPIK_URL> --env COMET_URL_OVERRIDE=<COMET_URL_OVERRIDE> -- uvx opik-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from opik-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "opik": {
            "url": "https://www.comet.com/opik/api/v1/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "opik": {
            "command": "uvx",
            "args": [
                "opik-mcp"
            ],
            "env": {
                "OPIK_API_KEY": "<OPIK_API_KEY>",
                "OPIK_WORKSPACE": "<OPIK_WORKSPACE>",
                "OPIK_URL": "<OPIK_URL>",
                "COMET_URL_OVERRIDE": "<COMET_URL_OVERRIDE>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from opik-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "opik": {
            "type": "http",
            "url": "https://www.comet.com/opik/api/v1/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "opik": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "opik-mcp"
            ],
            "env": {
                "OPIK_API_KEY": "<OPIK_API_KEY>",
                "OPIK_WORKSPACE": "<OPIK_WORKSPACE>",
                "OPIK_URL": "<OPIK_URL>",
                "COMET_URL_OVERRIDE": "<COMET_URL_OVERRIDE>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from opik-mcp <command>

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http opik https://www.comet.com/opik/api/v1/mcp
```

2. **Platform CLI**
```bash
gemini mcp add -e OPIK_API_KEY=<OPIK_API_KEY> -e OPIK_WORKSPACE=<OPIK_WORKSPACE> -e OPIK_URL=<OPIK_URL> -e COMET_URL_OVERRIDE=<COMET_URL_OVERRIDE> opik uvx opik-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from opik-mcp <command>

## When to use it
- find failed traces in an Opik project
- inspect experiments and datasets from a workspace
- score a trace with a value and explanation
- save a new prompt version
- connect Opik Cloud or a local server to an MCP client

## Example prompts
- Find the traces that failed today in the Opik project `demo`.
- Give trace `7f2e…` a `0.9` helpfulness score and record the reason “great recovery”.
- Save this prompt as a new version in Opik and list its available versions.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74559
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
