Xiaomi · Capability

Xiaomi Cloud Storage

Unified capability for Xiaomi cloud storage workflows combining Galaxy FDS object storage with account authentication. Enables developers to authenticate users and manage files in Xiaomi's cloud infrastructure.

Run with Naftiko XiaomiCloud StorageObject StorageIdentityDeveloper Platform

What You Can Do

GET
Get user profile — Get the authenticated Xiaomi user's profile.
/v1/user/profile
GET
Get user phone and email — Get user phone number and email address.
/v1/user/contact
PUT
Put object — Upload an object to cloud storage.
/v1/storage/objects/{bucketName}/{objectName}
GET
Get object — Download an object from cloud storage.
/v1/storage/objects/{bucketName}/{objectName}
DELETE
Delete object — Delete an object from cloud storage.
/v1/storage/objects/{bucketName}/{objectName}

MCP Tools

get-user-profile

Get the authenticated Xiaomi user's profile information.

read-only
get-user-contact

Get the Xiaomi user's phone number and email address.

read-only
upload-object

Upload a file or object to Xiaomi Galaxy FDS cloud storage.

download-object

Download a file or object from Xiaomi Galaxy FDS cloud storage.

read-only
get-object-metadata

Get metadata for an object in Xiaomi Galaxy FDS without downloading.

read-only
delete-object

Delete an object from Xiaomi Galaxy FDS cloud storage.

idempotent

APIs Used

xiaomi-open-api xiaomi-galaxy-fds

Capability Spec

Raw ↑
naftiko: "1.0.0-alpha1"

info:
  label: "Xiaomi Cloud Storage"
  description: "Unified capability for Xiaomi cloud storage workflows combining Galaxy FDS object storage with account authentication. Enables developers to authenticate users and manage files in Xiaomi's cloud infrastructure."
  tags:
    - Xiaomi
    - Cloud Storage
    - Object Storage
    - Identity
    - Developer Platform
  created: "2026-05-03"
  modified: "2026-05-03"

binds:
  - namespace: env
    keys:
      XIAOMI_ACCESS_TOKEN: XIAOMI_ACCESS_TOKEN
      XIAOMI_CLIENT_ID: XIAOMI_CLIENT_ID
      XIAOMI_FDS_ACCESS_KEY: XIAOMI_FDS_ACCESS_KEY
      XIAOMI_FDS_SECRET_KEY: XIAOMI_FDS_SECRET_KEY

capability:
  consumes:
    - import: xiaomi-open-api
      location: ./shared/xiaomi-open-api.yaml
    - import: xiaomi-galaxy-fds
      location: ./shared/xiaomi-galaxy-fds.yaml

  exposes:
    - type: rest
      port: 8080
      namespace: xiaomi-cloud-storage-api
      description: "Unified REST API for Xiaomi cloud storage operations with user authentication."
      resources:
        - path: /v1/user/profile
          name: user-profile
          description: "Authenticated user profile."
          operations:
            - method: GET
              name: get-user-profile
              description: "Get the authenticated Xiaomi user's profile."
              call: "xiaomi-open-api.get-user-profile"
              outputParameters:
                - type: object
                  mapping: "$."

        - path: /v1/user/contact
          name: user-contact
          description: "User contact information."
          operations:
            - method: GET
              name: get-user-phone-and-email
              description: "Get user phone number and email address."
              call: "xiaomi-open-api.get-user-phone-and-email"
              outputParameters:
                - type: object
                  mapping: "$."

        - path: /v1/storage/objects/{bucketName}/{objectName}
          name: storage-objects
          description: "Object storage operations."
          operations:
            - method: PUT
              name: put-object
              description: "Upload an object to cloud storage."
              call: "xiaomi-galaxy-fds.put-object"
              with:
                bucketName: "rest.bucketName"
                objectName: "rest.objectName"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: GET
              name: get-object
              description: "Download an object from cloud storage."
              call: "xiaomi-galaxy-fds.get-object"
              with:
                bucketName: "rest.bucketName"
                objectName: "rest.objectName"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: DELETE
              name: delete-object
              description: "Delete an object from cloud storage."
              call: "xiaomi-galaxy-fds.delete-object"
              with:
                bucketName: "rest.bucketName"
                objectName: "rest.objectName"
              outputParameters:
                - type: object
                  mapping: "$."

    - type: mcp
      port: 9090
      namespace: xiaomi-cloud-storage-mcp
      transport: http
      description: "MCP server for AI-assisted Xiaomi cloud storage management."
      tools:
        - name: get-user-profile
          description: "Get the authenticated Xiaomi user's profile information."
          hints:
            readOnly: true
            openWorld: false
          call: "xiaomi-open-api.get-user-profile"
          outputParameters:
            - type: object
              mapping: "$."

        - name: get-user-contact
          description: "Get the Xiaomi user's phone number and email address."
          hints:
            readOnly: true
            openWorld: false
          call: "xiaomi-open-api.get-user-phone-and-email"
          outputParameters:
            - type: object
              mapping: "$."

        - name: upload-object
          description: "Upload a file or object to Xiaomi Galaxy FDS cloud storage."
          hints:
            readOnly: false
            destructive: false
            idempotent: false
          call: "xiaomi-galaxy-fds.put-object"
          with:
            bucketName: "tools.bucketName"
            objectName: "tools.objectName"
          outputParameters:
            - type: object
              mapping: "$."

        - name: download-object
          description: "Download a file or object from Xiaomi Galaxy FDS cloud storage."
          hints:
            readOnly: true
            openWorld: false
          call: "xiaomi-galaxy-fds.get-object"
          with:
            bucketName: "tools.bucketName"
            objectName: "tools.objectName"
          outputParameters:
            - type: object
              mapping: "$."

        - name: get-object-metadata
          description: "Get metadata for an object in Xiaomi Galaxy FDS without downloading."
          hints:
            readOnly: true
            openWorld: false
          call: "xiaomi-galaxy-fds.head-object"
          with:
            bucketName: "tools.bucketName"
            objectName: "tools.objectName"
          outputParameters:
            - type: object
              mapping: "$."

        - name: delete-object
          description: "Delete an object from Xiaomi Galaxy FDS cloud storage."
          hints:
            readOnly: false
            destructive: true
            idempotent: true
          call: "xiaomi-galaxy-fds.delete-object"
          with:
            bucketName: "tools.bucketName"
            objectName: "tools.objectName"
          outputParameters:
            - type: object
              mapping: "$."