Forge MCP Registry API

MCP and skill registry

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 18

GET /api/headless/v1/organizations/{organizationId}/mcp-registry List MCP registry #
POST /api/headless/v1/organizations/{organizationId}/mcp-registry/oauth/discover Discover MCP registry OAuth #
GET /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemRef} Get MCP registry item #
POST /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemId}/oauth/register-upstream Register MCP registry upstream OAuth #
POST /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemRef}/cli-install Install MCP registry item #
POST /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemRef}/cli-uninstall Uninstall MCP registry item #
GET /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemRef}/tokens List MCP registry gateway tokens #
POST /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemRef}/tokens Issue MCP registry gateway token #
POST /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemRef}/tokens/{tokenId}/rotate Rotate MCP registry gateway token #
POST /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemRef}/tokens/{tokenId}/revoke Revoke MCP registry gateway token #
GET /api/headless/v1/organizations/{organizationId}/skill-registry List skill registry #
GET /api/headless/v1/organizations/{organizationId}/skill-registry/{itemRef} Get skill registry item #
POST /api/headless/v1/organizations/{organizationId}/skill-registry/{itemRef}/cli-install Install skill registry item #
POST /api/headless/v1/organizations/{organizationId}/skill-registry/{itemRef}/cli-uninstall Uninstall skill registry item #
POST /api/headless/v1/organizations/{organizationId}/mcp-deployments Create MCP deployment #
POST /api/headless/v1/organizations/{organizationId}/mcp-deployments/validate Validate MCP deployment #
GET /api/headless/v1/organizations/{organizationId}/mcp-deployments/{deploymentRef} Get MCP deployment #
POST /api/headless/v1/organizations/{organizationId}/mcp-deployments/{deploymentRef}/deploy Deploy MCP deployment #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/forge:forge-mcp-registry-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

forge-mcp-registry-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Forge MCP Registry API
  version: 0.1.0
  description: Automate Forge inventory, investigations, findings, governance, fleet, policy, configuration, compliance, MCP, service-account, and audit workflows.
servers:
- url: https://api.forge.ai
  description: Forge production API
security:
- serviceAccountBearer: []
tags:
- name: mcp-registry
  description: MCP and skill registry
