home / mcp / tencent cos mcp server

Tencent COS MCP Server

腾讯云COS MCP服务器

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "156554395-tx-cos-mcp": {
      "command": "node",
      "args": [
        "your-absolute-path/tx-cos-mcp/index.js"
      ],
      "env": {
        "COS_BUCKET": "YOUR_BUCKET",
        "COS_DOMAIN": "YOUR_DOMAIN",
        "COS_REGION": "YOUR_REGION",
        "COS_SECRET_ID": "YOUR_SECRET_ID",
        "COS_SECRET_KEY": "YOUR_SECRET_KEY"
      }
    }
  }
}

You run a Tencent COS MCP server built on Node.js that enables COS file uploads, large-file handling, object management, temporary URLs, and folder operations for IDEs like Claude Desktop, Cursor, and Windsurf. It is designed to be easy to attach to your MCP client, providing secure access to COS storage with practical features and MCP protocol compatibility.

How to use

You connect to the MCP server from your editor or IDE by configuring an MCP server entry that points to a local stdio server or to an npm/pnpm-based execution. Once the MCP server is running, you can perform operations such as uploading files, listing objects, generating signed URLs, creating folders, and moving or deleting objects through your editor’s MCP client. The server exposes a rich set of endpoints for common COS actions and automatic handling of large files, retries, and progress reporting.

How to install

Prerequisites: you need Node.js installed if you run the local server, and a modern MCP-compatible editor or IDE. The following steps install dependencies, set up environment variables for COS, and start the local MCP server for debugging.

# Clone the project
git clone https://github.com/156554395/tx-cos-mcp.git
cd tx-cos-mcp

# Install dependencies
pnpm install

# Configure environment variables
export COS_SECRET_ID=your-secret-id
export COS_SECRET_KEY=your-secret-key
export COS_REGION=your-region
export COS_BUCKET=your-bucket
export COS_DOMAIN=your-custom-domain.com

# Start the debug server
pnpm inspector

Configuration examples for MCP integration

Your editor can load the MCP server using one of the following stdio configurations. These snippets invoke the server locally and supply the required COS credentials via environment variables.

{
  "mcpServers": {
    "tx-cos-mcp": {
      "command": "node",
      "args": ["your-absolute-path/tx-cos-mcp/index.js"],
      "env": {
        "COS_SECRET_ID": "your-secret-id",
        "COS_SECRET_KEY": "your-secret-key",
        "COS_REGION": "your-region",
        "COS_BUCKET": "your-bucket",
        "COS_DOMAIN": "your-custom-domain.com"
      }
    }
  }
}
{
  "mcpServers": {
    "tx-cos-mcp": {
      "command": "npx",
      "args": ["-y", "tx-cos-mcp@latest"],
      "env": {
        "COS_SECRET_ID": "your-secret-id",
        "COS_SECRET_KEY": "your-secret-key",
        "COS_REGION": "your-region",
        "COS_BUCKET": "your-bucket",
        "COS_DOMAIN": "your-custom-domain.com"
      },
      "transportType": "stdio"
    }
  }
}

Available tools

upload_file

Single-file upload to COS, including optional object key and custom domain

upload_multiple

Batch file uploads to COS with optional object keys for each file

get_signed_url

Generate a time-limited URL to access a COS object with an optional expiration

list_objects

List objects in the bucket with optional prefix filtering and folder view

delete_object

Delete a single object by key

copy_object

Copy an object to a target key/bucket

move_object

Move an object to a target key/bucket

rename_object

Rename an object by changing its key

delete_multiple

Delete multiple objects by providing a list of keys

create_folder

Create a new folder/path in the bucket

delete_folder

Delete a folder with optional recursive deletion

list_folders

List folders and objects under a given prefix

get_folder_stats

Get statistics for a folder, including size and object count

upload_large_file

Large file upload with chunking, progress, and concurrency controls

get_upload_progress

Query ongoing or past upload session progress

clear_upload_progress

Clean up stored upload progress data

manage_temp_files

Manage temporary files and cache used during uploads