npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opik-mcp

v2.0.1

Published

MCP server to interact with Opik - Enables automated prompt optimization

Readme

License Node.js Version TypeScript

[!IMPORTANT] This repository ships the MCP server implementation only. We do not currently provide a hosted remote MCP service for Opik. If you run streamable-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

Quickstart

1. Run with npx

# Opik Cloud
npx -y opik-mcp --apiKey YOUR_API_KEY

For 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 build

Optional local config:

cp .env.example .env

Start the server:

npm run start:stdio
npm run start:http

Transport modes

| Transport | Use case | Command | | --- | --- | --- | | stdio | Local MCP integration (same machine as client) | npm run start:stdio | | streamable-http | Remote/self-hosted MCP endpoint (/mcp) | npm run start:http |

Remote auth defaults (streamable-http)

  • Authorization: Bearer <OPIK_API_KEY> or x-api-key is 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 (default true)
  • STREAMABLE_HTTP_VALIDATE_REMOTE_AUTH (default true, except test env)
  • REMOTE_TOKEN_WORKSPACE_MAP (JSON token-to-workspace map)
  • STREAMABLE_HTTP_TRUST_WORKSPACE_HEADERS (default false)

Deep dive: docs/streamable-http-transport.md

Toolsets

Toolsets let you narrow which capabilities are enabled:

  • core
  • integration
  • expert-prompts
  • expert-datasets
  • expert-trace-actions
  • expert-project-actions
  • metrics
  • all (enables all modern toolsets)

Configure via:

  • CLI: --toolsets all
  • Env: OPIK_TOOLSETS=core,expert-prompts,metrics

Details: docs/configuration.md

MCP resources and prompts

  • resources/list exposes static URIs (for example opik://workspace-info)
  • resources/templates/list exposes dynamic URI templates (for example opik://projects/{page}/{size})
  • resources/read supports static and templated URIs
  • prompts/list and prompts/get expose workflow prompts

Development

# Lint
npm run lint

# Test
npm test

# Build
npm run build

# Run precommit checks
make precommit

Documentation

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.15411156

BibTeX:

@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