Lichess · Capability

Lichess API — Relations

Lichess API — Relations. 5 operations. Lead operation: Get users followed by the logged in user. Self-contained Naftiko capability covering one Lichess business surface.

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

The capability includes 1 read-only operation and 4 state-changing operations. Lead operation: Get users followed by the logged in user. Can be deployed as a REST endpoint, MCP tool, or Agent Skill via Naftiko.

Tagged areas include Lichess and Relations.

Run with Naftiko LichessRelations

What You Can Do

GET
Apiuserfollowing — Get users followed by the logged in user
/v1/api/rel/following
POST
Followuser — Follow a player
/v1/api/rel/follow/{username}
POST
Unfollowuser — Unfollow a player
/v1/api/rel/unfollow/{username}
POST
Blockuser — Block a player
/v1/api/rel/block/{username}
POST
Unblockuser — Unblock a player
/v1/api/rel/unblock/{username}

MCP Tools

lichess-apiuserfollowing

Get users followed by the logged in user

read-only
lichess-followuser

Follow a player

lichess-unfollowuser

Unfollow a player

lichess-blockuser

Block a player

lichess-unblockuser

Unblock a player

Capability Spec

relations.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Lichess API — Relations
  description: 'Lichess API — Relations. 5 operations. Lead operation: Get users followed by the logged in user. Self-contained Naftiko capability covering one Lichess business surface.'
  tags:
  - Lichess
  - Relations
  created: '2026-05-25'
  modified: '2026-05-25'
binds:
- namespace: env
  keys:
    LICHESS_API_TOKEN: LICHESS_API_TOKEN
capability:
  consumes:
  - type: http
    namespace: relations
    baseUri: https://lichess.org
    description: Lichess Relations business capability. Self-contained, no shared references.
    resources:
    - name: rel-following
      path: /api/rel/following
      operations:
      - name: apiuserfollowing
        method: GET
        description: 'Get users followed by the logged in user'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: rel-follow-username
      path: /api/rel/follow/{username}
      operations:
      - name: followuser
        method: POST
        description: 'Follow a player'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: username
          in: path
          type: string
          required: true
    - name: rel-unfollow-username
      path: /api/rel/unfollow/{username}
      operations:
      - name: unfollowuser
        method: POST
        description: 'Unfollow a player'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: username
          in: path
          type: string
          required: true
    - name: rel-block-username
      path: /api/rel/block/{username}
      operations:
      - name: blockuser
        method: POST
        description: 'Block a player'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: username
          in: path
          type: string
          required: true
    - name: rel-unblock-username
      path: /api/rel/unblock/{username}
      operations:
      - name: unblockuser
        method: POST
        description: 'Unblock a player'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: username
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      value: '{{env.LICHESS_API_TOKEN}}'
      placement: header
  exposes:
  - type: rest
    namespace: relations-rest
    port: 8080
    description: REST adapter for Lichess Relations. One Spectral-compliant resource per consumed operation.
    resources:
    - path: /v1/api/rel/following
      name: rel-following
      description: REST surface for rel-following.
      operations:
      - method: GET
        name: apiuserfollowing
        description: 'Get users followed by the logged in user'
        call: relations.apiuserfollowing
        with:
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/rel/follow/{username}
      name: rel-follow-username
      description: REST surface for rel-follow-username.
      operations:
      - method: POST
        name: followuser
        description: 'Follow a player'
        call: relations.followuser
        with:
          username: rest.path.username
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/rel/unfollow/{username}
      name: rel-unfollow-username
      description: REST surface for rel-unfollow-username.
      operations:
      - method: POST
        name: unfollowuser
        description: 'Unfollow a player'
        call: relations.unfollowuser
        with:
          username: rest.path.username
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/rel/block/{username}
      name: rel-block-username
      description: REST surface for rel-block-username.
      operations:
      - method: POST
        name: blockuser
        description: 'Block a player'
        call: relations.blockuser
        with:
          username: rest.path.username
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/rel/unblock/{username}
      name: rel-unblock-username
      description: REST surface for rel-unblock-username.
      operations:
      - method: POST
        name: unblockuser
        description: 'Unblock a player'
        call: relations.unblockuser
        with:
          username: rest.path.username
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: relations-mcp
    port: 9090
    transport: http
    description: MCP adapter for Lichess Relations. One tool per consumed operation.
    tools:
    - name: lichess-apiuserfollowing
      description: 'Get users followed by the logged in user'
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: relations.apiuserfollowing
      with:
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-followuser
      description: 'Follow a player'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: relations.followuser
      with:
        username: tools.username
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-unfollowuser
      description: 'Unfollow a player'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: relations.unfollowuser
      with:
        username: tools.username
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-blockuser
      description: 'Block a player'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: relations.blockuser
      with:
        username: tools.username
      outputParameters:
      - type: object
        mapping: $.
    - name: lichess-unblockuser
      description: 'Unblock a player'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: relations.unblockuser
      with:
        username: tools.username
      outputParameters:
      - type: object
        mapping: $.