Opik MCP Server (Model Context Protocol)
by vincentkoc
Model Context Protocol (MCP) implementation for Opik enabling seamless IDE integration and unified access to prompts, projects, traces, and metrics.
What is Opik MCP Server (Model Context Protocol)
โ ๏ธ Notice: SSE (Server-Sent Events) transport support is currently experimental and untested. For production use, we recommend using the direct process execution approach shown in the IDE integration examples.
๐ What is Opik MCP Server?
Opik MCP Server is an open-source implementation of the Model Context Protocol for the Opik platform. It provides a unified interface for interacting with Opik's capabilities, supporting multiple transport mechanisms for flexible integration into various environments.
You can use Opik MCP Server for:
-
IDE Integration:
- Seamlessly integrate with Cursor and other compatible IDEs
- Provide direct access to Opik's capabilities from your development environment
-
Unified API Access:
- Access all Opik features through a standardized protocol
- Leverage multiple transport options (stdio, SSE) for different integration scenarios
-
Platform Management:
- Manage prompts, projects, traces, and metrics through a consistent interface
- Organize and monitor your LLM applications efficiently
Features
- Prompts Management: Create, list, update, and delete prompts
- Projects/Workspaces Management: Organize and manage projects
- Traces: Track and analyze trace data
- Metrics: Gather and query metrics data
Quick Start
Installation
Manual Installation
# Clone the repository
git clone https://github.com/comet-ml/opik-mcp.git
cd opik-mcp
# Install dependencies and build
npm install
npm run build
Configuration
Create a .env
file based on the example:
cp .env.example .env
# Edit .env with your specific configuration
Starting the Server
# Start with stdio transport (default)
npm run start:stdio
# Start with SSE transport for network access (experimental)
npm run start:sse
IDE Integration
Cursor Integration
To integrate with Cursor IDE, create a .cursor/mcp.json
file in your project directory with the following configuration:
{
"mcpServers": {
"opik": {
"command": "/path/to/node",
"args": [
"/path/to/opik-mcp/build/index.js",
"--apiUrl",
"https://www.comet.com/opik/api",
"--apiKey",
"YOUR_API_KEY",
"--workspace",
"default",
"--debug",
"true"
],
"env": {
"OPIK_API_BASE_URL": "https://www.comet.com/opik/api",
"OPIK_API_KEY": "YOUR_API_KEY",
"OPIK_WORKSPACE_NAME": "default",
}
}
}
}
Replace /path/to/node
with the path to your Node.js executable and /path/to/opik-mcp
with the path to your opik-mcp installation. Also replace YOUR_API_KEY
with your actual Opik API key.
Available Commands
The project includes a Makefile for common operations:
# Display all available commands
make help
# Run tests
make test
# Run transport-specific tests
make test-transport
# Start the server with SSE transport (experimental)
make start-sse
# Start the server with stdio transport
make start-stdio
Transport Options
Standard Input/Output
Ideal for local integration where the client and server run on the same machine.
make start-stdio
Server-Sent Events (SSE)
Enables remote access and multiple simultaneous clients over HTTP. Note that this transport option is experimental.
make start-sse
For detailed information about the SSE transport, see docs/sse-transport.md.
Development
Testing
# Run all tests
npm test
# Run specific test suite
npm test -- tests/transports/sse-transport.test.ts
Pre-commit Hooks
This project uses pre-commit hooks to ensure code quality:
# Run pre-commit checks manually
make precommit
Documentation
- SSE Transport - Details on using the SSE transport
- API Reference - Complete API documentation
- Configuration - Advanced configuration options
- IDE Integration - Integration with Cursor IDE
License
Apache 2.0
Leave a Comment
Comments section will be available soon. Stay tuned!
Frequently Asked Questions
What is MCP?
MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.
What are MCP Servers?
MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.
How do MCP Servers work?
MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.
Are MCP Servers secure?
Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.
Related MCP Servers
21st.dev Magic AI Agent
It's like v0 but in your Cursor/WindSurf/Cline. 21st dev Magic MCP server for working with your frontend like Magic
Requirements:
A Model Context Protocol Server for connecting with Adfin APIs
AgentQL MCP Server
Model Context Protocol server that integrates AgentQL's data extraction capabilities.
AgentRPC
A universal RPC layer for AI agents. Connect to any function, any language, any framework, in minutes.
Aiven MCP Server
Model Context Protocol server for Aiven
IoTDB MCP Server
Apache IoTDB MCP Server
Apify Model Context Protocol (MCP) Server
Model Context Protocol (MCP) Server for Apify's Actors
APIMatic Validator MCP Server
APIMatic Validator MCP Server for validating OpenAPI specs via APIMatic's API with MCP
๐ Audiense Insights MCP Server
Audiense Insights MCP Server is a server based on the Model Context Protocol (MCP) that allows Claude and other MCP-compatible clients to interact with your Audiense Insights account
Bankless Onchain MCP Server
Bringing the bankless onchain API to MCP
Submit Your MCP Server
Share your MCP server with the community
Submit Now