paths:
  /api/headless/v1/organizations/{organizationId}/mcp-registry:
    get:
      operationId: listHeadlessMcpRegistry
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_registry.read
      x-forge-required-permission: mcp_approvals.request.view
      x-forge-required-scopes:
      - mcp_registry:read
      x-forge-risk-tier: sensitive_read
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: query
        in: query
        schema:
          type: string
      - name: status
        in: query
        schema:
          type: string
      - name: requesterConsoleUserId
        in: query
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
      - name: offset
        in: query
        schema:
          type: integer
          minimum: 0
      responses:
        '200':
          description: MCP registry servers visible to the current actor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
      summary: List MCP registry
      description: List Forge MCP registry servers visible to the current user and inspect local client installation state.
  /api/headless/v1/organizations/{organizationId}/mcp-registry/oauth/discover:
    post:
      operationId: discoverHeadlessMcpRegistryOAuth
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_registry.manage
      x-forge-required-permission: policy.manage
      x-forge-required-scopes:
      - mcp_registry:write
      x-forge-risk-tier: sensitive_write
      x-forge-stability: beta
      x-forge-idempotency-required: true
      x-forge-reason-required: true
      x-forge-confirmation-required: true
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: OAuth discovery result for an upstream MCP server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
      summary: Discover MCP registry OAuth
      description: Register and administer Forge MCP registry servers and gateway configuration.
  /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemRef}:
    get:
      operationId: getHeadlessMcpRegistryItem
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_registry.read
      x-forge-required-permission: mcp_approvals.request.view
      x-forge-required-scopes:
      - mcp_registry:read
      x-forge-risk-tier: sensitive_read
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: itemRef
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: MCP registry server detail.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      summary: Get MCP registry item
      description: List Forge MCP registry servers visible to the current user and inspect local client installation state.
  /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemId}/oauth/register-upstream:
    post:
      operationId: registerHeadlessMcpRegistryUpstreamOAuth
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_registry.manage
      x-forge-required-permission: policy.manage
      x-forge-required-scopes:
      - mcp_registry:write
      x-forge-risk-tier: sensitive_write
      x-forge-stability: beta
      x-forge-idempotency-required: true
      x-forge-reason-required: true
      x-forge-confirmation-required: true
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: itemId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: Upstream OAuth DCR or CIMD setup result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      summary: Register MCP registry upstream OAuth
      description: Register and administer Forge MCP registry servers and gateway configuration.
  /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemRef}/cli-install:
    post:
      operationId: installHeadlessMcpRegistryItem
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_registry.install
      x-forge-required-permission: mcp_approvals.request.create
      x-forge-required-scopes:
      - mcp_registry:write
      x-forge-risk-tier: safe_write
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: itemRef
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: User-local MCP registry install with one-time gateway token material.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      summary: Install MCP registry item
      description: Create or remove a user-local Forge MCP registry install and mint or revoke the gateway token used by local clients.
  /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemRef}/cli-uninstall:
    post:
      operationId: uninstallHeadlessMcpRegistryItem
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_registry.install
      x-forge-required-permission: mcp_approvals.request.create
      x-forge-required-scopes:
      - mcp_registry:write
      x-forge-risk-tier: safe_write
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: itemRef
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: User-local MCP registry uninstall result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      summary: Uninstall MCP registry item
      description: Create or remove a user-local Forge MCP registry install and mint or revoke the gateway token used by local clients.
  /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemRef}/tokens:
    get:
      operationId: listHeadlessMcpRegistryGatewayTokens
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_registry.read
      x-forge-required-permission: mcp_approvals.request.view
      x-forge-required-scopes:
      - mcp_registry:read
      x-forge-risk-tier: sensitive_read
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: itemRef
        in: path
        required: true
        description: Readable MCP registry slug or item identifier.
        schema:
          type: string
      responses:
        '200':
          description: Non-secret gateway token metadata for the current user's installation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpGatewayTokenListResponse'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      summary: List MCP registry gateway tokens
      description: List Forge MCP registry servers visible to the current user and inspect local client installation state.
    post:
      operationId: issueHeadlessMcpRegistryGatewayToken
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_registry.install
      x-forge-required-permission: mcp_approvals.request.create
      x-forge-required-scopes:
      - mcp_registry:write
      x-forge-risk-tier: safe_write
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: itemRef
        in: path
        required: true
        description: Readable MCP registry slug or item identifier.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
              - name
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 80
                  description: Human-readable client label shown in token lists.
                scopes:
                  type: array
                  items:
                    type: string
                    enum:
                    - mcp:connect
                  minItems: 1
                  maxItems: 1
                  uniqueItems: true
                  default:
                  - mcp:connect
                expiresInDays:
                  type: integer
                  minimum: 1
                  maximum: 365
                  default: 90
      responses:
        '201':
          description: One-time gateway token secret plus non-secret metadata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpGatewayTokenIssueResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      summary: Issue MCP registry gateway token
      description: Create or remove a user-local Forge MCP registry install and mint or revoke the gateway token used by local clients.
  /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemRef}/tokens/{tokenId}/rotate:
    post:
      operationId: rotateHeadlessMcpRegistryGatewayToken
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_registry.install
      x-forge-required-permission: mcp_approvals.request.create
      x-forge-required-scopes:
      - mcp_registry:write
      x-forge-risk-tier: safe_write
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: itemRef
        in: path
        required: true
        description: Readable MCP registry slug or item identifier.
        schema:
          type: string
      - name: tokenId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 80
                scopes:
                  type: array
                  items:
                    type: string
                    enum:
                    - mcp:connect
                  minItems: 1
                  maxItems: 1
                  uniqueItems: true
                expiresInDays:
                  type: integer
                  minimum: 1
                  maximum: 365
                  default: 90
      responses:
        '201':
          description: Replacement one-time gateway token secret; the previous token is revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpGatewayTokenIssueResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
      summary: Rotate MCP registry gateway token
      description: Create or remove a user-local Forge MCP registry install and mint or revoke the gateway token used by local clients.
  /api/headless/v1/organizations/{organizationId}/mcp-registry/{itemRef}/tokens/{tokenId}/revoke:
    post:
      operationId: revokeHeadlessMcpRegistryGatewayToken
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_registry.install
      x-forge-required-permission: mcp_approvals.request.create
      x-forge-required-scopes:
      - mcp_registry:write
      x-forge-risk-tier: safe_write
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: itemRef
        in: path
        required: true
        description: Readable MCP registry slug or item identifier.
        schema:
          type: string
      - name: tokenId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Revoked gateway token metadata; plaintext is never returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpGatewayTokenListResponse'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      summary: Revoke MCP registry gateway token
      description: Create or remove a user-local Forge MCP registry install and mint or revoke the gateway token used by local clients.
  /api/headless/v1/organizations/{organizationId}/skill-registry:
    get:
      operationId: listHeadlessSkillRegistry
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_registry.read
      x-forge-required-permission: mcp_approvals.request.view
      x-forge-required-scopes:
      - mcp_registry:read
      x-forge-risk-tier: sensitive_read
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: status
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Skill registry items visible to the current actor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
      summary: List skill registry
      description: List Forge MCP registry servers visible to the current user and inspect local client installation state.
  /api/headless/v1/organizations/{organizationId}/skill-registry/{itemRef}:
    get:
      operationId: getHeadlessSkillRegistryItem
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_registry.read
      x-forge-required-permission: mcp_approvals.request.view
      x-forge-required-scopes:
      - mcp_registry:read
      x-forge-risk-tier: sensitive_read
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: itemRef
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Skill registry item detail.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      summary: Get skill registry item
      description: List Forge MCP registry servers visible to the current user and inspect local client installation state.
  /api/headless/v1/organizations/{organizationId}/skill-registry/{itemRef}/cli-install:
    post:
      operationId: installHeadlessSkillRegistryItem
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_registry.install
      x-forge-required-permission: mcp_approvals.request.create
      x-forge-required-scopes:
      - mcp_registry:write
      x-forge-risk-tier: safe_write
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: itemRef
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: User-local skill registry install with local file material.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      summary: Install skill registry item
      description: Create or remove a user-local Forge MCP registry install and mint or revoke the gateway token used by local clients.
  /api/headless/v1/organizations/{organizationId}/skill-registry/{itemRef}/cli-uninstall:
    post:
      operationId: uninstallHeadlessSkillRegistryItem
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_registry.install
      x-forge-required-permission: mcp_approvals.request.create
      x-forge-required-scopes:
      - mcp_registry:write
      x-forge-risk-tier: safe_write
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: itemRef
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: User-local skill registry uninstall result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      summary: Uninstall skill registry item
      description: Create or remove a user-local Forge MCP registry install and mint or revoke the gateway token used by local clients.
  /api/headless/v1/organizations/{organizationId}/mcp-deployments:
    post:
      operationId: createHeadlessMcpDeployment
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_deployments.prepare
      x-forge-required-permission: policy.manage
      x-forge-required-scopes:
      - mcp_registry:write
      x-forge-risk-tier: safe_write
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '201':
          description: Created custom MCP deployment draft and starter Forge deployment config.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
      summary: Create MCP deployment
      description: Initialize, validate, and inspect custom Docker MCP deployments before they are registered behind Forge gateway protection.
  /api/headless/v1/organizations/{organizationId}/mcp-deployments/validate:
    post:
      operationId: validateHeadlessMcpDeployment
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_deployments.prepare
      x-forge-required-permission: policy.manage
      x-forge-required-scopes:
      - mcp_registry:write
      x-forge-risk-tier: safe_write
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: Custom MCP deployment config validation with masked environment values.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
      summary: Validate MCP deployment
      description: Initialize, validate, and inspect custom Docker MCP deployments before they are registered behind Forge gateway protection.
  /api/headless/v1/organizations/{organizationId}/mcp-deployments/{deploymentRef}:
    get:
      operationId: getHeadlessMcpDeployment
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_deployments.prepare
      x-forge-required-permission: policy.manage
      x-forge-required-scopes:
      - mcp_registry:write
      x-forge-risk-tier: safe_write
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: deploymentRef
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Custom MCP deployment detail and gateway registration state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      summary: Get MCP deployment
      description: Initialize, validate, and inspect custom Docker MCP deployments before they are registered behind Forge gateway protection.
  /api/headless/v1/organizations/{organizationId}/mcp-deployments/{deploymentRef}/deploy:
    post:
      operationId: deployHeadlessMcpDeployment
      tags:
      - mcp-registry
      x-forge-audience: public_headless
      x-forge-capability-id: mcp_deployments.deploy
      x-forge-required-permission: policy.manage
      x-forge-required-scopes:
      - mcp_registry:write
      x-forge-risk-tier: sensitive_write
      x-forge-idempotency-required: true
      x-forge-reason-required: true
      x-forge-confirmation-required: true
      x-forge-stability: beta
      parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - name: deploymentRef
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: Submitted custom MCP deployment revision and registered/updated its Forge gateway MCP server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      summary: Deploy MCP deployment
      description: Submit a custom Docker MCP deployment revision and register or update its Forge gateway-protected registry server.
