腾讯云企业网盘 TCED

腾讯云企业网盘 TCED 集成技能。当用户需要管理企业网盘文件(上传、下载、删除、浏览、搜索),管理空间(列出、切换),或进行账号认证(登录、登出、切换)时使用。触发关键词:企业网盘、网盘、TCED、SMH、文件上传、文件下载、云端文件、个人空间、团队空间。

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 56 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
The name/description claim managing TCED files and spaces via an MCP helper (tced-mcp) matches the SKILL.md and the included setup.sh. Expected artifacts (OAuth2 flow, local token storage, port 19526 for callback, domain config) are present and coherent for this purpose.
Instruction Scope
SKILL.md instructs the agent to invoke the MCP commands (login, list_directory, upload_file, etc.), to use the browser-based OAuth2 flow, and to read/write ~/.tced-mcp/auth.json. These actions are within scope for a cloud-drive integration, but the instructions do reference local credentials storage and environment variables (TCED_PAN_DOMAIN, TCED_BASE_PATH) that the manifest did not declare.
Install Mechanism
There is no automatic install spec in the registry package; the skill instructs usage of npx to run tced-mcp@1.0.1. Pulling the helper via npm/npx is a standard moderate-risk mechanism; the documentation explicitly recommends locking the version which is good practice. No downloads from obscure URLs or archive extraction are present.
Credentials
The skill relies on OAuth2 tokens stored at ~/.tced-mcp/auth.json and on MCP configuration env entries (TCED_PAN_DOMAIN, TCED_BASE_PATH). The registry metadata did not declare required env vars or primary credentials; that omission is a minor inconsistency. The requested environment access (local auth file, ability to open browser/port) is expected for this integration, but users should be aware the skill will interact with local token storage.
Persistence & Privilege
The skill does not request always:true and is user-invocable with autonomous invocation allowed (default). It does not modify other skills or system-wide agent settings. It will create/use its own local credential file (~/.tced-mcp/auth.json) which is normal for an OAuth-based helper.
Assessment
This package appears to do what it says: run an MCP helper (tced-mcp) to manage Tencent enterprise cloud drive via OAuth2. Before installing/using it: 1) Verify the upstream tced-mcp npm package and its source repo (this registry entry has no homepage/source listed). 2) Prefer the recommended pinned version (tced-mcp@1.0.1) and, if possible, inspect the package code or verify a checksum. 3) Keep the OAuth callback on a desktop machine (graphical environment) and protect ~/.tced-mcp/auth.json (chmod 600) since it contains access/refresh tokens. 4) Ensure mcp.json env values TCED_PAN_DOMAIN and TCED_BASE_PATH are set to the official domains and not pointed to unknown endpoints. 5) If you need higher assurance, review the tced-mcp npm package contents and its publish history before running npx to fetch it.

Like a lobster shell, security has layers — review code before you run it.

Current versionv0.9.5
Download zip
latestvk97acfcna5rqynj1hkrmg0fjb1837jzd

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

腾讯云企业网盘 (TCED) 技能

通过 tced-mcp MCP 工具操作腾讯云企业网盘,支持 OAuth2 授权认证、空间管理和文件操作。

前置要求

要求说明
Node.js>= 18.0.0
npm / npx随 Node.js 安装,用于获取和运行 tced-mcp
图形界面环境macOS / Windows / Linux 桌面 / WSL(OAuth2 登录需唤起浏览器)
网络访问需能访问 pan.tencent.com(授权页面)和 api.tencentsmh.cn(API 端点)
本地端口19526(OAuth2 回调监听,仅 login 时临时占用)
本地凭据存储~/.tced-mcp/auth.json — 存储 OAuth2 Token 和配置(自动创建)

⚠️ 凭据安全~/.tced-mcp/auth.json 中包含 OAuth2 AccessToken 和 RefreshToken。建议确保该文件权限为 600(仅所有者可读写):

chmod 600 ~/.tced-mcp/auth.json

概览

TCED MCP Server 基于 OAuth2 第三方授权模式,调用 login 唤起网盘页面完成授权后,即可操作已授权的空间和文件。

