QI

Qiniu MCP Server for AI Cloud Storage

Access Qiniu Cloud storage and intelligent multimedia services via the MCP server for seamless AI large-model client integration.

Quick Install
npx -y @qiniu/qiniu-mcp-server

Overview

The Qiniu MCP Server is a lightweight mediator that connects AI large-model clients to Qiniu Cloud storage and intelligent multimedia services. It centralizes signing, proxying, and orchestration tasks so model-centric applications can securely upload, download, and process media without embedding provider credentials or handling low-level storage details inside model agents or clients.

By exposing simple HTTP endpoints and issuing short-lived upload/download tokens, the MCP Server makes it straightforward to integrate cloud-backed datasets, model inputs/outputs, and media-processing pipelines into AI workflows. This reduces boilerplate in clients, enforces consistent access control, and lets teams leverage Qiniu’s storage and multimedia intelligence services from a single, developer-friendly gateway.

Features

  • Token management: generate and rotate short-lived upload/download credentials for Qiniu Cloud
  • Proxy and signing: server-side signing for uploads and downloads to avoid exposing secret keys
  • Media intelligence hooks: optional integration points to trigger Qiniu multimedia processing (transcoding, thumbnails, OCR, etc.)
  • REST API: simple HTTP endpoints that are easy to call from model agents, web apps, or backend services
  • Configuration-driven: environment variables or config file to customize storage, buckets, and permissions
  • Lightweight deployment: run as a container or a small service alongside model clients

Installation / Configuration

Clone the repository, build or run the provided container. Basic steps:

  1. Clone the project
git clone https://github.com/qiniu/qiniu-mcp-server.git
cd qiniu-mcp-server
  1. Build and run locally (example with Docker)
# build (if Dockerfile present)
docker build -t qiniu-mcp-server .

# run with environment variables
docker run -p 8080:8080 \
  -e QINIU_ACCESS_KEY=your-access-key \
  -e QINIU_SECRET_KEY=your-secret-key \
  -e MCP_BUCKET=your-default-bucket \
  -e MCP_PORT=8080 \
  qiniu-mcp-server
  1. Or run from source (example Node.js/Python - follow runtime in repository)
# example for Node.js based project
npm install
npm start

Common environment variables

VariablePurposeExample
QINIU_ACCESS_KEYQiniu API access keyAKxxxxxxxx
QINIU_SECRET_KEYQiniu API secret keySKxxxxxxxx
MCP_BUCKETDefault bucket used for uploads/downloadsmy-ai-bucket
MCP_PORTLocal port for MCP Server8080
MCP_BASE_URLBase URL for callbacks/media hooks (optional)https://mcp.example.com

You can also provide a YAML/JSON configuration file if the project supports it. Example config.yml:

server:
  port: 8080
qiniu:
  accessKey: "AK..."
  secretKey: "SK..."
  defaultBucket: "my-ai-bucket"
media:
  enableMIM: true
  callbackUrl: "https://mcp.example.com/media/callback"

Available Resources

  • GitHub repository: https://github.com/qiniu/qiniu-mcp-server
  • API endpoints (typical usage): token generation, direct upload URLs, media job trigger, download proxies
  • Integration examples: sample clients for Python and Node.js (see repository /examples)
  • Documentation: repository README and inline API docs (openAPI/Swagger may be available in repo)

Note: consult the repo for exact endpoint paths and API schema; implementations may vary across releases.

Use Cases

  • Secure dataset uploads from edge devices or users

    • Devices request an upload token from the MCP Server, upload directly to Qiniu Cloud using the token, and MCP records metadata or triggers further processing.
    • Example flow: device -> MCP /token -> Qiniu upload -> MCP receives callback -> add to dataset index.
  • Ingesting and preprocessing media for training and inference

    • Upload raw videos/images and then trigger Qiniu multimedia processing (transcoding, thumbnails, OCR, speech-to-text) via MCP so model pipelines receive normalized inputs.
    • Concrete example: upload a batch of lecture videos; MCP triggers transcoding + subtitle generation; results stored back to a bucket for model consumption.
  • Model output persistence and versioning

    • Model-generated artifacts (embeddings, decoded audio, generated images) are uploaded via MCP to a managed bucket with access control, making it straightforward to maintain dataset versions or rollback artifacts.
  • Agent/tool integrations for LLMs

    • LLM tools can call MCP endpoints to fetch or store large files without holding long-lived credentials. MCP returns signed URLs or streams content through server-side proxies.

Example: simple upload flow (curl)

  1. Request an upload token from MCP
curl -X POST "http://localhost:8080/v1/token" \
  -H "Content-Type: application/json" \
  -d '{"key":"dataset/images/img01.jpg","bucket":"my-ai-bucket","ttl":3600}'
  1. Use returned upload URL/token to PUT file to Qiniu (example response fields will vary)
curl -X PUT "<upload_url_from_mcp>" \
  -H "Authorization: <upload_token>" \
  --data-binary @img01.jpg

Next Steps

  • Review the repository README and API docs for endpoint details, schema, and example clients.
  • Integrate MCP into a staging environment; configure callbacks and media hooks to exercise multimedia processing.
  • Add authentication and audit logging in front of the MCP Server if you plan to expose it to untrusted clients.

This server is intended to simplify the bridge between AI systems and cloud storage/media services, keeping credentials secure and interactions consistent across teams and model tooling.