Get the FREE Ultimate OpenClaw Setup Guide →

opik

Model Context Protocol (MCP) implementation for Opik enabling seamless IDE integration and unified access to prompts, projects, traces, and metrics.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio comet-ml-opik-mcp npx -y opik-mcp --apiKey YOUR_API_KEY

How to use

The Opik MCP Server exposes a standard Model Context Protocol (MCP) interface for interacting with Comet Opik workflows. It supports both local stdio transport for on-device integrations and a remote streamable-http transport for self-hosted or cloud deployments. Once running, clients can connect through the MCP API to manage prompt lifecycles, browse workspaces and projects, inspect traces, and perform metrics and dataset operations. The server also provides resource templates and prompts to drive metadata-aware flows, enabling programmatic orchestration of Opik prompts and experiments. You can enable or disable specific toolsets to tailor capabilities to your use case (for example core, integration, or expert-dataset actions).

How to install

Prerequisites:

  • Node.js v20.11.0 or newer
  • npm (comes with Node.js)

Install and run from source:

git clone https://github.com/comet-ml/opik-mcp.git
cd opik-mcp
npm install
npm run build

Optional local configuration:

cp .env.example .env

Start options:

  • Local stdio transport (for integration on the same machine as the client):
npm run start:stdio
  • Remote HTTP transport (streamable-http):
npm run start:http

If you prefer running via npx directly (as shown in the Quickstart):

npx -y opik-mcp --apiKey YOUR_API_KEY

Additional notes

Environment and configuration tips:

  • In remote (streamable-http) mode, authentication is enforced by default. By default the server expects Authorization: Bearer <OPIK_API_KEY> or x-api-key header values.
  • Use STREAMABLE_HTTP_REQUIRE_AUTH and related STREAMABLE_HTTP_* env vars to customize remote behavior. See docs/streamable-http-transport.md for details.
  • The toolsets system lets you limit capabilities (core, integration, expert-prompts, expert-datasets, expert-trace-actions, expert-project-actions, metrics, all). Configure with OPIK_TOOLSETS or CLI flags as described in docs/configuration.md.
  • For local development, you can copy .env.example to .env to customize behavior without affecting production settings.
  • If you run with npx, ensure you provide a valid API key or appropriate local auth configuration when connecting from a client.
  • The repository ships the MCP server implementation only; there is no hosted remote MCP service in this repo by default.

Related MCP Servers

Sponsor this space

Reach thousands of developers ↗