The Opik MCP Server is a Model Context Protocol implementation that provides a unified interface for managing Opik resources through various transport mechanisms:
Prompt Management: Create, list, update, delete prompts, and manage versions
Project/Workspace Management: Create, list, update, and delete projects
Trace Management: List traces, retrieve details, and access statistics
Metrics: Query metrics data with filtering options
Server Information: Retrieve configuration details
Contextual Help: Access help topics and examples
Used for configuration through environment variables in a .env file
Hosts the repository and provides licensing information
Provides a Makefile for common operations like testing and starting the server
Used as the runtime environment for the MCP server
Implements pre-commit hooks to ensure code quality
Provides community support through the linked Slack community
Provides TypeScript language support for the MCP server implementation
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Opik MCP Serverlist my recent prompts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
This repository ships the MCP server implementation only. We do not currently provide a hosted remote MCP service for Opik.
If you runstreamable-http remotely, authentication is fail-closed by default.
Why this server
Opik MCP Server gives MCP-compatible clients one interface for:
Prompt lifecycle management
Workspace, project, and trace exploration
Metrics and dataset operations
MCP resources and resource templates for metadata-aware flows
Related MCP server: OpenAI MCP Server
Quickstart
1. Run with npx
# Opik Cloud
npx -y opik-mcp --apiKey YOUR_API_KEYFor self-hosted Opik, pass --apiUrl (for example http://localhost:5173/api) and use your local auth strategy.
2. Add to your MCP client
Cursor (.cursor/mcp.json):
{
"mcpServers": {
"opik": {
"command": "npx",
"args": ["-y", "opik-mcp", "--apiKey", "YOUR_API_KEY"]
}
}
}VS Code / GitHub Copilot (.vscode/mcp.json):
{
"inputs": [
{
"type": "promptString",
"id": "opik-api-key",
"description": "Opik API Key",
"password": true
}
],
"servers": {
"opik-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "opik-mcp", "--apiKey", "${input:opik-api-key}"]
}
}
}Windsurf (raw config):
{
"mcpServers": {
"opik": {
"command": "npx",
"args": ["-y", "opik-mcp", "--apiKey", "YOUR_API_KEY"]
}
}
}More client-specific examples: docs/ide-integration.md
Run from source
git clone https://github.com/comet-ml/opik-mcp.git
cd opik-mcp
npm install
npm run buildOptional local config:
cp .env.example .envStart the server:
npm run start:stdio
npm run start:httpTransport modes
Transport | Use case | Command |
| Local MCP integration (same machine as client) |
|
| Remote/self-hosted MCP endpoint ( |
|
Remote auth defaults (streamable-http)
Authorization: Bearer <OPIK_API_KEY>orx-api-keyis required by default.Workspace is resolved server-side (token map recommended); workspace headers are not trusted by default.
In remote mode, request-context workspace takes precedence over tool
workspaceName.Missing or invalid auth returns HTTP
401.
Key environment flags:
STREAMABLE_HTTP_REQUIRE_AUTH(defaulttrue)STREAMABLE_HTTP_VALIDATE_REMOTE_AUTH(defaulttrue, except test env)REMOTE_TOKEN_WORKSPACE_MAP(JSON token-to-workspace map)STREAMABLE_HTTP_TRUST_WORKSPACE_HEADERS(defaultfalse)
Deep dive: docs/streamable-http-transport.md
Toolsets
Toolsets let you narrow which capabilities are enabled:
coreintegrationexpert-promptsexpert-datasetsexpert-trace-actionsexpert-project-actionsmetricsall(enables all modern toolsets)
Configure via:
CLI:
--toolsets allEnv:
OPIK_TOOLSETS=core,expert-prompts,metrics
Details: docs/configuration.md
MCP resources and prompts
resources/listexposes static URIs (for exampleopik://workspace-info)resources/templates/listexposes dynamic URI templates (for exampleopik://projects/{page}/{size})resources/readsupports static and templated URIsprompts/listandprompts/getexpose workflow prompts
Development
# Lint
npm run lint
# Test
npm test
# Build
npm run build
# Run precommit checks
make precommitDocumentation
Contributing
Please read CONTRIBUTING.md before opening a PR.
Citation
If you use this project in research, cite:
Comet ML, Inc, Koc, V., & Boiko, Y. (2025). Opik MCP Server. Github. https://doi.org/10.5281/zenodo.15411156BibTeX:
@software{CometML_Opik_MCP_Server_2025,
author = {{Comet ML, Inc} and Koc, V. and Boiko, Y.},
title = {{Opik MCP Server}},
year = {2025},
publisher = {GitHub},
url = {https://doi.org/10.5281/zenodo.15411156},
doi = {10.5281/zenodo.15411156}
}Citation metadata is also available in CITATION.cff.
License
Apache 2.0
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.