opik-mcp: Command for Claude Code

.claude/commands/install-branch.md

install-branch is a command for Claude Code from comet-ml/opik-mcp. It costs 21 tokens per session (399 once invoked), scanned A, original, Apache-2.0.

A command that installs the current Git worktree as a local MCP server for sessions in that repository. MCP is a way for an application such as Claude Code to connect to external tools or services.

In plain words
What is it for?
Use it to install a branch-specific Opik MCP server, check its registration and workspace, and load it in Claude Code.
Why use it?
It lets you test the current branch's server in the repository without exposing credentials on the command line. It also reports whether the server was registered or reinstalled and how to reconnect it.

Command for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions Claude Code.

This is comet-ml/opik-mcp's own configuration. It tells Claude Code how to work on opik-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything opik-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to comet-ml/opik-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/comet-ml/opik-mcp/main/.claude/commands/install-branch.md
Clone the repo
git clone --depth 1 https://github.com/comet-ml/opik-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for install-branch

README.md
[![agentmods](https://agentmods.dev/badge/commands/comet-ml/opik-mcp/install-branch/github.svg)](https://agentmods.dev/commands/comet-ml/opik-mcp/install-branch)
Your own site
<a href="https://agentmods.dev/commands/comet-ml/opik-mcp/install-branch"><img src="https://agentmods.dev/badge/commands/comet-ml/opik-mcp/install-branch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for install-branch

Your own site · 80×15
<a href="https://agentmods.dev/commands/comet-ml/opik-mcp/install-branch"><img src="https://agentmods.dev/badge/commands/comet-ml/opik-mcp/install-branch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 399 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.00399
Opus 5.5 $0.00008 $0.00160
Sonnet 5.5 $0.00004 $0.00080
Haiku 4.5 $0.00002 $0.00040

Measured 24d ago against content hash 13b5d086df77, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

install-branch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 24d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/install-branch.md · 29 lines

What it actually says

Install this worktree as an MCP server and tell me how to load it.

  1. Run make install-branch $ARGUMENTS. The server name comes from the branch (OPIK-8480-… becomes opik-8480); NAME= and WORKSPACE= override it. Credentials come from OPIK_* env vars, then ~/.opik.config. Never pass an API key on the command line and never print one.
  2. If it fails for missing credentials, tell me to run opik configure or set the env vars. Don't try to find a key yourself.
  3. Check the result with claude mcp get opik-<name> and report the status line, URL and workspace. Don't show the environment block; it holds the key.
  4. Say what to do next, based on the last line the target printed:
    • "Registered": a new server. Restart Claude Code to load it.
    • "Reinstalled": run /mcp and reconnect opik-<name>.

The server is registered at local scope, so it loads only in sessions inside this repo; each one adds its instructions to them (budgeted in tests/conformance/test_tool_inventory.py). For a one-off comparison with main, use /dogfood instead: it registers nothing.

The install is a snapshot of the tree. After changing code, run it again. make uninstall-branch removes the server and its venv; do that when done.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 24d ago First seen · 29 lines · 21 tokens per session scan A 13b5d086df77

Subscribe to this mod's changes

install-branch is a command published in the GitHub repository comet-ml/opik-mcp (223 stars, last pushed 2d ago), licensed Apache-2.0. It adds 21 tokens to every session and 399 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-25.