English | 中文
Tencent Cloud COS MCP Server based on the MCP protocol enables large models to quickly integrate with Tencent Cloud Storage (COS) and Data Processing (CI) capabilities without coding.




To protect your data privacy, prepare the following parameters:
mybucket-123456ap-beijingap-beijing.stdio (local) or sse (remote).stdiosse connection type.3001When used within a large model (e.g., cursor), configure mcp.json as follows:
{
"mcpServers": {
"cos-mcp": {
"command": "npx",
"args": [
"cos-mcp",
"--Region=yourRegion",
"--Bucket=yourBucket",
"--SecretId=yourSecretId",
"--SecretKey=yourSecretKey",
"--DatasetName=yourDatasetname"
]
}
}
}
Alternatively, use JSON configuration:
{
"mcpServers": {
"cos-mcp": {
"command": "npx",
"args": [
"cos-mcp",
"--cos-config='{\"Region\":\"yourRegion\",\"Bucket\":\"yourBucket\",\"SecretId\":\"yourSecretId\",\"SecretKey\":\"yourSecretKey\",\"DatasetName\":\"yourDatasetname\"}'"
]
}
}
}
# Install
npm install -g cos-mcp@latest
# Run in SSE mode
cos-mcp --Region=yourRegion --Bucket=yourBucket --SecretId=yourSecretId --SecretKey=yourSecretKey --DatasetName=yourDatasetname --port=3001 --connectType=sse
# Or use JSON configuration
cos-mcp --cos-config='{"Region":"yourRegion","Bucket":"BucketName-APPID","SecretId":"yourSecretId","SecretKey":"yourSecretKey","DatasetName":"datasetName"}' --port=3001 --connectType=sse
When using SSE mode within a large model (e.g., cursor), configure mcp.json as follows:
{
"mcpServers": {
"cos-mcp": {
"url": "http://localhost:3001/sse"
}
}
}
git clone https://github.com/Tencent/cos-mcp.git
cd cos-mcp
npm install
Create a .env file and configure the following variables:
Region='yourRegion' Bucket='yourBucket' SecretId='yourSecretId' SecretKey='yourSecretKey' DatasetName="yourDatasetName"
npm run start:sse
npm run build
The build output is located at dist/index.js.
{
"mcpServers": {
"cos-mcp": {
"url": "http://localhost:3001/sse"
}
}
}
{
"mcpServers": {
"cos-mcp": {
"command": "node",
"args": [
"${your work space}/dist/index.js"
]
}
}
}
After completing the above steps, you can run COS MCP Server from the source code.
cos-mcp with cos-mcp@latest in the commands to install the latest version.cos-mcp command does not work, it may be due to global variable issues. Use split variables or the npx method to start:
The above command is equivalent to:npm install -g cos-mcp@latest cos-mcp --cos-config=xxx --port=3001 --connectType=sse
npx cos-mcp@latest --cos-config=xxx --port=3001 --connectType=sse
--cos-config='{\"Region\":\"yourRegion\",\"Bucket\":\"BucketName-APPID\",\"SecretId\":\"yourSecretId\",\"SecretKey\":\"yourSecretKey\",\"DatasetName\":\"datasetName\"}' --port=3001 --connectType=sse