
How to add 腾讯云 COS MCP Server to Windsurf
无需编码即可让大模型接入腾讯云对象存储 (COS) 与数据万象 (CI) 的存储与处理能力。 Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 14, 2026 · 36★ · stdio · apikey
Windsurf config for 腾讯云 COS MCP Server
npx cos-mcp{
"mcpServers": {
"cos-mcp-server": {
"command": "npx",
"args": [
"cos-mcp",
"--Region=yourRegion",
"--Bucket=yourBucket",
"--SecretId=yourSecretId",
"--SecretKey=yourSecretKey",
"--DatasetName=yourDatasetname"
]
}
}
}Setup steps
- 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the 腾讯云 COS MCP Server config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5腾讯云 COS MCP Server's tools become available to Cascade.
Before you start
- Node.js 与 npm/npx 环境
- 腾讯云账号,并在密钥管理中创建 SecretId / SecretKey
- 一个 COS 存储桶 (Bucket) 及其所在地域 (Region)
- 使用数据智能检索 (MetaInsight) 时需在数据集管理中创建数据集并提供 DatasetName
What 腾讯云 COS MCP Server can do in Windsurf
getCosConfig获取当前 COS / 腾讯云配置(SecretId、SecretKey 会脱敏显示)。
putObject上传本地文件到存储桶,可指定存储桶内的文件名与目标目录。
putString上传字符串内容到存储桶,可指定文件名、目标目录与 contentType。
putBase64上传 Base64 编码内容到存储桶,可指定文件名、目标目录与 contentType。
putBuffer上传 buffer 内容到存储桶,支持 hex/base64/utf8/ascii/binary 等编码。
putObjectSourceUrl通过 URL 下载文件并将其上传到存储桶。
getObjectUrl获取存储桶内文件的带签名下载链接。
getObject下载存储桶内的文件。
Security
需要腾讯云 SecretId / SecretKey 才能访问你的存储桶,凭据通过命令行参数(--SecretId / --SecretKey,或 --cos-config JSON)或源码安装时的 .env 文件传入;请妥善保管、切勿泄露或提交到版本库。建议使用权限最小化的子账号密钥。
腾讯云 COS MCP Server + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the 腾讯云 COS MCP Server config there under the "mcpServers" key and restart the client.
Is 腾讯云 COS MCP Server safe to use with Windsurf?
需要腾讯云 SecretId / SecretKey 才能访问你的存储桶,凭据通过命令行参数(--SecretId / --SecretKey,或 --cos-config JSON)或源码安装时的 .env 文件传入;请妥善保管、切勿泄露或提交到版本库。建议使用权限最小化的子账号密钥。
支持哪些连接方式?
支持 stdio(本地,默认)和 sse(远程)。通过 --connectType 参数切换,sse 模式可用 --port 指定端口(默认 3001),客户端通过 url(如 http://localhost:3001/sse)连接。
如何获取所需的凭据和参数?
在腾讯云密钥管理 (console.cloud.tencent.com/cam/capi) 创建 SecretId / SecretKey;在存储桶列表创建并查看 Bucket 与 Region;如需数据智能检索,在数据集管理中创建数据集获取 DatasetName。
全局安装后命令无法直接使用怎么办?
可能是全局变量问题,可改用 npx 方式启动,或使用 --cos-config JSON 形式传参;若终端对双引号敏感,可对 JSON 中的引号进行转义。