Opik Mcp 伺服器(模型上下文協議)
模型上下文协议(MCP)实施用于Opik,实现无缝的IDE集成和对提示、项目、跟踪和指标的统一访问。
概覽
什麼是 Opik-MCP?
Opik-MCP 是一種模型上下文協議(MCP)實現,旨在與集成開發環境(IDE)無縫集成。它提供了一個統一的訪問點,用於管理提示、項目、追蹤和指標,增強開發人員和數據科學家的工作流程。這個工具對於那些希望簡化機器學習過程並改善團隊協作的人特別有用。
Opik-MCP 的特點
- 無縫的 IDE 集成:Opik-MCP 允許用戶輕鬆集成其開發環境,使管理機器學習項目的各個方面變得更加簡單。
- 統一訪問:用戶可以從單一界面訪問提示、項目、追蹤和指標,減少管理多個工具的複雜性。
- 增強的協作:該協議通過提供共享的平台來促進團隊成員之間的更好協作。
- 開源:作為一個公共庫,Opik-MCP 開放供貢獻,允許開發人員增強其功能和特性。
如何使用 Opik-MCP
- 安裝:首先從 GitHub 克隆 Opik-MCP 倉庫。使用以下命令:
git clone https://github.com/comet-ml/opik-mcp.git
- 設置:按照倉庫的 README 文件中提供的設置說明配置環境以滿足您的需求。
- 集成:將 Opik-MCP 與您首選的 IDE 集成。詳細說明可以在倉庫的文檔部分找到。
- 使用:開始使用 Opik-MCP 的功能來有效管理您的機器學習項目。通過統一界面訪問提示、項目、追蹤和指標。
常見問題解答
Opik-MCP 支持哪些編程語言?
Opik-MCP 設計為與語言無關,允許它與各種常用於機器學習的編程語言一起使用,例如 Python、R 和 Java。
Opik-MCP 是免費使用的嗎?
是的,Opik-MCP 是一個開源項目,根據 Apache-2.0 許可證發布,免費使用和修改。
我如何能為 Opik-MCP 做出貢獻?
您可以通過分叉倉庫、進行更改並提交拉取請求來貢獻。歡迎貢獻,您也可以報告問題或建議功能。
我在哪裡可以找到更多有關 Opik-MCP 的信息?
欲了解更多詳情,請訪問官方 Opik-MCP 頁面 或查看 GitHub 倉庫中提供的文檔。
詳細
<img src="https://badge.mcpx.dev?status=on" title="MCP Enabled"/>
⚠️ 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.
<br>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
Citation
If you use this project in your research, please cite it as follows:
Comet ML, Inc, Koc, V., & Boiko, Y. (2025). Opik MCP Server. Github. https://doi.org/10.5281/zenodo.15411156
Or use the following BibTeX entry:
@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}
}
You can also find citation information in the CITATION.cff
file in this repository.
License
Apache 2.0
伺服器配置
{
"mcpServers": {
"opik-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--comet-ml--opik-mcp--opik-mcp",
"npm run start"
],
"env": {
"OPIK_API_BASE_URL": "opik-api-base-url",
"OPIK_API_KEY": "opik-api-key",
"OPIK_WORKSPACE_NAME": "opik-workspace-name"
}
}
}
}