Uploads files to Qiniu Cloud and returns public URLs using a dedicated MCP server.
Configuration
View docs{
"mcpServers": {
"qiniu_mcp": {
"command": "python",
"args": [
"/path/to/qiniu_mcp_server/server.py"
],
"env": {
"QINIU_ACCESS_KEY": "YOUR_ACCESS_KEY",
"QINIU_SECRET_KEY": "YOUR_SECRET_KEY",
"QINIU_BUCKET_NAME": "YOUR_BUCKET_NAME",
"QINIU_DOMAIN": "https://YOUR_DOMAIN"
}
}
}
}This MCP server enables uploading files to Qiniu Cloud storage by exposing a simple up-load interface. You run the service locally, configure your credentials, and then you can programmatically upload files to your designated bucket, receiving a publicly accessible URL in return.
You will interact with the MCP server through a client that calls the upload tool. After you start the local server, you can invoke the upload_file tool by providing the path to the file you want to store. The server will return the public URL for easy access.
Prerequisites: you need Python 3 and a shell environment. The service is designed to run as a local MCP server using a Python script.
Clone the project, create and activate a virtual environment, install dependencies, configure credentials, and start the server with a single command sequence.
# Clone the project repository
git clone <repository-url>
# Enter the project directory
cd qiniu_mcp_server
# Create and activate a virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Copy and configure environment variables
cp .env.example .env
nano .env # edit to fill in QINIU_* values
# Start the MCP server
python server.pyTo run the server with your credentials, you will typically export environment variables and then start the script. Do not commit the credentials to version control.
Common steps include exporting keys, bucket name, and domain, then launching the server.
export QINIU_ACCESS_KEY="YourAccessKey"
export QINIU_SECRET_KEY="YourSecretKey"
export QINIU_BUCKET_NAME="your_bucket_name"
export QINIU_DOMAIN="https://your-domain.com"
python server.pyUploads a file to Qiniu Cloud storage and returns the public URL of the uploaded file.