Lichess · Capability

Lichess API — Challenges

Lichess API — Challenges. 11 operations. Lead operation: List your challenges. Self-contained Naftiko capability covering one Lichess business surface.

Lichess API — Challenges is a Naftiko capability published by Lichess, one of 23 capabilities the APIs.io network indexes for this provider. It bundles 11 operations across the POST and GET methods rooted at /v1/api.

The capability includes 2 read-only operations and 9 state-changing operations. Lead operation: List your challenges. Can be deployed as a REST endpoint, MCP tool, or Agent Skill via Naftiko.

Tagged areas include Lichess and Challenges.

Run with Naftiko LichessChallenges

What You Can Do

GET
Challengelist — List your challenges
/v1/api/challenge
POST
Challengecreate — Create a challenge
/v1/api/challenge/{username}
GET
Challengeshow — Show one challenge
/v1/api/challenge/{challengeId}/show
POST
Challengeaccept — Accept a challenge
/v1/api/challenge/{challengeId}/accept
POST
Challengedecline — Decline a challenge
/v1/api/challenge/{challengeId}/decline
POST
Challengecancel — Cancel a challenge
/v1/api/challenge/{challengeId}/cancel
POST
Challengeai — Challenge the AI
/v1/api/challenge/ai
POST
Challengeopen — Open-ended challenge
/v1/api/challenge/open
POST
Challengestartclocks — Start clocks of a game
/v1/api/challenge/{gameId}/start-clocks
POST
Roundaddtime — Add time to the opponent clock
/v1/api/round/{gameId}/add-time/{seconds}
POST
Adminchallengetokens — Admin challenge tokens
/v1/api/token/admin-challenge

MCP Tools

lichess-challengelist

List your challenges

read-only
lichess-challengecreate

Create a challenge

lichess-challengeshow

Show one challenge

read-only
lichess-challengeaccept

Accept a challenge

lichess-challengedecline

Decline a challenge

lichess-challengecancel

Cancel a challenge

lichess-challengeai

Challenge the AI

lichess-challengeopen

Open-ended challenge

lichess-challengestartclocks

Start clocks of a game

lichess-roundaddtime

Add time to the opponent clock

lichess-adminchallengetokens

Admin challenge tokens

Capability Spec

challenges.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Lichess API — Challenges
  description: 'Lichess API — Challenges. 11 operations. Lead operation: List your challenges. Self-contained Naftiko capability covering one Lichess business surface.'
  tags:
  - Lichess
  - Challenges
  created: '2026-05-25'
  modified: '2026-05-25'
binds:
- namespace: env
  keys:
    LICHESS_API_TOKEN: LICHESS_API_TOKEN
