Lichess · Capability

Lichess API — OAuth

Lichess API — OAuth. 4 operations. Lead operation: Request authorization code. Self-contained Naftiko capability covering one Lichess business surface.

Lichess API — OAuth is a Naftiko capability published by Lichess, one of 23 capabilities the APIs.io network indexes for this provider. It bundles 4 operations across the POST, GET, and DELETE methods.

The capability includes 1 read-only operation and 3 state-changing operations. Lead operation: Request authorization code. Can be deployed as a REST endpoint, MCP tool, or Agent Skill via Naftiko.

Tagged areas include Lichess and OAuth.

Run with Naftiko LichessOAuth

What You Can Do

GET
Oauth — Request authorization code
/v1/oauth
POST
Apitoken — Obtain access token
/v1/api/token
DELETE
Apitokendelete — Revoke access token
/v1/api/token
POST
Tokentest — Test multiple OAuth tokens
/v1/api/token/test

MCP Tools

lichess-oauth

Request authorization code

read-only
lichess-apitoken

Obtain access token

lichess-apitokendelete

Revoke access token

lichess-tokentest

Test multiple OAuth tokens

Capability Spec

oauth.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Lichess API — OAuth
  description: 'Lichess API — OAuth. 4 operations. Lead operation: Request authorization code. Self-contained Naftiko capability covering one Lichess business surface.'
  tags:
  - Lichess
  - OAuth
  created: '2026-05-25'
  modified: '2026-05-25'
binds:
- namespace: env
  keys:
    LICHESS_API_TOKEN: LICHESS_API_TOKEN
capability:
  consumes:
  - type: http
    namespace: oauth
    baseUri: https://lichess.org
    description: Lichess OAuth business capability. Self-contained, no shared references.
    resources:
    - name: oauth
      path: /oauth
      operations:
      - name: oauth
        method: GET
        description: 'Request authorization code'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: response_type
          in: query
          type: string
          required: false
        - name: client_id
          in: query
          type: string
          required: false
        - name: redirect_uri
          in: query
          type: string
          required: false
        - name: code_challenge_method
          in: query
          type: string
          required: false
        - name: code_challenge
          in: query
          type: string
          required: false
        - name: scope
          in: query
          type: string
          required: false
        - name: username
          in: query
          type: string
          required: false
        - name: state
          in: query
          type: string
          required: false
    - name: token
      path: /api/token
      operations:
      - name: apitoken
        method: POST
        description: 'Obtain access token'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          required: false
      - name: apitokendelete
        method: DELETE
        description: 'Revoke access token'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: token-test
      path: /api/token/test
      operations:
      - name: tokentest
        method: POST
        description: 'Test multiple OAuth tokens'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          required: false
    authentication:
      type: bearer
      value: '{{env.LICHESS_API_TOKEN}}'
      placement: header
  exposes:
  - type: rest
    namespace: oauth-rest
    port: 8080
    description: REST adapter for Lichess OAuth. One Spectral-compliant resource per consumed operation.
    resources:
    - path: /v1/oauth
      name: oauth
      description: REST surface for oauth.
      operations:
      - method: GET
        name: oauth
        description: 'Request authorization code'
        call: oauth.oauth
        with:
          response_type: rest.query.response_type
          client_id: rest.query.client_id
          redirect_uri: rest.query.redirect_uri
          code_challenge_method: rest.query.code_challenge_method
          code_challenge: rest.query.code_challenge
          scope: rest.query.scope
          username: rest.query.username
          state: rest.query.state
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/token
      name: token
      description: REST surface for token.
      operations:
      - method: POST
        name: apitoken
        description: 'Obtain access token'
        call: oauth.apitoken
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: apitokendelete
        description: 'Revoke access token'
        call: oauth.apitokendelete
        with:
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/token/test
      name: token-test
      description: REST surface for token-test.
      operations:
      - method: POST
        name: tokentest
        description: 'Test multiple OAuth tokens'
        call: oauth.tokentest
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: oauth-mcp
    port: 9090
    transport: http
    description: MCP adapter for Lichess OAuth. One tool per consumed operation.
    tools:
    - name: lichess-oauth
      description: 'Request authorization code'
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: oauth.oauth
      with:
        response_type: tools.response_type
        client_id: tools.client_id
        redirect_uri: tools.redirect_uri
        code_challenge_method: tools.code_challenge_method
        code_challenge: tools.code_challenge
        scope: tools.scope
        username: tools.username
        state: tools.state
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-apitoken
      description: 'Obtain access token'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: oauth.apitoken
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-apitokendelete
      description: 'Revoke access token'
      hints:
        readOnly: false
        destructive: true
        idempotent: false
      call: oauth.apitokendelete
      with:
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-tokentest
      description: 'Test multiple OAuth tokens'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: oauth.tokentest
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.