Opik MCP Server

Query, score and annotate Opik traces, datasets, experiments and prompts from an MCP client

Official · Comet Python Remote (hosted) · Streamable HTTPLocal · stdio DevOps and monitoringAI and ML

64 popularity score ★ 225 ↓ 3.6k/mo

Connect your client

Remote (hosted)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude Codeterminal
claude mcp add --scope user --transport http opik-mcp https://www.comet.com/opik/api/v1/mcp
Codexterminal
codex mcp add opik-mcp --url https://www.comet.com/opik/api/v1/mcp
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "opik-mcp": {
      "url": "https://www.comet.com/opik/api/v1/mcp"
    }
  }
}
VS Code.vscode/mcp.json or user mcp.json
{
  "servers": {
    "opik-mcp": {
      "type": "http",
      "url": "https://www.comet.com/opik/api/v1/mcp"
    }
  }
}
Local (PyPI)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs OPIK_URL. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add opik -e OPIK_URL=<OPIK_URL> -- uvx opik-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "opik": {
      "command": "uvx",
      "args": [
        "opik-mcp"
      ],
      "env": {
        "OPIK_URL": "<OPIK_URL>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "opik": {
      "command": "uvx",
      "args": [
        "opik-mcp"
      ],
      "env": {
        "OPIK_URL": "<OPIK_URL>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "opik": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "opik-mcp"
      ],
      "env": {
        "OPIK_URL": "<OPIK_URL>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.opik]
command = "uvx"
args = ["opik-mcp"]

[mcp_servers.opik.env]
OPIK_URL = "<OPIK_URL>"
Gemini CLITerminal
gemini mcp add --scope user -e OPIK_URL=<OPIK_URL> opik uvx -- opik-mcp

Settings 12

Set together: connection
OPIK_URL Required: Opik API base, such as http://localhost:5173/api for open-source Opik. For a self-hosted Comet set COMET_URL_OVERRIDE, OPIK_WORKSPACE and OPIK_API_KEY instead.
OPIK_API_KEY secret Optional: API key for a self-hosted Comet, or for open-source Opik that adds authentication.
OPIK_WORKSPACE Optional: Workspace name; COMET_WORKSPACE is read as a deprecated fallback. Unset means the account's default workspace on Comet. Default default.
COMET_URL_OVERRIDE Optional: Self-hosted Comet host; the API path /opik/api is added to it when OPIK_URL is unset. Default https://www.comet.com.
OPIK_DEFAULT_PROJECT_NAME Optional: Project the assistant is told to use when the user names none.
OPIK_MCP_LOG_LEVEL Optional: Log level on stderr. Default INFO.
Set together: http
OPIK_MCP_TRANSPORT Optional: stdio, or streamable-http to listen on a port. Default stdio.
OPIK_MCP_HOST Optional: Bind address in streamable-http mode. Default 127.0.0.1.
OPIK_MCP_PORT Optional: Port in streamable-http mode. Default 8080.
OPIK_MCP_ALLOWED_HOSTS Optional: Host headers accepted in streamable-http mode while DNS rebinding protection is on. Default 127.0.0.1:*,localhost:*,[::1]:*.
Set together: telemetry
OPIK_MCP_ANALYTICS_ENABLED Optional: Usage analytics to stats.comet.com; false turns them off. Default true.
OPIK_MCP_SENTRY_ENABLED Optional: Error reports to Comet's Sentry; false turns them off. Default true.

What it does

Opik is Comet's open-source platform for tracing and evaluating LLM applications. This server hooks an MCP client up to an Opik workspace, so the assistant can look at what your application logged and then act on it. Typical use: find the failing or slow traces, open their spans and threads, chart a project's error rate or token cost over time, and then record what you learned as feedback scores, comments, a new prompt version, a dataset or an experiment.

The tool surface is deliberately small. `read` and `list` take an entity type (project, trace, span, thread, dataset, experiment, prompt, Diagnostics issue, project metrics and others), and `list` adds filters, sorting, time windows and free-text search. `write` runs named operations, and `schema` returns the payload each one expects. A fifth tool, `read_skill`, hands out the Opik agent skills bundled in the package. In the 3.0.7 code those same skill files are also served as MCP resources under `opik://skills/`, and `write` takes a `dry_run` flag that checks a payload against its schema and OAuth scope without calling the backend. Neither shows up in the README.

Opik Cloud users connect to the copy Comet hosts at https://www.comet.com/opik/api/v1/mcp and sign in in the browser. In Claude Code the `opik` plugin registers that endpoint and installs the skills in one step, and asks for a different server URL if you run a self-hosted Comet with its MCP OAuth server turned on. People on open-source Opik or a self-hosted Comet without that run the Python package locally with `uvx opik-mcp` and configure it through environment variables. The older TypeScript server on npm (`opik-mcp` 2.x) is deprecated and stops answering on 2026-11-15.

The local server reports usage analytics to stats.comet.com and errors to Comet's Sentry project unless you turn them off. Both are on by default in `config.py` at 3.0.7, which the README only hints at.

What it needs

To run it yourselfPython
Runs onmacOS, Windows, Linux
OpikFree tierOpik Cloud (Comet account) for the hosted endpoint, or your own open-source Opik or self-hosted Comet for the local server
Also
  • uv on PATH for the local server (uvx opik-mcp)

Hosted endpoint: a Comet account and a client that handles MCP OAuth. In Claude Code, `/plugin install opik --marketplace comet-ml/opik-mcp` adds it (before 2.1.275, run `/plugin marketplace add comet-ml/opik-mcp` and then `/plugin install opik@opik`), and sign-in is finished from `/mcp` with Authenticate or `claude mcp login opik-mcp`. Codex finishes with `codex mcp login opik-mcp`. Local server: uv, which pulls Python 3.13 if missing, plus `OPIK_URL` for open-source Opik, or `COMET_URL_OVERRIDE`, `OPIK_WORKSPACE` and `OPIK_API_KEY` for a self-hosted Comet. `uvx opik-mcp@latest --check` tests the settings before you add it to a client.

Limits

  • Size cap Reads that inline children stop at 200 spans, 200 thread turns and 100 prompt versions, and cut fields over about 10 KB; read the child itself to get it whole
  • Size cap list returns 25 items per page by default and at most 100 (size), up to page 10000
  • Size cap A batch write takes at most 1000 elements in data
  • Not covered Trace, span and thread lists only show SDK traffic unless the filter names source
  • Limit With an API key and no OPIK_WORKSPACE, reads come from the account's default workspace with no error
  • Limit The Claude Code plugin marketplace serves the main branch, which can be ahead of the last release
  • Not covered In claude.ai chat the plugin adds only the skills, not the server
  • Limit The npm 2.x TypeScript server is deprecated and stops serving requests on 2026-11-15

Reads that inline child records cap them at 200 spans, 200 thread turns and 100 prompt versions, and cut inlined fields over about 10 KB and base64 images; reading the child directly returns it whole. Trace, span and thread lists show only SDK traffic unless `source` is named in the filter. Free-text search can take tens of seconds on large projects and has a 60-second timeout. On Opik Cloud with an API key and no `OPIK_WORKSPACE`, reads silently come from the account's default workspace. Cursor's 60-second tool-call limit can cut long calls short. The npm 2.x server is deprecated and stops on 2026-11-15.

Who it suits

Fits LLM engineers who already log to Opik and want their coding assistant to triage traces, look at Diagnostics issues and record scores or prompt versions without opening the UI. Opik Cloud users get the hosted endpoint with browser sign-in and nothing to install, and Claude Code users can add it with the plugin. Self-hosted and open-source users run the local package instead. Since `write` can log traces, change Diagnostics issue status and edit datasets, give it a scoped key or workspace if the assistant should only read. Teams that do not use Opik gain nothing here, because every tool works on an Opik workspace.

Tools 5

4 only read, 1 changes things. A ? marks an optional parameter.

read
Fetch one project, trace, span, thread, dataset, experiment, prompt or Diagnostics issue by id, name, UI link or opik:// URIentity_type: enumid: stringproject_id?: stringproject_name?: stringsince?: stringuntil?: stringfields?: string
list
Page through a collection with filters, sorting, time windows, text search and per-project metric chartsentity_type: enumname?: stringfilters?: stringsort?: stringsince?: stringuntil?: stringsearch?: stringfields?: stringpage?: integersize?: integerproject_id?: stringproject_name?: stringdataset_id?: stringexperiment_ids?: arrayprompt_id?: stringstatus?: enummetric_type?: enuminterval?: enumbreakdown?: stringseries?: string
write changes
Run a named write operation: log traces and spans, add scores and comments, save prompts, manage datasets, experiments, threads and Diagnosticsoperation: enumdata: anyidempotency_key?: stringdry_run?: boolean
schema
Return the payload schema and an example for a write operation, or the filter fields for a list typeoperation: enum
read_skill
Read one of the Opik agent skills bundled with the server, or a file inside itskill_name: string

Similar servers