capability:
  consumes:
  - type: http
    namespace: challenges
    baseUri: https://lichess.org
    description: Lichess Challenges business capability. Self-contained, no shared references.
    resources:
    - name: challenge
      path: /api/challenge
      operations:
      - name: challengelist
        method: GET
        description: 'List your challenges'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: challenge-username
      path: /api/challenge/{username}
      operations:
      - name: challengecreate
        method: POST
        description: 'Create a challenge'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: username
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          required: false
    - name: challenge-challengeid-show
      path: /api/challenge/{challengeId}/show
      operations:
      - name: challengeshow
        method: GET
        description: 'Show one challenge'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: challengeId
          in: path
          type: string
          required: true
    - name: challenge-challengeid-accept
      path: /api/challenge/{challengeId}/accept
      operations:
      - name: challengeaccept
        method: POST
        description: 'Accept a challenge'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: challengeId
          in: path
          type: string
          required: true
        - name: color
          in: query
          type: string
          required: false
    - name: challenge-challengeid-decline
      path: /api/challenge/{challengeId}/decline
      operations:
      - name: challengedecline
        method: POST
        description: 'Decline a challenge'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: challengeId
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          required: false
    - name: challenge-challengeid-cancel
      path: /api/challenge/{challengeId}/cancel
      operations:
      - name: challengecancel
        method: POST
        description: 'Cancel a challenge'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: challengeId
          in: path
          type: string
          required: true
        - name: opponentToken
          in: query
          type: string
          required: false
    - name: challenge-ai
      path: /api/challenge/ai
      operations:
      - name: challengeai
        method: POST
        description: 'Challenge the AI'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          required: false
    - name: challenge-open
      path: /api/challenge/open
      operations:
      - name: challengeopen
        method: POST
        description: 'Open-ended challenge'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          required: false
    - name: challenge-gameid-start-clocks
      path: /api/challenge/{gameId}/start-clocks
      operations:
      - name: challengestartclocks
        method: POST
        description: 'Start clocks of a game'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: gameId
          in: path
          type: string
          required: true
        - name: token1
          in: query
          type: string
          required: false
        - name: token2
          in: query
          type: string
          required: false
    - name: round-gameid-add-time-seconds
      path: /api/round/{gameId}/add-time/{seconds}
      operations:
      - name: roundaddtime
        method: POST
        description: 'Add time to the opponent clock'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: gameId
          in: path
          type: string
          required: true
        - name: seconds
          in: path
          type: string
          required: true
    - name: token-admin-challenge
      path: /api/token/admin-challenge
      operations:
      - name: adminchallengetokens
        method: POST
        description: 'Admin challenge 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: challenges-rest
    port: 8080
    description: REST adapter for Lichess Challenges. One Spectral-compliant resource per consumed operation.
    resources:
    - path: /v1/api/challenge
      name: challenge
      description: REST surface for challenge.
      operations:
      - method: GET
        name: challengelist
        description: 'List your challenges'
        call: challenges.challengelist
        with:
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/challenge/{username}
      name: challenge-username
      description: REST surface for challenge-username.
      operations:
      - method: POST
        name: challengecreate
        description: 'Create a challenge'
        call: challenges.challengecreate
        with:
          username: rest.path.username
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/challenge/{challengeId}/show
      name: challenge-challengeid-show
      description: REST surface for challenge-challengeid-show.
      operations:
      - method: GET
        name: challengeshow
        description: 'Show one challenge'
        call: challenges.challengeshow
        with:
          challengeId: rest.path.challengeId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/challenge/{challengeId}/accept
      name: challenge-challengeid-accept
      description: REST surface for challenge-challengeid-accept.
      operations:
      - method: POST
        name: challengeaccept
        description: 'Accept a challenge'
        call: challenges.challengeaccept
        with:
          challengeId: rest.path.challengeId
          color: rest.query.color
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/challenge/{challengeId}/decline
      name: challenge-challengeid-decline
      description: REST surface for challenge-challengeid-decline.
      operations:
      - method: POST
        name: challengedecline
        description: 'Decline a challenge'
        call: challenges.challengedecline
        with:
          challengeId: rest.path.challengeId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/challenge/{challengeId}/cancel
      name: challenge-challengeid-cancel
      description: REST surface for challenge-challengeid-cancel.
      operations:
      - method: POST
        name: challengecancel
        description: 'Cancel a challenge'
        call: challenges.challengecancel
        with:
          challengeId: rest.path.challengeId
          opponentToken: rest.query.opponentToken
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/challenge/ai
      name: challenge-ai
      description: REST surface for challenge-ai.
      operations:
      - method: POST
        name: challengeai
        description: 'Challenge the AI'
        call: challenges.challengeai
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/challenge/open
      name: challenge-open
      description: REST surface for challenge-open.
      operations:
      - method: POST
        name: challengeopen
        description: 'Open-ended challenge'
        call: challenges.challengeopen
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/challenge/{gameId}/start-clocks
      name: challenge-gameid-start-clocks
      description: REST surface for challenge-gameid-start-clocks.
      operations:
      - method: POST
        name: challengestartclocks
        description: 'Start clocks of a game'
        call: challenges.challengestartclocks
        with:
          gameId: rest.path.gameId
          token1: rest.query.token1
          token2: rest.query.token2
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/round/{gameId}/add-time/{seconds}
      name: round-gameid-add-time-seconds
      description: REST surface for round-gameid-add-time-seconds.
      operations:
      - method: POST
        name: roundaddtime
        description: 'Add time to the opponent clock'
        call: challenges.roundaddtime
        with:
          gameId: rest.path.gameId
          seconds: rest.path.seconds
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/token/admin-challenge
      name: token-admin-challenge
      description: REST surface for token-admin-challenge.
      operations:
      - method: POST
        name: adminchallengetokens
        description: 'Admin challenge tokens'
        call: challenges.adminchallengetokens
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: challenges-mcp
    port: 9090
    transport: http
    description: MCP adapter for Lichess Challenges. One tool per consumed operation.
    tools:
    - name: lichess-challengelist
      description: 'List your challenges'
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: challenges.challengelist
      with:
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-challengecreate
      description: 'Create a challenge'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: challenges.challengecreate
      with:
        username: tools.username
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-challengeshow
      description: 'Show one challenge'
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: challenges.challengeshow
      with:
        challengeId: tools.challengeId
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-challengeaccept
      description: 'Accept a challenge'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: challenges.challengeaccept
      with:
        challengeId: tools.challengeId
        color: tools.color
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-challengedecline
      description: 'Decline a challenge'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: challenges.challengedecline
      with:
        challengeId: tools.challengeId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-challengecancel
      description: 'Cancel a challenge'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: challenges.challengecancel
      with:
        challengeId: tools.challengeId
        opponentToken: tools.opponentToken
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-challengeai
      description: 'Challenge the AI'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: challenges.challengeai
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-challengeopen
      description: 'Open-ended challenge'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: challenges.challengeopen
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-challengestartclocks
      description: 'Start clocks of a game'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: challenges.challengestartclocks
      with:
        gameId: tools.gameId
        token1: tools.token1
        token2: tools.token2
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-roundaddtime
      description: 'Add time to the opponent clock'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: challenges.roundaddtime
      with:
        gameId: tools.gameId
        seconds: tools.seconds
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-adminchallengetokens
      description: 'Admin challenge tokens'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: challenges.adminchallengetokens
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.