Forge MCP API

MCP sessions

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 2

GET /api/headless/v1/organizations/{organizationId}/mcp/sessions List MCP sessions #
POST /api/headless/v1/organizations/{organizationId}/mcp/sessions/{sessionId}/revoke Revoke MCP session #

Specifications

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-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-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Forge MCP 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
  description: MCP sessions
paths:
  /api/headless/v1/organizations/{organizationId}/mcp/sessions:
    get:
      operationId: listHeadlessMcpSessions
      tags:
      - MCP
      x-forge-audience: public_headless
      x-forge-capability-id: headless.mcp_sessions.read
      x-forge-required-permission: organization.manage
      x-forge-required-scopes:
      - headless_settings: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
          enum:
          - active
          - revoked
          - expired
      - name: actorType
        in: query
        schema:
          type: string
      - name: serviceAccountId
        in: query
        schema:
          type: string
      - name: clientId
        in: query
        schema:
          type: string
      - name: toolset
        in: query
        schema:
          type: string
      - name: scope
        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: Remote MCP client sessions visible to organization admins.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessMcpSessionListResponse'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
      summary: List MCP sessions
      description: List remote MCP client sessions, actor bindings, scopes, status, and last-used timestamps.
  /api/headless/v1/organizations/{organizationId}/mcp/sessions/{sessionId}/revoke:
    post:
      operationId: revokeHeadlessMcpSession
      tags:
      - MCP
      x-forge-audience: public_headless
      x-forge-capability-id: headless.mcp_sessions.revoke
      x-forge-required-permission: organization.manage
      x-forge-required-scopes:
      - headless_settings:write
      x-forge-risk-tier: admin
      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: sessionId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HeadlessSafetyFields'
      responses:
        '200':
          description: MCP session revoked in Forge state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessMcpSessionResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      summary: Revoke MCP session
      description: Revoke a remote MCP client session in Forge state with reason, idempotency, confirmation, and audit trail.
components:
  parameters:
    OrganizationId:
      name: organizationId
      in: path
      required: true
      schema:
        type: string
  schemas:
    HeadlessMcpSession:
      type: object
      required:
      - id
      - organizationId
      - actorType
      - scopes
      - status
      - issuedAt
      - lastUsedAt
      properties:
        id:
          type: string
        organizationId:
          type: string
        actorType:
          type: string
        actorDisplay:
          type: string
        mcpClientId:
          type: string
        serviceAccountId:
          type: string
        consoleUserId:
          type: string
        scopes:
          type: array
          items:
            type: string
        status:
          type: string
          enum:
          - active
          - revoked
        issuedAt:
          type: string
          format: date-time
        lastUsedAt:
          type: string
          format: date-time
        revokedAt:
          type: string
          format: date-time
        revokeReason:
          type: string
    HeadlessSafetyFields:
      type: object
      required:
      - reason
      - idempotencyKey
      - confirm
      properties:
        reason:
          type: string
        idempotencyKey:
          type: string
        dryRun:
          type: boolean
        confirm:
          type: boolean
    HeadlessMcpSessionResponse:
      type: object
      required:
      - session
      properties:
        session:
          $ref: '#/components/schemas/HeadlessMcpSession'
    MessageResponse:
      type: object
      required:
      - message
      properties:
        message:
          type: string
    HeadlessMcpSessionListResponse:
      type: object
      required:
      - sessions
      properties:
        sessions:
          type: array
          items:
            $ref: '#/components/schemas/HeadlessMcpSession'
  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