Installation & Setup
Supported environments
# 1. Add marketplace source & install plugin
claude plugin marketplace add seedlinglabs/forgebench-plugin
claude plugin install forgebench@forgebench
# 2. Start Claude Code. In the active session, ask your agent to run /reload-plugins.
# 3. Run /mcp and choose 'forgebench' -> 'Authenticate'
claude// Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project)
{
"mcpServers": {
"forgebench": {
"url": "https://api.forgebench.ai/mcp",
"auth": {
"CLIENT_ID": "forgebench-cursor",
"scopes": ["forgebench:read", "forgebench:write"]
}
}
}
}# 1. Add the server (writes to ~/.codex/config.toml)
codex mcp add forgebench --url https://api.forgebench.ai/mcp --oauth-client-id forgebench-codex
# 2. Sign in (opens your browser)
codex mcp login forgebench
# Or add this to ~/.codex/config.toml by hand, then run step 2:
# [mcp_servers.forgebench]
# url = "https://api.forgebench.ai/mcp"
# oauth_resource = "https://api.forgebench.ai/mcp"
# default_tools_approval_mode = "writes"
#
# [mcp_servers.forgebench.oauth]
# client_id = "forgebench-codex"
#
# [mcp_servers.forgebench.tools.forgebench_apply_plan]
# approval_mode = "prompt"// Add to .vscode/mcp.json (workspace), or run "MCP: Open User Configuration"
{
"servers": {
"forgebench": {
"type": "http",
"url": "https://api.forgebench.ai/mcp",
"oauth": { "clientId": "forgebench-vscode" }
}
}
}// Add to ~/.config/opencode/opencode.json (all projects) or opencode.json (one project)
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"forgebench": {
"type": "remote",
"url": "https://api.forgebench.ai/mcp",
"oauth": { "clientId": "forgebench-opencode" }
}
}
}
// Then sign in (opens your browser):
// opencode mcp auth forgebenchCustom or on-premises deployment
The plugin's MCP server is fixed to the hosted endpoint, https://api.forgebench.ai/mcp
(the dev and staging editions of the plugin point at their own deployments).
The plugin's mcp_url option is kept for compatibility but is ignored, so it
cannot redirect MCP. Hosted users need no --config at all.
Self-hosted installs: the plugin can no longer point Claude Code at your
MCP server. Setting forgebench_url still sends session sync to your
deployment, but to use your own MCP endpoint, register it directly instead of
through the plugin, replacing https://forgebench.example.com with your
deployment's API origin (not the console URL):
claude mcp add --transport http --scope user forgebench https://forgebench.example.com/mcpFor session sync only, install the plugin with the sync target:
claude plugin marketplace add seedlinglabs/forgebench-plugin
claude plugin install forgebench@forgebench \
--config forgebench_url=https://forgebench.example.comRestart Claude Code or run /reload-plugins, then run /mcp, select
forgebench, and choose Authenticate. Sign in through your organization's
identity provider, select your workspace if prompted, and approve access. No
API key, client secret, or separate Claude Code OAuth client registration is
needed.
Administrator: prepare OAuth
The Forgebench control plane provides the MCP and OAuth endpoints. Configure
its externally reachable HTTPS API origin as NEXT_PUBLIC_API_URL (Helm:
config.publicApiUrl), without /mcp, and configure the deployment's identity
provider and a stable STUDIO_KEK shared across replicas. Developers' machines
and browsers must be able to reach the API and sign-in page. Claude Code's
OAuth client metadata is included with Forgebench; dynamic client registration
is not required for Claude Code.
Check https://forgebench.example.com/.well-known/oauth-protected-resource/mcp
and https://forgebench.example.com/.well-known/oauth-authorization-server
from a developer machine. Both should return metadata advertising the same API
origin. If they return a 503, check the public API URL and signing-key settings.
For a managed fleet, the forgebench_rollout_kit can provide the deployment's
Claude Code settings instead of configuring each developer separately.
Install with the CLI
forgebench mcp writes the server entry from the tabs above for Claude Code, OpenCode and Cursor, so you don't edit the files by hand. It writes no key or token: you sign in with OAuth in the tool, as in step 2 below.
forgebench mcp install # this repository's config; run it inside a git repository
forgebench mcp status # what is installed, in the project and user scope
forgebench mcp remove # removes only the entries `install` wrote| Flag | Effect |
|---|---|
--tool claude|opencode|cursor | Limit to one tool. Repeat it for several. Without it, every tool found on the machine is used. |
--scope project|user | project (default) writes .mcp.json, opencode.json and .cursor/mcp.json in the repository and never commits them. user writes your own config. status reports both unless you name one. |
--forgebench-url <url> | The MCP URL is this URL plus /mcp. The default is the control plane the CLI uses (https://api.forgebench.ai unless you set FORGEBENCH_URL). |
--dry-run | Show what would change and write nothing. |
Set FORGEBENCH_MCP_URL to use a different MCP URL, for example http://localhost:8000/mcp for a local stack. It must be a plain http(s) URL with no credentials or query string.
Running install again changes nothing. remove deletes only the entries install wrote, for the URL it would write: an entry you edited, or one that points at another URL, is left alone with a message. install also leaves an entry you edited, or one that points at another URL, alone and exits with 1. A file that is not valid JSON, or whose server section is not an object, is left untouched and reported. OpenCode comments and formatting are preserved.
On OpenCode, mcp install and mcp remove write and remove the direct mcp.forgebench entry with its forgebench-opencode client id, in both scopes, whether or not the @forgebench/opencode plugin is installed. They never create or change the plugin entry or its options. To install the plugin itself without the CLI, see Install OpenCode without the CLI. If the plugin entry already has its mcp option on, mcp install warns and writes nothing, because the endpoint would be registered twice; mcp status reports the same clash. Turn the option off in the plugin entry of your OpenCode config first.
Claude Code direct registration uses claude mcp add --transport http. It can
authenticate through its published client metadata without a fixed client ID.
The plugin bundled at this revision supplies a fixed hosted URL in .mcp.json.
Its compatibility mcp_url setting does not redirect that connection.
With --scope user:
- With no plugin, the CLI adds a direct
claude mcp add --scope userentry. - With a plugin, the CLI still checks and may update its compatibility
mcp_urlsetting. That status is not proof of the plugin's effective URL. For a custom deployment, use the direct registration command above and inspect the active server in/mcp. Avoid enabling both a plugin server and a direct server for the same endpoint. - The CLI leaves an edited direct entry alone. It does not start OAuth login.
With --scope project, the CLI reuses a plugin whose saved mcp_url matches,
or adds a project entry otherwise. The fixed-URL plugin caveat still applies.
Teammates approve a project-scoped Claude Code server when they first open the
repository.
status never starts a sign-in, so it reports authorization as not checked. Restart the tool, then sign in as described in step 2.
Step-by-step setup
Install the plugin or add the server
In Claude Code, run:
claude plugin marketplace add seedlinglabs/forgebench-plugin claude plugin install forgebench@forgebenchThen ask Claude Code to run
/reload-pluginsto load the plugin in the current session.In Cursor, Codex, VS Code or OpenCode, add the server with the config from the matching tab above. Keep the
forgebench-cursor,forgebench-codex,forgebench-vscodeorforgebench-opencodeclient id for a predictable pre-registered OAuth flow. ForgeBench also supports known client metadata, and deployments can enable dynamic registration. Client support varies.Sign in with OAuth
- Start the sign-in:
- Claude Code: run
/mcp, select forgebench, and choose Authenticate. - Cursor: open Cursor Settings → Tools & MCP. forgebench is listed as Needs authentication; click Connect.
- Codex: run
codex mcp login forgebench. - VS Code: run MCP: List Servers, select forgebench, and choose Start Server. VS Code opens a browser window to sign in on the first connection.
- OpenCode: run
opencode mcp auth forgebench. Check the result withopencode mcp list.
- Claude Code: run
- Sign in on the browser page that opens, select your workspace, and approve access.
- Start the sign-in:
Verify connection
Type in chat:
"Who am I in Forgebench?"
Your assistant shows your active workspace, your role and the default agent policies.
Troubleshooting setup issues
No forgebench tools available, or tools not responding. Ask Claude Code to
run /reload-plugins. Then run /mcp, select forgebench, and check that it
shows as connected. If authentication expired, choose Authenticate.
Connected to the wrong workspace. Each MCP session is bound to one
workspace. Run /mcp, select forgebench, re-authenticate, and pick the
workspace from the organization picker.
Next
Onboarding Agents & ToolsScan your repository to onboard agents and tools.

