Tencent Cloud COS MCP Server is a server based on the MCP protocol, designed to let large models quickly access Tencent Cloud Object Storage (COS) and Cloud Infinite (CI) capabilities without coding.
Purpose
This tool is used to connect large models with Tencent Cloud COS storage and Cloud Infinite CI capabilities, enabling cloud storage, backup, and automated processing of data.
Main Capabilities
- Metadata/natural language retrieval (MateInsight).
- Text, images, videos, audio, and other data obtained using other MCP capabilities can be directly uploaded to COS cloud storage.
- Local data can be quickly transferred to COS cloud storage/backup through large models.
- Automation through large models: batch transfer videos, images, audio, text, and other data from web pages to COS cloud storage.
- Automatically process videos, images, audio, text, and other data in the cloud, and transfer them to COS cloud storage.
Usage
You need to prepare the following parameters:
- SecretId / SecretKey: The key for Tencent Cloud COS, used for identity authentication. How to obtain: Visit Tencent Cloud Key Management, create a new key, and copy the generated SecretId and SecretKey.
- Bucket name (example: mybucket-123456): Used to store data. How to obtain: Visit the bucket list and copy the bucket name; if you do not have a bucket, you can click "Create Bucket", and generally selecting the default configuration is enough to complete creation quickly.
- Region (example: ap-beijing): Find the bucket in the bucket list, view the region it belongs to in the bucket name row, and copy it.
- Dataset name: An optional parameter. Data intelligent retrieval operations require this parameter. How to obtain: Visit Dataset Management, create a dataset, wait for index creation to complete, and copy the dataset name.
- Connection type: An optional parameter. The available values are stdio (local) or sse (remote).
- Port: An optional parameter. When the connection type is sse, you can set the port freely.
When using it within a large model (for example, Cursor), you need to configure it in mcp.json. When using SSE mode within a large model (for example, Cursor), you need to configure it in mcp.json.
Create a .env file and configure the following environment variables.
The build output is located at dist/index.js. After completing the above steps, you can run COS MCP Server from source.
IfIf an old version of the package is installed, you can change cos-mcp in the above content to cos-mcp@latest to install the latest version of the package.
If using cos-mcp directly after global installation does not work, there may be a problem with global variables. You can start it using split variables or npx: npm install -g cos-mcp@latest cos-mcp --cos-config=xxx --port=3001 --connectType=sse The above command has the same effect as: npx cos-mcp@latest --cos-config=xxx --port=3001 --connectType=sse
If a parsing problem occurs, the terminal may be sensitive to double quotes. You can change the configuration parameters to the following format and try again: --cos-config= ' {"Region":"yourRegion","Bucket":"BucketName-APPID","SecretId":"yourSecretId","SecretKey":"yourSecretKey","DatasetName":"datasetName"} ' --port=3001 --connectType=sse
Applicable Scenarios
- Transfer local data to COS cloud storage or backup through large models.
- Batch transfer videos, images, audio, text, and other data from web pages to COS cloud storage.
- Automatically process videos, images, audio, text, and other data in the cloud and transfer them to COS cloud storage.
- Call Tencent Cloud COS and CI capabilities through the MCP protocol in large model tools such as Cursor.
Limitations
To protect data privacy, SecretId and SecretKey must be properly kept and never leaked. No other limitations are currently provided.