> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentarea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Oauth Preflight

> Report whether this instance can be authorized, and with what.

Every outcome is a 200: "this server has no OAuth" is an answer the UI
renders, not a failure it has to decode from an error response.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/mcp-oauth/preflight
openapi: 3.1.0
info:
  description: >-
    Modular and extensible framework for building AI agents. This API requires
    JWT Bearer token authentication for most endpoints. Include your JWT token
    in the Authorization header. Public endpoints include /, /health, /docs,
    /redoc, and /openapi.json.
  title: AgentArea API
  version: 0.1.0
servers: []
security:
  - bearer: []
paths:
  /v1/mcp-oauth/preflight:
    get:
      tags:
        - v1
        - protected
        - mcp-oauth-connect
      summary: Oauth Preflight
      description: |-
        Report whether this instance can be authorized, and with what.

        Every outcome is a 200: "this server has no OAuth" is an answer the UI
        renders, not a failure it has to decode from an error response.
      operationId: oauth_preflight_v1_mcp_oauth_preflight_get
      parameters:
        - description: MCP instance to inspect
          in: query
          name: instance_id
          required: true
          schema:
            description: MCP instance to inspect
            format: uuid
            title: Instance Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MCPOAuthPreflightResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    MCPOAuthPreflightResponse:
      description: |-
        What the UI needs before it can offer a Connect action.

        ``ready`` — Connect can run unattended (the server supports DCR).
        ``oauth_app_required`` — ask for a client ID/secret first.
        ``unsupported`` — this server cannot be authorized this way; say why.
      properties:
        authorization_endpoint:
          anyOf:
            - type: string
            - type: 'null'
          title: Authorization Endpoint
        connected:
          title: Connected
          type: boolean
        detail:
          default: ''
          title: Detail
          type: string
        instance_id:
          format: uuid
          title: Instance Id
          type: string
        issuer:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuer
        scopes:
          items:
            type: string
          title: Scopes
          type: array
        status:
          enum:
            - ready
            - oauth_app_required
            - unsupported
          title: Status
          type: string
      required:
        - instance_id
        - status
        - connected
      title: MCPOAuthPreflightResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: JWT Bearer token for authentication
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````