Model Context Protocol (MCP) implementation for Opik enabling seamless IDE integration and unified access to prompts, projects, traces, and metrics.
Configuration
View docs{
"mcpServers": {
"comet-ml-opik-mcp": {
"command": "npx",
"args": [
"-y",
"opik-mcp",
"--apiKey",
"YOUR_API_KEY"
]
}
}
}Opik MCP Server provides a unified Model Context Protocol interface for the Opik platform, enabling you to connect your IDEs or other tools to Opik features via a consistent transport layer. You can run the MCP server locally to access prompts, projects, traces, and metrics through a standardized protocol, and you can choose between local (stdio) execution or remote access via SSE (experimental).
You use an MCP client to connect to the Opik MCP Server through a local process or a remote endpoint. Start the server as a local stdio service and point your IDE or tool to the MCP server via the configured command and arguments. When connected, you can manage prompts, organize projects, inspect traces, and query metrics through the MCP interface. If you prefer remote access, you can enable SSE transport for HTTP-based connections, though this transport is experimental.
Prerequisites: you need Node.js and npm installed on your system.
1) Clone the repository and install dependencies.
# Clone the repository
git clone https://github.com/comet-ml/opik-mcp.git
cd opik-mcp
# Install dependencies and build
npm install
npm run build2) Create a configuration file or use the provided start commands to run the MCP server. You will typically start the stdio transport as shown.
# Start with stdio transport (default)
npm run start:stdio
# Start with SSE transport for network access (experimental)
npm run start:sseThe server can be connected to from IDEs and clients using an MCP configuration that specifies either a local stdio command or an HTTP endpoint. Use the following explicit stdio configurations as examples when wiring up your IDE or tool.
{
"mcpServers": {
"opik_mcp": {
"command": "npx",
"args": [
"-y",
"opik-mcp",
"--apiKey",
"YOUR_API_KEY"
]
}
}
}If you are using the Open-Source version and need to target a local API base, use a configuration that passes the API base URL instead of an API key.
{
"servers": {
"opik_mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"opik-mcp",
"--apiBaseUrl",
"http://localhost:5173/api"
]
}
},
"inputs": []
}Create, list, update, and delete prompts used to guide Opik’s behavior and responses.
Manage projects or workspaces to organize your Opik workflows and experiments.
Capture and analyze trace data to understand how prompts and models are behaving across runs.
Query and visualize metrics related to usage, performance, and outcomes of Opik workflows.