Skip to main content
Glama
CloudPaste MCP Server

CloudPaste MCP Server

Official

CloudPaste MCP Server

通过 Model Context Protocol 将 CloudPaste 接入 MCP Client。它提供本地文件上传、默认 1 天受控下载分享、云端文件查询、详情获取与物理删除能力。

删除工具会同时删除 CloudPaste 分享记录和底层 WebDAV/S3 文件对象,不可恢复;只有在明确传入 confirm: true 时才会执行。

功能

  • test_connection:验证 CloudPaste URL 和 API Key。

  • upload_file:流式上传指定本地文件,默认 24 小时过期,并返回受控下载直链。

  • list_files:分页查询当前 API Key 自己创建的文件。

  • get_file:查询文件详情和最新受控下载链接。

  • delete_files:物理删除当前 API Key 自己创建的文件、分享记录及底层对象。

所有上游响应会在交给模型前过滤密码、API Key、令牌和密钥字段。

Related MCP server: mcp_file_manager

CloudPaste API Key 权限

请在 CloudPaste 中创建一个专用 API Key,最小权限值为:

FILE_SHARE  = 2
FILE_MANAGE = 8
总权限值     = 10

建议同时通过 Storage ACL 仅授权 MCP 所需的存储配置。使用 API Key 时,CloudPaste 仅允许它管理该 Key 自己创建的文件。

MCP Client 配置

发布到 npm 后,在 MCP Client 中使用:

{
  "mcpServers": {
    "cloudpaste": {
      "command": "npx",
      "args": ["-y", "cloudpaste-mcp-server@0.1.0"],
      "env": {
        "CLOUDPASTE_URL": "https://cloudpaste.example.com",
        "CLOUDPASTE_API_KEY": "your-dedicated-cloudpaste-api-key",
        "CLOUDPASTE_DEFAULT_PATH": "/CloudPaste/MCP",
        "CLOUDPASTE_STORAGE_CONFIG_ID": "",
        "CLOUDPASTE_DEFAULT_EXPIRES_HOURS": "24"
      }
    }
  }
}

不要把真实密钥写入项目文件、Git 仓库、日志或聊天记录。建议在 MCP Client 的安全配置界面中维护环境变量。

环境变量

名称

必填

默认值

说明

CLOUDPASTE_URL

是

-

CloudPaste根地址,只允许 http(s)

CLOUDPASTE_API_KEY

是

-

专用API Key

CLOUDPASTE_DEFAULT_PATH

否

不设置

默认上传目录

CLOUDPASTE_STORAGE_CONFIG_ID

否

CloudPaste 默认存储

默认目标存储配置ID

CLOUDPASTE_DEFAULT_EXPIRES_HOURS

否

24

默认分享有效期,范围为1–8760小时(1小时~1年)

工具说明

upload_file

输入:

{
  "file_path": "D:\\Download\\example.zip",
  "expires_in_hours": 24,
  "path": "/CloudPaste/MCP",
  "storage_config_id": "optional-storage-id",
  "remark": "optional note",
  "slug": "optional-short-link"
}

上传使用 CloudPaste PUT /api/upload-direct/:filename。MCP 固定传入:

use_proxy=1
expires_in=24(未显式覆盖时)

因此返回的 downloadUrl 是 CloudPaste 受控代理链接,会遵循分享过期时间。

list_files / get_file

仅查询当前 API Key 创建的文件。get_file 默认返回最新下载链接,但敏感字段会被过滤。

delete_files

{
  "file_ids": ["file_xxx"],
  "confirm": true
}

该操作固定使用 delete_mode: "both",同时删除分享记录及 WebDAV/S3 底层对象,无法撤销。调用前必须先得到用户明确授权。

本地开发

Set-Location "D:\Programming\CloudPaste-MCP"
pnpm install
pnpm check
pnpm test
pnpm build

使用本地源码调试:

$env:CLOUDPASTE_URL = "https://cloudpaste.example.com"
$env:CLOUDPASTE_API_KEY = "your-api-key"
pnpm dev

发布

发布前检查包内容与质量:

pnpm prepublishOnly
npm pack --dry-run
npm publish --access public --provenance

发布前请再次确认 cloudpaste-mcp-server 名称可用;若已被占用,请修改 package.json 中的 name、README 的 npx 命令和 MCP Client 示例。

License

Apache-2.0

Available Tools

5 tools
delete_filesA

不可恢复地删除当前 API Key 自己创建的 CloudPaste 文件:同时删除分享记录和底层 WebDAV/S3 对象。仅在已经获得用户明确删除授权后调用,且必须传 confirm=true。

Inputs: confirm (required), file_ids (required).

get_fileA

查询当前 API Key 自己创建的一个 CloudPaste 文件的详情;默认返回最新受控预览与下载链接,并且过滤任何密码或密钥字段。

Inputs: file_id (required), include_links.

list_filesB

分页查询当前 CloudPaste API Key 自己创建的远程文件。支持按关键词搜索;不会返回密码、密钥或其他敏感字段。

Inputs: limit, offset, search.

test_connectionA

验证 CloudPaste URL 与 API Key 是否有效,并返回当前密钥的非敏感权限摘要。不会返回或记录 API Key。

Inputs: no named parameters.

upload_fileA

上传调用方明确指定的本地普通文件,并创建远程分享。默认有效期为 24 小时且强制使用 CloudPaste 受控代理下载链接;成功后返回下载直链、文件 ID 与过期时间。

Inputs: file_path (required), path, slug, remark, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool targets a distinct action and resource: delete_files deletes, upload_file uploads, list_files lists, get_file retrieves details, and test_connection validates credentials. There is no overlap in purpose.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern (delete_files, test_connection, upload_file, list_files, get_file). The convention is predictable throughout.

    Tool Count5/5

    Five tools cover the essential file management surface (upload, list, get, delete, and connection test) without redundancy. This is well-scoped for the server's purpose.

    Completeness3/5

    The tool set covers create, read, and delete operations, but lacks any update operation (e.g., renaming a file, changing expiration, or updating metadata). This is a notable gap for a file management server, though core workflows are present.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Secure file exchange MCP server enabling AI agents to upload, share, fetch, and revoke files with SHA-256 verification, malware scanning, expiry, access restrictions, and human approval workflows.
      45 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents and users to upload and download files via MCP, generating shareable links and identifier codes. Files are automatically deleted after 24 hours.
      9
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to browse, read, write, search, and share files in a pCloud account over HTTPS, including folder management, trash access, and public link creation.
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to store, version, browse, search, and share artifacts in workspace drives and folders through MCP tools, with keys that gate which tools are offered. Uploads produce shareable public links and rendered previews, and the same bearer key works across the REST API and MCP transport.
      Apache 2.0