返回顶部
b

baidudisk-mcp百度网盘MCP

Use Baidu Netdisk via mcporter + stdio MCP server with hot-reload token file credentials. Triggers when you need Baidu Netdisk operations (official 2.0 toolset + legacy aliases) from OpenClaw without storing access_token in repo files.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
258
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

baidudisk-mcp

baidudisk-mcp

使用此技能通过 mcporter 运行百度网盘工具。

1) 在 mcporter 中启用服务

运行:

bash
bash scripts/baidudisk_mcporter.sh register

这会将 baidudisk stdio 服务条目写入 config/mcporter.json,包含:

  • - 命令:/home/linuxbrew/.linuxbrew/bin/uv
  • 参数:--directory /skills/baidudisk-mcp/server run netdisk.py
  • 环境变量:BAIDUNETDISKTOKEN_FILE=~/.openclaw/credentials/baidudisk.json

检查状态:

bash
bash scripts/baidudisk_mcporter.sh check
mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json list baidudisk

2) 凭证文件与热更新

凭证文件(仅本地):

~/.openclaw/credentials/baidudisk.json

预期键值:

  • - accesstoken(必填)
  • defaultdir(推荐)

示例(请勿提交真实 token):

json
{
access_token: <已脱敏>,
default_dir: /Openclaw/baidudisk
}

MCP 服务器在每次工具调用时读取此文件。
因此 token 轮换只需编辑此文件,无需重启服务器。

3) 2.0 工具

3.1 官方对齐工具(主推)

四个基础列表接口与 MCP tool 对应关系:

  • - /rest/2.0/xpan/file?method=list → filelist(dir?, limit?, order?, desc?, start?)
  • /rest/2.0/xpan/file?method=imagelist → fileimagelist(parentpath?, recursion?, page?, num?, order?, desc?, web=1)
  • /rest/2.0/xpan/file?method=doclist → filedoclist(parentpath?, recursion?, page?, num?, order?, desc?)
  • /rest/2.0/xpan/file?method=videolist → filevideolistapi(parent_path?, recursion?, page?, num?, order?, desc?, web=1)

另保留一个历史兼容视频工具(非官方 videolist 参数模型):

  • - filevideolist(dir?, recursion?, start?, limit?, order?, desc?)(基于 xpanfilelistall 过滤视频)

其他工具:

  • - categoryinfo(category, parentpath=/, recursion=1)
  • categoryinfomulti(categories, parentpath=/, recursion=1)
  • imagegettags(type=1)
  • imagegettagssummary(type=1, top=50)
  • imagesearch(searchtype, keyword, start=0, limit=100, size?)
  • recentlist(category=3, start=0, limit=100, sortby?, order?, stime?, etime?, resolution=off)
  • filemeta(fsids, dlink?, thumb?, extra?, needmedia?, path?)
  • makedir(path, parentdir?)
  • filecopy(srcpath, destdir, newname?, ondup?)
  • filecopybatch(items, ondup=newcopy, asyncmode=1, chunksize=100, dryrun=false, allowdestprefixes=[/Openclaw])
  • filedel(path, confirm)
  • filemove(srcpath, destdir, newname?, ondup?)
  • filemovebatch(items, ondup=fail, asyncmode=1, chunksize=100, dryrun=false, allowdestprefixes=[/Openclaw])
  • filerename(path, newname)
  • filerenamebatch(items, asyncmode=1, chunksize=100, dryrun=false)
  • fileuploadstdio(localfilepath, remotedir?, remotename?)
  • fileuploadbyurl(url, remotedir?, remotename?, timeouts?, maxbytes?)
  • fileuploadbytext(text, remotedir?, remotename?, maxchars?, maxbytes?)
  • filekeywordsearch(keyword, dir?, recursion?, num?, page?)
  • filesemanticssearch(...)(当前为 unsupported 桩)
  • filesharelinkset(...)(当前为 unsupported 桩)
  • userinfo()
  • getquota(checkexpire?, checkfree?)

3.2 旧版别名(兼容保留)

  • - list
  • search
  • mkdir
  • move
  • rename
  • delete
  • upload
  • download

4) mcporter 示例

bash

对齐 list:/rest/2.0/xpan/file?method=list


mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.file_list dir=/ limit=3

对齐 imagelist:/rest/2.0/xpan/file?method=imagelist

mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.fileimagelist parent_path=/来自:iPhone recursion=0 page=1 num=3 order=time desc=1

对齐 doclist:/rest/2.0/xpan/file?method=doclist

mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.filedoclist parent_path=/Openclaw recursion=1 page=1 num=3 order=time desc=1

对齐 videolist:/rest/2.0/xpan/file?method=videolist

mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.filevideolistapi parentpath=/ recursion=1 page=1 num=3 order=time desc=1

若根目录返回 count=0,可改 parent_path=/来自:iPhone 或 /Openclaw

官方同名:关键词搜索

mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.filekeywordsearch keyword=invoice num=20

分类统计(单分类:图片=3)

mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.categoryinfo category=3 parentpath=/ recursion=1

分类统计(多分类:JSON array)

mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.categoryinfomulti categories=[1,3,4,6] parent_path=/ recursion=1

图片智能标签

mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.image_gettags type=1

图片智能标签摘要(按 count 取前 20)

mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.imagegettagssummary type=1 top=20

图片关键字检索(search_type=2 表示汉字)

mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.image_search \ searchtype=2 keyword=截图 limit=20 size=c256u256,c512_u512

图片列表(imagelist,默认 web=1 返回缩略图字段)

mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.fileimagelist \ parent_path=/Openclaw recursion=1 page=1 num=10 order=time desc=1

按上传时间拉取最近图片

mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.recent_list \ category=3 limit=20 resolution=off

官方同名:创建目录

mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.make_dir path=reports/2026

批量移动(默认 ondup=fail,不覆盖;dest 限制在 /Openclaw)

mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.filemovebatch \ items=[{srcpath:/Openclaw/inbox/a.txt,destdir:/Openclaw/archive},{srcpath:/Openclaw/inbox/b.txt,destdir:/Openclaw/archive}] \ chunksize=100 asyncmode=1

批量复制(显式冲突策略 newcopy:冲突时自动副本,不覆盖原文件)

mcporter --config /home/ubuntu/.openclaw/workspace/config/mcporter.json call baidudisk.filecopybatch \ items=[{src_path:/

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 baidudisk-mcp-1776194658 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 baidudisk-mcp-1776194658 技能

通过命令行安装

skillhub install baidudisk-mcp-1776194658

下载

⬇ 下载 baidudisk-mcp v1.0.0(免费)

文件大小: 98.15 KB | 发布时间: 2026-4-15 13:37

v1.0.0 最新 2026-4-15 13:37
Initial release of baidudisk-mcp

- Provides Baidu Netdisk access through mcporter with an MCP stdio server, supporting hot-reload of token credentials.
- Implements a wide set of official-aligned file management tools (aligned with Baidu API 2.0) and maintains compatibility with legacy tool aliases.
- Supports batch operations with unified return envelope format for copy, move, and rename.
- Credentials are read from a local JSON file on every call, enabling seamless token updates without restart.
- Includes extensive examples for mcporter usage and recommended server setup steps.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部