类别工具说明
认证login发起 OAuth2 授权(唤起网盘页面)
认证logout登出账号
认证list_accounts列出所有已登录账号
认证switch_account切换活跃账号
认证current_account查看当前账号信息
空间list_authorized_spaces列出已授权空间
空间switch_space切换到指定空间
空间current_space查看当前活跃空间
文件upload_file上传文件(本地文件或文本内容)
文件download_file下载文件(获取链接或保存到本地)
文件file_info查看文件/目录详情
文件list_directory列出目录内容
文件search_files搜索文件和目录

首次使用 — 自动设置

当用户首次要求操作企业网盘时,按以下流程操作:

步骤 1:检查 MCP 服务是否可用

尝试调用 current_account 检查 tced-mcp 是否已在 MCP 客户端中配置并运行。

  • 如果可用:跳到「OAuth2 授权登录」
  • 如果不可用:继续步骤 2

步骤 2:配置 MCP 客户端

tced-mcp 已发布到 npm,无需手动安装。只需在 MCP 客户端配置文件(如 mcp.json)中添加:

{
  "mcpServers": {
    "tced-mcp": {
      "command": "npx",
      "args": ["-y", "tced-mcp@1.0.1"],
      "env": {
        "TCED_PAN_DOMAIN": "https://pan.tencent.com",
        "TCED_BASE_PATH": "https://api.tencentsmh.cn"
      }
    }
  }
}

⚠️ 供应链安全说明

  • args必须锁定具体版本号(如 tced-mcp@1.0.1),不要使用 @latest。锁定版本可防止包被劫持时自动拉取恶意版本。升级时应手动修改版本号并验证 changelog。
  • 必须配置 env 字段,显式指定 TCED_PAN_DOMAINTCED_BASE_PATH 为官方生产地址。这两个环境变量会在每次启动时强制覆盖本地缓存(~/.tced-mcp/auth.json)中的域名配置,确保 API 请求始终指向可信端点。
  • 不要将 env 中的域名修改为非官方地址,除非你完全了解风险——所有 API 请求(包含 OAuth2 Token)都会发送到配置的端点。

配置完成后重启 MCP 客户端使配置生效。

步骤 3:验证安装

也可以使用脚本快速检查环境:

{baseDir}/scripts/setup.sh --check

OAuth2 授权登录

检查登录状态

调用 current_account 检查是否已登录。已登录则跳到「选择空间」,否则继续登录。

发起授权登录

调用 login,MCP 自动唤起网盘页面(pan.tencent.com),用户在网盘页面完成:

  1. 登录企业网盘账号
  2. 选择要授权的企业
  3. 选择要授权的空间 — ⚠️ 每次授权只选一个空间,AccessToken 与该空间一对一绑定
  4. 点击「同意授权」

login 阻塞等待用户完成授权(最长 5 分钟超时)。授权完成后自动完成 token 交换,若只授权了一个空间则自动切换到该空间。

⚠️ 核心规则:每个 AccessToken 只对应一个空间。如需操作其他空间,必须重新调用 login 授权目标空间。

⚠️ 环境要求login 需要有图形界面环境(桌面系统),不支持无界面服务器(Linux SSH/Docker 等)。

选择空间(多空间场景)

如果授权了多个空间:

  1. 调用 list_authorized_spaces 获取空间列表
  2. 调用 switch_space(spaceId) 切换到目标空间

核心操作流程

浏览目录

list_directory(filePath: "docs", limit: 50)

支持 marker 翻页、排序和筛选,详见 references/api_reference.md

搜索文件

search_files(keyword: "报告", scope: "fileName")

文件上传

upload_file(filePath: "远端路径", localFilePath: "/本地文件路径")
upload_file(filePath: "远端路径", content: "文件内容")

冲突策略:rename(默认自动重命名)、overwrite(覆盖)、ask(提示用户确认)。

文件下载

download_file(filePath: "远端文件路径")
download_file(filePath: "远端文件路径", localFilePath: "/本地保存路径")

查看文件信息

file_info(filePath: "文件/目录路径")

多账号与多空间管理

