SDKs & MCP Forgebench MCP Installation & setup

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

Custom 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/mcp

For 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.com

Restart 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
FlagEffect
--tool claude|opencode|cursorLimit to one tool. Repeat it for several. Without it, every tool found on the machine is used.
--scope project|userproject (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-runShow 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 user entry.
  • With a plugin, the CLI still checks and may update its compatibility mcp_url setting. 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

  1. Install the plugin or add the server

    In Claude Code, run:

    claude plugin marketplace add seedlinglabs/forgebench-plugin
    claude plugin install forgebench@forgebench

    Then ask Claude Code to run /reload-plugins to 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-vscode or forgebench-opencode client id for a predictable pre-registered OAuth flow. ForgeBench also supports known client metadata, and deployments can enable dynamic registration. Client support varies.

  2. Sign in with OAuth

    1. 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 with opencode mcp list.
    2. Sign in on the browser page that opens, select your workspace, and approve access.
  3. 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 & Tools

Scan your repository to onboard agents and tools.

Cookie settings

Our Cookie Policy lists every cookie and what it does.