Both surfaces use Streamable HTTP. Forge MCP currently negotiates MCP protocol
version
2025-06-18.
Forge MCP
Discovery
Add this remote server URL to a Streamable HTTP client:WWW-Authenticate challenge with the
protected-resource metadata URL. The canonical metadata document is:
Authentication
Interactive clients use OAuth 2.1 for the MCP resource audience. The resulting grant preserves the user identity, organization, role, scopes, and client identity. REST API access tokens use a different audience and are rejected. Non-interactive clients that support custom authorization headers can use a Forge service-account bearer token withmcp:connect and the scopes required
by the selected tools.
Protocol methods
Other methods return JSON-RPC
-32601.
The initialize, ping, and tool responses include MCP-Session-Id. Send that
header on subsequent requests. A revoked session cannot be silently recreated
with the same identifier.
Tool selection
Forge defaults to themetadata and default-read toolsets. A client can
request an explicit comma-separated selection before session creation:
tools/list still removes any tool whose capability is denied
by role, scope, read-only mode, or destructive-tool policy.
See Tool Reference for tool names, response envelopes,
and authorization metadata.
Connect an approved server
You can connect a Streamable HTTP client directly with the hosted endpoint shown on the Registry server:redirect_uri from the authorization error. An administrator can add it under
Registry > server > Settings > Client callback policy. Organizations with
no callback rules accept valid callbacks by default; once any rule exists, an
Allow rule must match and Block rules take precedence.
Forge CLI installs an approved registry server into Claude Code or Codex,
creates a gateway credential for that client installation, and records the
installation in the active Forge profile:
--config PATH when the client configuration is not in its default
location. The CLI modifies only the selected server entry and preserves
unrelated client configuration. On supported systems, its gateway token is
stored in the operating-system keychain rather than in the client
configuration.
forge mcp run SERVER starts a local stdio bridge for clients that cannot
connect to the remote Streamable HTTP endpoint.
Two authentication boundaries
A registry definition determines whether the upstream server uses an organization credential, a per-user credential, or OAuth. Gateway and upstream credentials are separate: the first authenticates the client to Forge; the second authenticates Forge to the upstream server.
Rotating or revoking a gateway token does not change the upstream server
credential. Disconnecting upstream OAuth does not make a revoked gateway token
valid again.
Discover and register an OAuth-capable upstream:
--redirect-uri, --no-discovery, and
--no-persist for providers whose registration lifecycle requires explicit
control.
Manage gateway tokens
Use a separate gateway token for each client installation. This keeps access independently attributable and lets you rotate or revoke one client without interrupting the others.Issue and store
forge mcp install handles token issuance and secure local storage
automatically. To create a token for another supported client workflow:
Inspect, rotate, and revoke
List a server’s tokens to review their IDs, client names, status, expiry, and last-used time:Uninstall
Remove a Registry server from a local client with:Authorization
Forge reevaluates everytools/list and tools/call. A tool is callable only
when all applicable gates pass:
- MCP is enabled for the organization.
- The actor has the
mcp.connectcapability andmcp:connectscope. - The session selected the tool’s toolset.
- The capability supports MCP and the actor has its required permission and scopes.
- Organization read-only and destructive-tool settings allow the capability.
- The call arguments satisfy the advertised JSON Schema.
- Guarded mutations contain the required reason, idempotency key, dry-run, and confirmation inputs.
Results and errors
Successfultools/call results contain both MCP text content and a structured
result:
When an underlying Forge API operation returns a non-2xx result, MCP returns a
tool result with
isError: true and a bounded Forge error payload. It does not
convert that domain error into a JSON-RPC transport error.
Tool output is bounded. Large responses indicate truncation or expose
pagination fields; continue with the returned cursor or offset rather than
assuming the first result is exhaustive.
Correlation
Applications using both the Forge LLM Gateway and MCP Gateway can bind atools/call request to the LLM tool call that caused it:
Forge accepts the binding only when the parent event exists in the same
organization and is a tool event. Invalid correlation is ignored; it never
grants access, changes a policy decision, or reaches the upstream MCP server.
Sessions
Tool Reference
Review Forge MCP tools and their runtime metadata.
Commands
Review MCP registry and session commands.
MCP Gateway
Understand policy and response controls for upstream MCP traffic.
MCP Requests
Review the MCP request and approval model.