components:
  schemas:
    McpGatewayTokenListResponse:
      type: object
      additionalProperties: false
      required:
      - tokens
      properties:
        tokens:
          type: array
          items:
            $ref: '#/components/schemas/McpGatewayTokenMetadata'
    McpGatewayTokenMetadata:
      type: object
      additionalProperties: false
      required:
      - id
      - tokenPrefix
      - scopes
      - clientId
      - clientName
      - registryItemId
      - subjectKind
      - subjectId
      - status
      - createdAt
      properties:
        id:
          type: string
        tokenPrefix:
          type: string
          description: Non-secret prefix for identifying the credential.
        scopes:
          type: array
          items:
            type: string
            enum:
            - mcp:connect
          minItems: 1
          maxItems: 1
        clientId:
          type: string
        clientName:
          type: string
        registryItemId:
          type: string
        subjectKind:
          type: string
          enum:
          - user
        subjectId:
          type: string
        status:
          type: string
          enum:
          - active
          - expired
          - revoked
        expiresAt:
          type: string
          format: date-time
        lastUsedAt:
          type: string
          format: date-time
        revokedAt:
          type: string
          format: date-time
        revokeReason:
          type: string
        createdAt:
          type: string
          format: date-time
    McpGatewayTokenIssueResponse:
      type: object
      additionalProperties: false
      required:
      - token
      - gatewayToken
      - message
      properties:
        token:
          $ref: '#/components/schemas/McpGatewayTokenMetadata'
        gatewayToken:
          type: string
          pattern: ^forge_mcp_[A-Za-z0-9_-]+$
          description: One-time plaintext secret. Forge retains only its hash.
        message:
          type: string
    MessageResponse:
      type: object
      required:
      - message
      properties:
        message:
          type: string
    HeadlessProxyResponse:
      type: object
      additionalProperties: true
  parameters:
    OrganizationId:
      name: organizationId
      in: path
      required: true
      schema:
        type: string
  responses:
    Error:
      description: Stable Forge error envelope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
  securitySchemes:
    serviceAccountBearer:
      type: http
      scheme: bearer
      bearerFormat: Forge service-account or delegated OAuth access token
      description: Enter a Forge service-account token or delegated OAuth access token. Mintlify adds the Bearer prefix.
x-forge-audience: public_headless
x-forge-stability: beta