forgebench plugin for Claude Code
Connects Claude Code to the hosted forgebench MCP server and adds what the
server cannot ship by itself:
| Part | Path | What it does |
|---|
| MCP server entry | .mcp.json | An HTTP server named forgebench at the fixed URL https://api.forgebench.ai/mcp (hard-coded, not configurable). Sign-in is OAuth in the browser; no API key is configured anywhere. |
| Onboarding skill | skills/forgebench-onboarding/SKILL.md | The scan, review, plan and apply flow, budgets and limits, and browser-only agent keys. Loaded when you ask Claude to onboard a repo, change a budget or get an agent key. |
| Integration skill | skills/forgebench-integrate/SKILL.md | Integrating forgebench into a developer's own app: the gateway base URL, env vars, request parameters, metadata, sessions, streaming, error handling, agent keys and tool gating, using the forgebench_integrate recipe tool and checking the result with forgebench_integrate verify. |
| Local scanner | scripts/forgebench_scan.py | Finds agents and MCP servers in a repository and uploads a minimal forgebench.scan/v1 payload straight to forgebench with a single-use ticket. Prints only counts and a sha256. Needs Python 3.10+. |
| Sync hooks | hooks/hooks.json, scripts/forgebench_sync_launcher.py | Three exec-form hooks (SessionStart, SessionEnd, and PostToolUse for the Skill matcher) run the launcher, which starts forgebench sync --quiet --url <url> fully detached (double fork) and returns at once, inside the fixed 1.5 s SessionEnd budget. With the sync option off it exits before reading anything. POSIX only (#1060); without fork/setsid the launcher exits without syncing, and the Windows detach is #1146. Needs the forgebench CLI (see the forgebench_cli_path option). |
| Options | userConfig in .claude-plugin/plugin.json | forgebench_url (default https://api.forgebench.ai, where sync uploads), forgebench_cli_path (default forgebench, found on PATH or in ~/.local/bin), sync (Boolean, default on) and mcp_url (no longer used: the MCP URL is fixed; kept so existing managed settings stay valid). None is sensitive. |
| Manifests | .claude-plugin/plugin.json, .claude-plugin/marketplace.json | The plugin, and a one-plugin marketplace so this directory can be added as a marketplace. |
The server-side design, threat model and an end-to-end test runbook are in
docs/HOSTED-MCP.md.
Install for local testing
You need a running control plane (the local stack serves it at
http://localhost:8000) and Claude Code. The plugin connects to production
(https://api.forgebench.ai) by default. Session sync can be pointed at the local stack
with forgebench_url; the bundled MCP server is fixed to https://api.forgebench.ai/mcp
and cannot be redirected. From the repository root:
claude plugin marketplace add ./packages/forgebench-plugin
claude plugin install forgebench@forgebench \
--config forgebench_url=http://localhost:8000
Claude Code also prompts for the options when you install from /plugin.
The same works inside a session with /plugin marketplace add ./packages/forgebench-plugin
and /plugin install forgebench@forgebench. A marketplace added from a local
directory loads the plugin in place, so edits to the skill take effect after
/reload-plugins.
Then sign in once:
- Start
claude and run /mcp.
- Select the forgebench server (listed as coming from the plugin) and choose
Authenticate.
- In the browser: sign in (locally
[email protected] / ForgeDemo!2026), pick a
workspace if you belong to more than one, and approve access on the consent
page. The browser hands control back to Claude Code; the token lives in your
OS keychain.
Try it: "onboard this repo to forgebench", "set Researcher's monthly budget
to 40 dollars", "give me a key for Researcher". The server's prompts
onboard_repo, set_up_budgets and org_rollout_status also appear in the
/ menu, marked (MCP).
Server only (no skill, no scanner)
claude mcp add --transport http forgebench https://api.forgebench.ai/mcp
Every tool works, but there is no onboarding skill and no local scanner (the
model can only fall back to forgebench_onboarding with action submit_inline). If you add both,
Claude Code treats the plugin's server and yours as one server as long as they
point at the same URL.
Point the plugin at another deployment