Mojang · Capability

Mojang Public API — Identity

Mojang Public API — Identity. 2 operations. Lead operation: Get Profile by Username. Self-contained Naftiko capability covering one Mojang business surface.

Run with Naftiko MojangMinecraftIdentity

What You Can Do

GET
Getprofilebyusername — Get Profile by Username
/v1/users/profiles/minecraft/{username}
POST
Getprofilesbyusernamesbulk — Get Profiles by Usernames (Bulk)
/v1/profiles/minecraft

MCP Tools

get-profile-username

Get Profile by Username

read-only idempotent
get-profiles-usernames-bulk

Get Profiles by Usernames (Bulk)

read-only

Who This Is For

👤
Developer / Tooling
Third-party tools resolving identity for analytics or display.
👤
Minecraft Server Operator
Operator of a Java Edition server validating client sessions.

Capability Spec

mojang-public-api-identity.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: "Mojang Public API \u2014 Identity"
  description: "Mojang Public API \u2014 Identity. 2 operations. Lead operation: Get Profile by Username. Self-contained Naftiko capability covering one Mojang business surface."
  tags:
  - Mojang
  - Minecraft
  - Identity
  created: '2026-05-30'
  modified: '2026-05-30'
binds:
- namespace: env
  keys:
    MOJANG_ACCESS_TOKEN: MOJANG_ACCESS_TOKEN
capability:
  consumes:
  - type: http
    namespace: mojang-public-api-identity
    baseUri: https://api.mojang.com
    description: "Mojang Public API \u2014 identity. Self-contained, no shared references."
    resources:
    - name: users-profiles-minecraft-username
      path: /users/profiles/minecraft/{username}
      operations:
      - name: getProfileByUsername
        method: GET
        description: Get Profile by Username
        inputParameters:
        - name: username
          in: path
          type: string
          required: true
          description: Case-insensitive Minecraft username.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: profiles-minecraft
      path: /profiles/minecraft
      operations:
      - name: getProfilesByUsernamesBulk
        method: POST
        description: Get Profiles by Usernames (Bulk)
        inputParameters:
        - name: body
          in: body
          type: object
          required: true
          description: JSON array of up to ten usernames.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    namespace: mojang-public-api-identity-rest
    port: 8080
    description: "REST adapter for Mojang Public API \u2014 identity. One Spectral-compliant resource per consumed operation, prefixed with /v1."
    resources:
    - path: /v1/users/profiles/minecraft/{username}
      name: users-profiles-minecraft-username
      description: REST surface for /users/profiles/minecraft/{username}.
      operations:
      - method: GET
        name: getProfileByUsername
        description: Get Profile by Username
        call: mojang-public-api-identity.getProfileByUsername
        with:
          username: rest.username
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/profiles/minecraft
      name: profiles-minecraft
      description: REST surface for /profiles/minecraft.
      operations:
      - method: POST
        name: getProfilesByUsernamesBulk
        description: Get Profiles by Usernames (Bulk)
        call: mojang-public-api-identity.getProfilesByUsernamesBulk
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: mojang-public-api-identity-mcp
    port: 9090
    transport: http
    description: "MCP adapter for Mojang Public API \u2014 identity. One tool per consumed operation, routed inline through this capability's consumes block."
    tools:
    - name: get-profile-username
      description: Get Profile by Username
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: mojang-public-api-identity.getProfileByUsername
      with:
        username: tools.username
      outputParameters:
      - type: object
        mapping: $.
    - name: get-profiles-usernames-bulk
      description: Get Profiles by Usernames (Bulk)
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: mojang-public-api-identity.getProfilesByUsernamesBulk
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.