fly-io · Capability

Fly.io Extensions API — OAuth

Fly.io Extensions API — OAuth. 3 operations. Lead operation: OAuth authorization endpoint. Self-contained Naftiko capability covering one Fly Io business surface.

Run with Naftiko Fly IoOAuth

What You Can Do

GET
Oauthauthorize — OAuth authorization endpoint
/v1/oauth/authorize
POST
Oauthtoken — Exchange authorization code for access token
/v1/oauth/token
GET
Gettokeninfo — Get OAuth token information
/v1/oauth/token/info

MCP Tools

oauth-authorization-endpoint

OAuth authorization endpoint

read-only idempotent
exchange-authorization-code-access-token

Exchange authorization code for access token

get-oauth-token-information

Get OAuth token information

read-only idempotent

Capability Spec

extensions-oauth.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Fly.io Extensions API — OAuth
  description: 'Fly.io Extensions API — OAuth. 3 operations. Lead operation: OAuth authorization endpoint. Self-contained
    Naftiko capability covering one Fly Io business surface.'
  tags:
  - Fly Io
  - OAuth
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    FLY_IO_API_KEY: FLY_IO_API_KEY
capability:
  consumes:
  - type: http
    namespace: extensions-oauth
    baseUri: https://{provider_base_url}
    description: Fly.io Extensions API — OAuth business capability. Self-contained, no shared references.
    resources:
    - name: oauth-authorize
      path: /oauth/authorize
      operations:
      - name: oauthauthorize
        method: GET
        description: OAuth authorization endpoint
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: client_id
          in: query
          type: string
          description: OAuth client ID issued to the extension provider by Fly.io.
          required: true
        - name: response_type
          in: query
          type: string
          description: OAuth response type. Must be code for the authorization code flow.
          required: true
        - name: redirect_uri
          in: query
          type: string
          description: Provider callback URL to redirect the user to after authorization.
          required: true
        - name: scope
          in: query
          type: string
          description: Space-separated list of requested OAuth scopes.
    - name: oauth-token
      path: /oauth/token
      operations:
      - name: oauthtoken
        method: POST
        description: Exchange authorization code for access token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: oauth-token-info
      path: /oauth/token/info
      operations:
      - name: gettokeninfo
        method: GET
        description: Get OAuth token information
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.FLY_IO_API_KEY}}'
  exposes:
  - type: rest
    namespace: extensions-oauth-rest
    port: 8080
    description: REST adapter for Fly.io Extensions API — OAuth. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/oauth/authorize
      name: oauth-authorize
      description: REST surface for oauth-authorize.
      operations:
      - method: GET
        name: oauthauthorize
        description: OAuth authorization endpoint
        call: extensions-oauth.oauthauthorize
        with:
          client_id: rest.client_id
          response_type: rest.response_type
          redirect_uri: rest.redirect_uri
          scope: rest.scope
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/oauth/token
      name: oauth-token
      description: REST surface for oauth-token.
      operations:
      - method: POST
        name: oauthtoken
        description: Exchange authorization code for access token
        call: extensions-oauth.oauthtoken
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/oauth/token/info
      name: oauth-token-info
      description: REST surface for oauth-token-info.
      operations:
      - method: GET
        name: gettokeninfo
        description: Get OAuth token information
        call: extensions-oauth.gettokeninfo
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: extensions-oauth-mcp
    port: 9090
    transport: http
    description: MCP adapter for Fly.io Extensions API — OAuth. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: oauth-authorization-endpoint
      description: OAuth authorization endpoint
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: extensions-oauth.oauthauthorize
      with:
        client_id: tools.client_id
        response_type: tools.response_type
        redirect_uri: tools.redirect_uri
        scope: tools.scope
      outputParameters:
      - type: object
        mapping: $.
    - name: exchange-authorization-code-access-token
      description: Exchange authorization code for access token
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: extensions-oauth.oauthtoken
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-oauth-token-information
      description: Get OAuth token information
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: extensions-oauth.gettokeninfo
      outputParameters:
      - type: object
        mapping: $.