Opik MCP Server
⚠️ 注意: SSE(服务器发送事件)传输支持目前处于实验阶段,尚未经过测试。对于生产环境,我们建议使用 IDE 集成示例中所示的直接流程执行方法。
🚀 什么是 Opik MCP 服务器?
Opik MCP 服务器是 Opik 平台模型上下文协议 (MCP) 的开源实现。它提供了与 Opik 功能交互的统一接口,支持多种传输机制,可灵活集成到各种环境中。
您可以使用 Opik MCP 服务器进行以下操作:
IDE 集成:
与 Cursor 和其他兼容 IDE 无缝集成
可以从您的开发环境直接访问 Opik 的功能
统一 API 访问:
通过标准化协议访问所有 Opik 功能
针对不同的集成场景利用多种传输选项(stdio、SSE)
平台管理:
通过一致的界面管理提示、项目、跟踪和指标
高效组织和监控你的法学硕士 (LLM) 申请
Related MCP server: dap-mcp
特征
提示管理:创建、列出、更新和删除提示
项目/工作区管理:组织和管理项目
跟踪:跟踪和分析跟踪数据
指标:收集和查询指标数据
快速入门
安装
手动安装
# 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配置
根据示例创建一个.env文件:
cp .env.example .env
# Edit .env with your specific configuration启动服务器
# Start with stdio transport (default)
npm run start:stdio
# Start with SSE transport for network access (experimental)
npm run start:sseIDE 集成
光标集成
要与 Cursor IDE 集成,请在项目目录中创建一个.cursor/mcp.json文件,并采用以下配置:
{
"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",
}
}
}
}将/path/to/node替换为 Node.js 可执行文件的路径,将/path/to/opik-mcp替换为 opik-mcp 安装的路径。同时将YOUR_API_KEY替换为你实际的 Opik API 密钥。
可用命令
该项目包含用于常见操作的 Makefile:
# 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交通选择
标准输入/输出
非常适合客户端和服务器在同一台机器上运行的本地集成。
make start-stdio服务器发送事件 (SSE)
通过 HTTP 启用远程访问和多个客户端同时访问。请注意,此传输选项尚处于实验阶段。
make start-sse有关 SSE 传输的详细信息,请参阅docs/sse-transport.md 。
发展
测试
# Run all tests
npm test
# Run specific test suite
npm test -- tests/transports/sse-transport.test.ts预提交钩子
该项目使用预提交钩子来确保代码质量:
# Run pre-commit checks manually
make precommit文档
执照
Apache 2.0
Available Tools
19 toolscreate-projectCInspect
Create a new project/workspace
Inputs: name (required), description, workspaceName.
create-promptCInspect
Create a new prompt
Inputs: name (required).
create-prompt-versionCInspect
Create a new version of a prompt
Inputs: commit_message (required), name (required), template (required).
delete-projectCInspect
Delete a project
Inputs: projectId (required), workspaceName.
delete-promptCInspect
Delete a prompt
Inputs: promptId (required).
get-metricsCInspect
Get metrics data
Inputs: endDate, metricName, projectId, projectName, +1 more.
get-opik-examplesCInspect
Get examples of how to use Opik Comet's API for specific tasks
Inputs: task (required).
get-opik-helpBInspect
Get contextual help about Opik Comet's capabilities
Inputs: topic (required), subtopic.
get-opik-tracing-infoCInspect
Get information about Opik's tracing capabilities and how to use them
Inputs: topic.
get-project-by-idCInspect
Get a single project by ID
Inputs: projectId (required), workspaceName.
get-prompt-by-idCInspect
Get a single prompt by ID
Inputs: promptId (required).
get-server-infoBInspect
Get information about the Opik server configuration
Inputs: random_string.
get-trace-by-idCInspect
Get a single trace by ID
Inputs: traceId (required), workspaceName.
get-trace-statsCInspect
Get statistics for traces
Inputs: endDate, projectId, projectName, startDate, +1 more.
list-projectsCInspect
Get a list of projects/workspaces
Inputs: page (required), size (required), sortBy, sortOrder, +1 more.
list-promptsCInspect
Get a list of Opik prompts
Inputs: page (required), size (required).
list-tracesCInspect
Get a list of traces
Inputs: page (required), size (required), projectId, projectName, +1 more.
update-projectCInspect
Update a project
Inputs: projectId (required), description, name, workspaceName.
update-promptCInspect
Update a prompt
Inputs: name (required), promptId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Each tool has a clearly distinct purpose targeting specific resources (projects, prompts, traces, metrics, help) and actions (create, get, list, update, delete). There is no overlap or ambiguity between tools, making it easy for an agent to select the right one for any operation.
All tools follow a consistent verb_noun pattern with hyphens (e.g., create-project, get-project-by-id, list-projects). The naming is uniform across all 19 tools, using clear verbs like create, get, list, update, and delete paired with specific nouns.
With 19 tools, the count is slightly high but reasonable for a comprehensive server covering projects, prompts, traces, metrics, and help. It feels well-scoped for the Opik domain, though it borders on being heavy compared to typical 3-15 tool ranges.
The tool set provides complete CRUD/lifecycle coverage for projects and prompts (create, get, list, update, delete), with additional tools for traces, metrics, and help. There are no obvious gaps; agents can perform all core operations without dead ends in this domain.
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for Studex tools, notifications, and profile integrations
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- FlicenseBqualityDmaintenanceImplements the Model Context Protocol (MCP) to provide AI models with a standardized interface for connecting to external data sources and tools like file systems, databases, or APIs.1153-
- AlicenseNot gradedqualityDmaintenanceAn implementation of the Model Context Protocol (MCP) that enables interaction with debug adapters, allowing language models to control debuggers, set breakpoints, evaluate expressions, and navigate source code during debugging sessions.41AGPL 3.0
- FlicenseNot gradedqualityDmaintenanceA Python-based implementation of the Model Context Protocol that enables communication between a model context management server and client through a request-response architecture.-
- -licenseNot gradedqualityDmaintenanceA standardized foundation for building Model Context Protocol servers that integrate with VS Code, using Python with stdio transport for seamless AI tool integration.-