opik-mcp 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. opik_mcp-0.1.0/.github/CODEOWNERS +12 -0
  2. opik_mcp-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +27 -0
  3. opik_mcp-0.1.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
  4. opik_mcp-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +23 -0
  5. opik_mcp-0.1.0/.github/dependabot.yml +34 -0
  6. opik_mcp-0.1.0/.github/labeler.yml +47 -0
  7. opik_mcp-0.1.0/.github/pull_request_template.md +15 -0
  8. opik_mcp-0.1.0/.github/workflows/legacy-ts-ci.yml +35 -0
  9. opik_mcp-0.1.0/.github/workflows/legacy-ts-deploy.yml +82 -0
  10. opik_mcp-0.1.0/.github/workflows/python-ci.yml +30 -0
  11. opik_mcp-0.1.0/.github/workflows/python-release.yml +53 -0
  12. opik_mcp-0.1.0/.gitignore +52 -0
  13. opik_mcp-0.1.0/CITATION.cff +15 -0
  14. opik_mcp-0.1.0/LICENSE +203 -0
  15. opik_mcp-0.1.0/Makefile +73 -0
  16. opik_mcp-0.1.0/PKG-INFO +465 -0
  17. opik_mcp-0.1.0/README.md +442 -0
  18. opik_mcp-0.1.0/legacy/typescript/.cursor/test.txt +111 -0
  19. opik_mcp-0.1.0/legacy/typescript/.env.example +38 -0
  20. opik_mcp-0.1.0/legacy/typescript/.eslintrc.json +26 -0
  21. opik_mcp-0.1.0/legacy/typescript/.gitignore +45 -0
  22. opik_mcp-0.1.0/legacy/typescript/.prettierrc +7 -0
  23. opik_mcp-0.1.0/legacy/typescript/CONTRIBUTING.md +100 -0
  24. opik_mcp-0.1.0/legacy/typescript/DEPRECATED.md +22 -0
  25. opik_mcp-0.1.0/legacy/typescript/Dockerfile +25 -0
  26. opik_mcp-0.1.0/legacy/typescript/Makefile +80 -0
  27. opik_mcp-0.1.0/legacy/typescript/README.md +236 -0
  28. opik_mcp-0.1.0/legacy/typescript/client/index.html +323 -0
  29. opik_mcp-0.1.0/legacy/typescript/docs/api-reference.md +530 -0
  30. opik_mcp-0.1.0/legacy/typescript/docs/assets/logo-dark-mode.svg +7 -0
  31. opik_mcp-0.1.0/legacy/typescript/docs/assets/logo-light-mode.svg +14 -0
  32. opik_mcp-0.1.0/legacy/typescript/docs/configuration.md +121 -0
  33. opik_mcp-0.1.0/legacy/typescript/docs/ide-integration.md +175 -0
  34. opik_mcp-0.1.0/legacy/typescript/docs/index.html +40 -0
  35. opik_mcp-0.1.0/legacy/typescript/docs/streamable-http-transport.md +120 -0
  36. opik_mcp-0.1.0/legacy/typescript/package-lock.json +16036 -0
  37. opik_mcp-0.1.0/legacy/typescript/package.json +96 -0
  38. opik_mcp-0.1.0/legacy/typescript/scripts/dev-http-watch.sh +23 -0
  39. opik_mcp-0.1.0/legacy/typescript/server.json +67 -0
  40. opik_mcp-0.1.0/legacy/typescript/smithery.yaml +13 -0
  41. opik_mcp-0.1.0/legacy/typescript/src/cli.ts +51 -0
  42. opik_mcp-0.1.0/legacy/typescript/src/config.ts +481 -0
  43. opik_mcp-0.1.0/legacy/typescript/src/debug-log.ts +72 -0
  44. opik_mcp-0.1.0/legacy/typescript/src/index.ts +219 -0
  45. opik_mcp-0.1.0/legacy/typescript/src/prompts/core-prompts.ts +75 -0
  46. opik_mcp-0.1.0/legacy/typescript/src/resources/opik-resources.ts +397 -0
  47. opik_mcp-0.1.0/legacy/typescript/src/test-client.ts +557 -0
  48. opik_mcp-0.1.0/legacy/typescript/src/tools/capabilities.ts +253 -0
  49. opik_mcp-0.1.0/legacy/typescript/src/tools/dataset.ts +317 -0
  50. opik_mcp-0.1.0/legacy/typescript/src/tools/integration.ts +109 -0
  51. opik_mcp-0.1.0/legacy/typescript/src/tools/metrics.ts +114 -0
  52. opik_mcp-0.1.0/legacy/typescript/src/tools/project.ts +121 -0
  53. opik_mcp-0.1.0/legacy/typescript/src/tools/prompt.ts +268 -0
  54. opik_mcp-0.1.0/legacy/typescript/src/tools/registration.ts +201 -0
  55. opik_mcp-0.1.0/legacy/typescript/src/tools/schema.ts +31 -0
  56. opik_mcp-0.1.0/legacy/typescript/src/tools/trace.ts +601 -0
  57. opik_mcp-0.1.0/legacy/typescript/src/transports/streamable-http-transport.ts +440 -0
  58. opik_mcp-0.1.0/legacy/typescript/src/transports/types.ts +71 -0
  59. opik_mcp-0.1.0/legacy/typescript/src/types.ts +153 -0
  60. opik_mcp-0.1.0/legacy/typescript/src/utils/api.ts +86 -0
  61. opik_mcp-0.1.0/legacy/typescript/src/utils/capabilities.ts +415 -0
  62. opik_mcp-0.1.0/legacy/typescript/src/utils/env.ts +61 -0
  63. opik_mcp-0.1.0/legacy/typescript/src/utils/examples.ts +447 -0
  64. opik_mcp-0.1.0/legacy/typescript/src/utils/logging.ts +17 -0
  65. opik_mcp-0.1.0/legacy/typescript/src/utils/metrics-info.ts +291 -0
  66. opik_mcp-0.1.0/legacy/typescript/src/utils/opik-sdk.ts +178 -0
  67. opik_mcp-0.1.0/legacy/typescript/src/utils/remote-auth.ts +250 -0
  68. opik_mcp-0.1.0/legacy/typescript/src/utils/request-context.ts +53 -0
  69. opik_mcp-0.1.0/legacy/typescript/src/utils/tracing-info.ts +153 -0
  70. opik_mcp-0.1.0/legacy/typescript/test-client.js +60 -0
  71. opik_mcp-0.1.0/legacy/typescript/tests/capabilities-tools.test.ts +67 -0
  72. opik_mcp-0.1.0/legacy/typescript/tests/capabilities.test.ts +184 -0
  73. opik_mcp-0.1.0/legacy/typescript/tests/config-toolsets.test.ts +49 -0
  74. opik_mcp-0.1.0/legacy/typescript/tests/core-prompts.test.ts +15 -0
  75. opik_mcp-0.1.0/legacy/typescript/tests/dataset-tools.test.ts +23 -0
  76. opik_mcp-0.1.0/legacy/typescript/tests/examples.test.ts +121 -0
  77. opik_mcp-0.1.0/legacy/typescript/tests/index.test.ts +215 -0
  78. opik_mcp-0.1.0/legacy/typescript/tests/mcp-tools.test.ts +541 -0
  79. opik_mcp-0.1.0/legacy/typescript/tests/metrics-info.test.ts +101 -0
  80. opik_mcp-0.1.0/legacy/typescript/tests/opik-resources.test.ts +90 -0
  81. opik_mcp-0.1.0/legacy/typescript/tests/opik-sdk-context.test.ts +23 -0
  82. opik_mcp-0.1.0/legacy/typescript/tests/prompt-tools.test.ts +22 -0
  83. opik_mcp-0.1.0/legacy/typescript/tests/registration.test.ts +76 -0
  84. opik_mcp-0.1.0/legacy/typescript/tests/remote-auth.test.ts +49 -0
  85. opik_mcp-0.1.0/legacy/typescript/tests/request-context.test.ts +38 -0
  86. opik_mcp-0.1.0/legacy/typescript/tests/tool-signatures.test.ts +66 -0
  87. opik_mcp-0.1.0/legacy/typescript/tests/toolset-routing.test.ts +60 -0
  88. opik_mcp-0.1.0/legacy/typescript/tests/tracing-info.test.ts +117 -0
  89. opik_mcp-0.1.0/legacy/typescript/tests/transports/mcp-streamable-http-integration.test.ts +140 -0
  90. opik_mcp-0.1.0/legacy/typescript/tests/transports/streamable-http-transport.test.ts +190 -0
  91. opik_mcp-0.1.0/legacy/typescript/tsconfig.json +16 -0
  92. opik_mcp-0.1.0/legacy/typescript/tsconfig.test.json +16 -0
  93. opik_mcp-0.1.0/pyproject.toml +61 -0
  94. opik_mcp-0.1.0/scripts/smoke_live_be.py +258 -0
  95. opik_mcp-0.1.0/scripts/smoke_mcp_session.py +275 -0
  96. opik_mcp-0.1.0/scripts/smoke_wire_capture.py +144 -0
  97. opik_mcp-0.1.0/src/opik_mcp/__init__.py +3 -0
  98. opik_mcp-0.1.0/src/opik_mcp/__main__.py +89 -0
  99. opik_mcp-0.1.0/src/opik_mcp/analytics/__init__.py +62 -0
  100. opik_mcp-0.1.0/src/opik_mcp/analytics/client.py +200 -0
  101. opik_mcp-0.1.0/src/opik_mcp/analytics/events.py +45 -0
  102. opik_mcp-0.1.0/src/opik_mcp/analytics/identity.py +92 -0
  103. opik_mcp-0.1.0/src/opik_mcp/analytics/wrappers.py +155 -0
  104. opik_mcp-0.1.0/src/opik_mcp/ask_ollie.py +597 -0
  105. opik_mcp-0.1.0/src/opik_mcp/audit.py +100 -0
  106. opik_mcp-0.1.0/src/opik_mcp/comet_client.py +102 -0
  107. opik_mcp-0.1.0/src/opik_mcp/config.py +118 -0
  108. opik_mcp-0.1.0/src/opik_mcp/instructions.py +104 -0
  109. opik_mcp-0.1.0/src/opik_mcp/ollie_client.py +181 -0
  110. opik_mcp-0.1.0/src/opik_mcp/opik_client.py +652 -0
  111. opik_mcp-0.1.0/src/opik_mcp/read_list/__init__.py +19 -0
  112. opik_mcp-0.1.0/src/opik_mcp/read_list/compression.py +92 -0
  113. opik_mcp-0.1.0/src/opik_mcp/read_list/list_tool.py +134 -0
  114. opik_mcp-0.1.0/src/opik_mcp/read_list/read_tool.py +182 -0
  115. opik_mcp-0.1.0/src/opik_mcp/read_list/registry.py +382 -0
  116. opik_mcp-0.1.0/src/opik_mcp/read_list/uri.py +67 -0
  117. opik_mcp-0.1.0/src/opik_mcp/run_experiment.py +97 -0
  118. opik_mcp-0.1.0/src/opik_mcp/run_experiment_models.py +108 -0
  119. opik_mcp-0.1.0/src/opik_mcp/server.py +517 -0
  120. opik_mcp-0.1.0/src/opik_mcp/writes/__init__.py +47 -0
  121. opik_mcp-0.1.0/src/opik_mcp/writes/description.py +61 -0
  122. opik_mcp-0.1.0/src/opik_mcp/writes/dispatch.py +547 -0
  123. opik_mcp-0.1.0/src/opik_mcp/writes/errors.py +210 -0
  124. opik_mcp-0.1.0/src/opik_mcp/writes/models.py +502 -0
  125. opik_mcp-0.1.0/src/opik_mcp/writes/registry.py +212 -0
  126. opik_mcp-0.1.0/src/opik_mcp/writes/schema_tool.py +63 -0
  127. opik_mcp-0.1.0/src/opik_mcp/writes/scopes.py +40 -0
  128. opik_mcp-0.1.0/src/opik_mcp/writes/write_tool.py +58 -0
  129. opik_mcp-0.1.0/tests/__init__.py +0 -0
  130. opik_mcp-0.1.0/tests/conformance/__init__.py +0 -0
  131. opik_mcp-0.1.0/tests/conformance/test_run_experiment_surface.py +47 -0
  132. opik_mcp-0.1.0/tests/conformance/test_write_tool_surface.py +250 -0
  133. opik_mcp-0.1.0/tests/conftest.py +12 -0
  134. opik_mcp-0.1.0/tests/integration/__init__.py +0 -0
  135. opik_mcp-0.1.0/tests/integration/test_llm_recovery.py +180 -0
  136. opik_mcp-0.1.0/tests/test_analytics_client.py +425 -0
  137. opik_mcp-0.1.0/tests/test_analytics_events.py +30 -0
  138. opik_mcp-0.1.0/tests/test_analytics_identity.py +116 -0
  139. opik_mcp-0.1.0/tests/test_analytics_privacy.py +346 -0
  140. opik_mcp-0.1.0/tests/test_analytics_server_startup.py +44 -0
  141. opik_mcp-0.1.0/tests/test_analytics_wrappers.py +124 -0
  142. opik_mcp-0.1.0/tests/test_ask_ollie.py +1246 -0
  143. opik_mcp-0.1.0/tests/test_ask_ollie_analytics.py +178 -0
  144. opik_mcp-0.1.0/tests/test_ask_ollie_live.py +52 -0
  145. opik_mcp-0.1.0/tests/test_audit.py +84 -0
  146. opik_mcp-0.1.0/tests/test_audit_analytics.py +49 -0
  147. opik_mcp-0.1.0/tests/test_comet_client.py +121 -0
  148. opik_mcp-0.1.0/tests/test_config.py +116 -0
  149. opik_mcp-0.1.0/tests/test_http_auth.py +60 -0
  150. opik_mcp-0.1.0/tests/test_instructions.py +93 -0
  151. opik_mcp-0.1.0/tests/test_ollie_client.py +291 -0
  152. opik_mcp-0.1.0/tests/test_opik_client.py +387 -0
  153. opik_mcp-0.1.0/tests/test_opik_client_read.py +313 -0
  154. opik_mcp-0.1.0/tests/test_read_list/__init__.py +0 -0
  155. opik_mcp-0.1.0/tests/test_read_list/test_compression.py +75 -0
  156. opik_mcp-0.1.0/tests/test_read_list/test_list_tool.py +172 -0
  157. opik_mcp-0.1.0/tests/test_read_list/test_read_tool.py +258 -0
  158. opik_mcp-0.1.0/tests/test_read_list/test_registry.py +46 -0
  159. opik_mcp-0.1.0/tests/test_read_list/test_server_registration.py +48 -0
  160. opik_mcp-0.1.0/tests/test_read_list/test_trace_compression.py +52 -0
  161. opik_mcp-0.1.0/tests/test_read_list/test_uri.py +47 -0
  162. opik_mcp-0.1.0/tests/test_run_experiment.py +146 -0
  163. opik_mcp-0.1.0/tests/test_run_experiment_models.py +114 -0
  164. opik_mcp-0.1.0/tests/test_run_experiment_tool.py +77 -0
  165. opik_mcp-0.1.0/tests/test_writes/__init__.py +0 -0
  166. opik_mcp-0.1.0/tests/test_writes/test_data_rules.py +121 -0
  167. opik_mcp-0.1.0/tests/test_writes/test_dispatch.py +452 -0
  168. opik_mcp-0.1.0/tests/test_writes/test_models.py +243 -0
  169. opik_mcp-0.1.0/tests/test_writes/test_registry.py +152 -0
  170. opik_mcp-0.1.0/uv.lock +912 -0
