gen-orb-mcp: Getting Started
Quick start guide for gen-orb-mcp — generate MCP servers from CircleCI orb definitions.
A code generation tool that transforms CircleCI orb definitions into MCP (Model Context Protocol) servers, enabling AI assistants to understand your private orb's commands, jobs, and executors — and to guide users through breaking-change migrations interactively.
Installation
From Crates.io
With cargo-binstall (pre-compiled binary)
Verify Installation
Scenario A: Basic orb documentation server
You have a private CircleCI orb and want Claude Code (or another AI assistant) to understand it.
Step 1 — Generate the MCP server source code
Step 2 — Compile to a binary
&&
# Binary is at: my-orb-mcp/target/release/my_orb_mcp
Step 3 — Connect to Claude Code
Add the binary to .claude.json (project-level) or claude_desktop_config.json:
The AI assistant can now answer questions about your orb's commands, jobs, executors, and parameters.
Scenario B: Multi-version server with migration Tools
You have a breaking change in your orb and want the AI assistant to help users migrate.
Step 1 — Save the previous orb version
Step 2 — Compute conformance rules
The output is a JSON file describing what changed: renamed jobs, removed parameters, absorbed jobs, and so on.
Step 3 — Generate the server with everything embedded
&&
The generated server now exposes:
- Current-version resources (
orb://commands/...,orb://jobs/...) - Prior-version resources (
orb://v4.7.1/commands/...) - A version index at
orb://versions plan_migrationandapply_migrationMCP Tools
Step 4 — Use with Claude Code
With the MCP server connected, you can ask Claude:
"My .circleci/config.yml uses my-orb@4.7.1. Plan a migration to 5.0.0."
Claude calls plan_migration, shows you the diff, and on approval calls apply_migration
to update the files in place.
Scenario C: Automated history with prime
prime automates Scenario B's manual steps for an entire version history:
# Rolling 6-month window (default)
# Anchor at a specific earliest version (to cover your full install base)
prime discovers all semver tags in the repository, snapshots each version's orb YAML, and
computes conformance diffs between consecutive versions. It is idempotent — existing files are
not overwritten; out-of-window files are removed.
For use in CI with ephemeral paths:
# → PRIME_PV_DIR and PRIME_MIG_DIR are now set
Scenario D: Bulk CLI migration (no MCP server needed)
Apply migration rules directly from the command line to update consumer CI directories:
# Dry run — see what would change without writing any files
# Apply changes
Integrating into a release pipeline
In your orb's CircleCI release workflow, add steps after the orb is published:
- run:
name: Generate migration rules
command: |
gen-orb-mcp diff \
--current src/@orb.yml \
--previous prior-versions/$(cat previous-version.txt).yml \
--since-version "$ORB_VERSION" \
--output migrations/"$ORB_VERSION".json
- run:
name: Generate and compile MCP server
command: |
gen-orb-mcp generate \
--orb-path src/@orb.yml \
--output dist/mcp \
--version "$ORB_VERSION" \
--migrations migrations/ \
--prior-versions prior-versions/ \
--force
cd dist/mcp && cargo build --release
See Also
- CLI Reference — Full command and option documentation
- Migration Guide — Conformance-based migration design and orb author guidance
- Repository — Source code and issue tracking
- API Documentation — Generated Rust API reference