AccessToken 与空间一对一绑定

  • 一个 AccessToken = 一个空间,切换空间需要对应的 AccessToken
  • switch_space 切换时,若目标空间无有效 AccessToken,需重新 login 授权
  • switch_account 切换账号后,AccessToken 和空间随之切换

多账号操作

  • list_accounts — 查看已登录账号
  • switch_account(accountId) — 切换活跃账号
  • logout(accountId?) — 登出指定或当前账号

Token 自动刷新

AccessToken 过期时自动通过 RefreshToken 刷新;RefreshToken 过期后需重新 login 授权。


Resource 与 Prompt

  • Resource tced://status — 查看 MCP Server 完整状态
  • Prompt quickstart — 根据当前状态自动引导下一步操作

常见问题排查

Application authorization not found

现象:浏览器授权成功,但回调后提示"换取令牌失败: Application authorization not found"。

原因~/.tced-mcp/auth.json 中缓存的 apiBasePath 指向了错误的环境(如测试域名 api.test.tencentsmh.cn),导致用 code 换 token 时调用了错误的 API 端点,该环境没有注册对应的 OAuth2 应用。

解决

  1. 确保 mcp.jsonenv.TCED_PAN_DOMAINhttps://pan.tencent.comenv.TCED_BASE_PATHhttps://api.tencentsmh.cn
  2. 手动检查 ~/.tced-mcp/auth.json,确认 apiBasePathpanDomain 是否指向生产环境
  3. 刷新 MCP 连接,重新发起 login

⚠️ 安全提醒~/.tced-mcp/auth.json 中的 apiBasePathpanDomain 决定了所有 API 请求(包含 Token)的发送目标。如果被篡改为恶意地址,Token 会泄露。建议通过 mcp.jsonenv 字段固定域名,每次启动自动覆盖。

npx 缓存旧版本

现象:已在 mcp.json 中更新了版本号(如从 1.0.0 改为 1.0.1),但 MCP 启动后行为还是旧版。

原因:npx 会缓存已下载的包到 ~/.npm/_npx/ 目录。

解决

  1. 手动清除缓存:npm cache clean --force
  2. 刷新 MCP 连接(重启进程)
  3. 确认 mcp.json 中的版本号已更新为目标版本

浏览器未唤起

现象:调用 login 后浏览器没有弹出。

原因open 包版本不兼容当前 Node.js 版本。open@10+ 需要 Node.js 18+。

解决:确保 tced-mcp 使用 open@9(兼容 Node.js 16+),已在 v1.0.1 修复。

MCP 进程未读取最新配置

现象:修改了 ~/.tced-mcp/auth.json 但 MCP 行为没变。

原因:MCP 进程在启动时一次性读取配置到内存,运行中修改文件不会生效。进程的 saveConfig() 还可能把内存中的旧值写回文件,覆盖你的修改。

解决:修改配置后必须刷新 MCP 连接(重启进程)。推荐通过 mcp.jsonenv 字段固定域名(TCED_PAN_DOMAIN / TCED_BASE_PATH),这样每次启动都会强制覆盖本地缓存,避免手动编辑 auth.json

注意:不要直接编辑 ~/.tced-mcp/auth.json 中的 apiBasePathpanDomain 字段来切换环境。正确做法是修改 mcp.jsonenv 配置,然后重启 MCP 进程。


使用规范

  1. 操作前确认状态:任何文件操作前,确保已登录且已选择空间
  2. 路径格式:云端路径使用相对路径(如 docs/readme.txt),不带前导斜杠
  3. 下载链接有时效性download_file 返回的 URL 需尽快使用
  4. 切换账号后空间随之切换switch_account 后需重新确认空间
  5. 切换空间需对应 AccessToken:操作新空间需重新 login 授权该空间
  6. 错误处理:工具返回 isError: true 时,先检查登录和空间状态
  7. 大目录分页浏览list_directory 默认返回 50 项,使用 marker 翻页

工具详细参数

详细的工具参数定义和错误处理见 references/api_reference.md

Files

4 total
Select a file
Select a file to preview.

Comments

Loading comments…