@@ -0,0 +1,12 @@
1
+ # Default ownership for this repository
2
+ * @comet-ml/comet-opik-devs
3
+
4
+ # Documentation and templates
5
+ *.md @comet-ml/comet-opik-devs
6
+ .github/ISSUE_TEMPLATE/* @comet-ml/comet-opik-devs
7
+ .github/pull_request_template.md @comet-ml/comet-opik-devs
8
+
9
+ # CI/CD and release automation
10
+ .github/workflows/* @comet-ml/comet-devops @comet-ml/comet-opik-devs
11
+ .github/dependabot.yml @comet-ml/comet-devops @comet-ml/comet-opik-devs
12
+ .github/labeler.yml @comet-ml/comet-opik-devs
@@ -0,0 +1,27 @@
1
+ name: Bug Report
2
+ description: Report a defect in opik-mcp
3
+ labels: [bug]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Please provide enough detail to reproduce the issue.
9
+ - type: textarea
10
+ id: summary
11
+ attributes:
12
+ label: Summary
13
+ description: What happened?
14
+ validations:
15
+ required: true
16
+ - type: textarea
17
+ id: reproduction
18
+ attributes:
19
+ label: Reproduction steps
20
+ description: Include commands/configuration and expected vs actual behavior.
21
+ validations:
22
+ required: true
23
+ - type: textarea
24
+ id: environment
25
+ attributes:
26
+ label: Environment
27
+ description: OS, Node version, transport mode, and client (Cursor/VS Code/etc.).
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Explore Opik Documentation
4
+ url: https://www.comet.com/docs/opik
5
+ about: New to Opik? read our documentation to get setup.
6
+ - name: Ask Opik Community Support
7
+ url: https://chat.comet.com
8
+ about: Ask usage questions in the community before opening an issue.
@@ -0,0 +1,23 @@
1
+ name: Feature Request
2
+ description: Propose an enhancement for opik-mcp
3
+ labels: [enhancement]
4
+ body:
5
+ - type: textarea
6
+ id: problem
7
+ attributes:
8
+ label: Problem
9
+ description: What problem are you trying to solve?
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: proposal
14
+ attributes:
15
+ label: Proposed solution
16
+ description: Describe the ideal behavior/API.
17
+ validations:
18
+ required: true
19
+ - type: textarea
20
+ id: alternatives
21
+ attributes:
22
+ label: Alternatives considered
23
+ description: Optional alternatives or tradeoffs.
@@ -0,0 +1,34 @@
1
+ version: 2
2
+ updates:
3
+ # Python (root):
4
+ # Disabled until Dependabot can update uv.lock alongside pyproject.toml.
5
+ # `make check` runs `uv sync --extra dev`, which is strict against the
6
+ # lockfile, so every Dependabot bump would fail CI. Tracking upstream:
7
+ # https://github.com/dependabot/dependabot-core/issues/10478
8
+ # - package-ecosystem: "pip"
9
+ # directory: "/"
10
+ # schedule:
11
+ # interval: "weekly"
12
+ # open-pull-requests-limit: 10
13
+ # labels:
14
+ # - "dependencies"
15
+ # - "python"
16
+
17
+ # Legacy TypeScript (deprecated, maintenance-only)
18
+ - package-ecosystem: "npm"
19
+ directory: "/legacy/typescript"
20
+ schedule:
21
+ interval: "weekly"
22
+ open-pull-requests-limit: 5
23
+ labels:
24
+ - "dependencies"
25
+ - "legacy-typescript"
26
+
27
+ # GitHub Actions workflows
28
+ - package-ecosystem: "github-actions"
29
+ directory: "/"
30
+ schedule:
31
+ interval: "weekly"
32
+ labels:
33
+ - "dependencies"
34
+ - "infrastructure"
@@ -0,0 +1,47 @@
1
+ python:
2
+ - changed-files:
3
+ - any-glob-to-any-file:
4
+ - 'src/opik_mcp/**'
5
+ - 'pyproject.toml'
6
+ - 'uv.lock'
7
+
8
+ legacy-typescript:
9
+ - changed-files:
10
+ - any-glob-to-any-file:
11
+ - 'legacy/typescript/**'
12
+
13
+ security:
14
+ - changed-files:
15
+ - any-glob-to-any-file:
16
+ - 'src/opik_mcp/config.py'
17
+ - 'src/opik_mcp/server.py'
18
+ - 'src/opik_mcp/comet_client.py'
19
+ - 'src/opik_mcp/opik_client.py'
20
+ - 'src/opik_mcp/ollie_client.py'
21
+
22
+ dependencies:
23
+ - changed-files:
24
+ - any-glob-to-any-file:
25
+ - 'pyproject.toml'
26
+ - 'uv.lock'
27
+ - 'legacy/typescript/package.json'
28
+ - 'legacy/typescript/package-lock.json'
29
+
30
+ infrastructure:
31
+ - changed-files:
32
+ - any-glob-to-any-file:
33
+ - '.github/**/*'
34
+ - 'legacy/typescript/Dockerfile'
35
+ - 'Makefile'
36
+
37
+ documentation:
38
+ - changed-files:
39
+ - any-glob-to-any-file:
40
+ - 'README.md'
41
+ - '**/*.md'
42
+
43
+ tests:
44
+ - changed-files:
45
+ - any-glob-to-any-file:
46
+ - 'tests/**/*'
47
+ - 'legacy/typescript/tests/**/*'
@@ -0,0 +1,15 @@
1
+ ## Details
2
+
3
+ ## Change checklist
4
+ - [ ] User facing
5
+ - [ ] Documentation updated (if needed)
6
+ - [ ] Tests added/updated (if needed)
7
+ - [ ] Breaking changes documented (if any)
8
+
9
+ ## Issues
10
+ - Resolves #
11
+ - OPIK-
12
+
13
+ ## Testing
14
+
15
+ ## Documentation
@@ -0,0 +1,35 @@
1
+ name: Legacy TS CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [ main ]
6
+ paths:
7
+ - 'legacy/typescript/**'
8
+ - '.github/workflows/legacy-ts-ci.yml'
9
+
10
+ jobs:
11
+ ci:
12
+ runs-on: ubuntu-latest
13
+ defaults:
14
+ run:
15
+ working-directory: legacy/typescript
16
+
17
+ steps:
18
+ - name: Checkout code
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Setup Node.js
22
+ uses: actions/setup-node@v4
23
+ with:
24
+ node-version: '18'
25
+ cache: 'npm'
26
+ cache-dependency-path: legacy/typescript/package-lock.json
27
+
28
+ - name: Install dependencies
29
+ run: npm ci
30
+
31
+ - name: Run pre-commit checks
32
+ run: make precommit
33
+
34
+ - name: Build project
35
+ run: npm run build
@@ -0,0 +1,82 @@
1
+ name: Publish Release (Legacy TS)
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "npm-v*"
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ deploy:
11
+ runs-on: ubuntu-latest
12
+ defaults:
13
+ run:
14
+ working-directory: legacy/typescript
15
+
16
+ permissions:
17
+ contents: read
18
+ id-token: write
19
+
20
+ steps:
21
+ - name: Checkout code
22
+ uses: actions/checkout@v4
23
+
24
+ - name: Setup Node.js
25
+ uses: actions/setup-node@v4
26
+ with:
27
+ node-version: '24'
28
+ registry-url: 'https://registry.npmjs.org'
29
+ cache: 'npm'
30
+ cache-dependency-path: legacy/typescript/package-lock.json
31
+
32
+ - name: Install dependencies
33
+ run: npm ci
34
+
35
+ - name: Run linting
36
+ run: npm run lint
37
+
38
+ - name: Run tests
39
+ run: npm run test
40
+
41
+ - name: Build project
42
+ run: npm run build
43
+
44
+ - name: Sync server.json version with tag
45
+ run: |
46
+ if [[ "${GITHUB_REF}" != refs/tags/npm-v* ]]; then
47
+ echo "This workflow must be triggered from a tag that starts with npm-v"
48
+ exit 1
49
+ fi
50
+ VERSION="${GITHUB_REF#refs/tags/npm-v}"
51
+ tmp_file="$(mktemp)"
52
+ jq --arg v "$VERSION" '
53
+ .version = $v
54
+ | (if has("packages") and (.packages | length > 0) then
55
+ .packages = (.packages | map(.version = $v))
56
+ else
57
+ .
58
+ end)
59
+ ' server.json > "$tmp_file"
60
+ mv "$tmp_file" server.json
61
+
62
+ - name: Publish to NPM
63
+ run: |
64
+ set -euo pipefail
65
+ VERSION="${GITHUB_REF#refs/tags/npm-v}"
66
+ if npm view opik-mcp@"$VERSION" version >/dev/null 2>&1; then
67
+ echo "opik-mcp@$VERSION already exists on npm, skipping publish."
68
+ else
69
+ # Trusted Publishing via GitHub OIDC (id-token: write) - no npm token needed.
70
+ npm publish --provenance --access public
71
+ fi
72
+
73
+ - name: Install MCP Publisher
74
+ run: |
75
+ curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" \
76
+ | tar xz mcp-publisher
77
+
78
+ - name: Login to MCP Registry
79
+ run: ./mcp-publisher login github-oidc
80
+
81
+ - name: Publish to MCP Registry
82
+ run: ./mcp-publisher publish --file server.json
@@ -0,0 +1,30 @@
1
+ name: Python CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [ main ]
6
+ # Runs on every PR so this check resolves even when only top-level files
7
+ # (README.md, dependabot.yml, this workflow itself) change, which `legacy-ts-ci`'s
8
+ # `paths:` filter would skip. The lint+typecheck+test cycle is fast enough.
9
+
10
+ jobs:
11
+ ci:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Set up uv
19
+ uses: astral-sh/setup-uv@v3
20
+ with:
21
+ version: 'latest'
22
+
23
+ - name: Install Python
24
+ run: uv python install 3.13
25
+
26
+ - name: Install dependencies
27
+ run: uv sync --extra dev
28
+
29
+ - name: Run lint + typecheck + tests
30
+ run: make check
@@ -0,0 +1,53 @@
1
+ name: Python Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "py-v*"
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Set up uv
18
+ uses: astral-sh/setup-uv@v3
19
+
20
+ - name: Install Python
21
+ run: uv python install 3.13
22
+
23
+ - name: Install dependencies
24
+ run: uv sync --extra dev
25
+
26
+ - name: Run lint + typecheck + tests
27
+ run: make check
28
+
29
+ - name: Build sdist + wheel
30
+ run: uv build
31
+
32
+ - name: Upload build artifacts
33
+ uses: actions/upload-artifact@v4
34
+ with:
35
+ name: dist
36
+ path: dist/
37
+
38
+ publish-pypi:
39
+ needs: build
40
+ runs-on: ubuntu-latest
41
+ environment: pypi
42
+ permissions:
43
+ id-token: write
44
+
45
+ steps:
46
+ - name: Download build artifacts
47
+ uses: actions/download-artifact@v4
48
+ with:
49
+ name: dist
50
+ path: dist/
51
+
52
+ - name: Publish to PyPI (Trusted Publishing)
53
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,52 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ .venv/
8
+ venv/
9
+ env/
10
+ .uv/
11
+ dist/
12
+ build/
13
+ *.egg-info/
14
+ .pytest_cache/
15
+ .mypy_cache/
16
+ .ruff_cache/
17
+
18
+ # IDE
19
+ .vscode/
20
+ .idea/
21
+ *.swp
22
+ *.code-workspace
23
+
24
+ # OS
25
+ .DS_Store
26
+ Thumbs.db
27
+
28
+ # Env
29
+ .env
30
+ .env.local
31
+ .env.*.local
32
+
33
+ # Logs
34
+ *.log
35
+ logs/
36
+ *.lcov
37
+ coverage/
38
+
39
+ # Misc
40
+ .tmp
41
+ .temp
42
+
43
+ # Local-only docs (keep on disk, never tracked)
44
+ /docs/
45
+
46
+ # Legacy TypeScript (scoped paths)
47
+ legacy/typescript/node_modules/
48
+ legacy/typescript/build/
49
+ legacy/typescript/dist/
50
+ legacy/typescript/*.tsbuildinfo
51
+ legacy/typescript/coverage/
52
+ legacy/typescript/.cursor/mcp.json
@@ -0,0 +1,15 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it as below."
3
+ authors:
4
+ - family-names: "Comet ML, Inc"
5
+ given-names: ""
6
+ - family-names: "Koc"
7
+ given-names: "Vincent"
8
+ - family-names: "Boiko"
9
+ given-names: "Yaroslav"
10
+ title: "Opik MCP Server"
11
+ version: 1.0.0
12
+ date-released: 2025
13
+ repository-code: "https://github.com/comet-ml/opik-mcp"
14
+ doi: "10.5281/zenodo.15411156"
15
+ url: "https://doi.org/10.5281/zenodo.15411156"
opik_mcp-0.1.0/LICENSE ADDED
@@ -0,0 +1,203 @@
1
+ Copyright (c) Comet ML, Inc
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include
185
+ the brackets!) The text should be enclosed in the appropriate
186
+ comment syntax for the file format. We also recommend that a
187
+ file or class name and description of purpose be included on the
188
+ same "printed page" as the copyright notice for easier
189
+ identification within third-party archives.
190
+
191
+ Copyright 2024 Comet ML, Inc
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.