npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ptbsare/netdisk-mcp-server

v1.1.0

Published

MCP Server for Quark and 115 cloud storage: list, view, transfer, offline download, and multi-platform search

Readme

English | 中文

netdisk-mcp-server

npm License: GPL-3.0

基于 MCP (Model Context Protocol) 的网盘操作服务器。集成 夸克网盘 / 115网盘 文件浏览、转存、离线下载,以及 PanSou 多平台资源搜索。

功能

| 工具 | 说明 | |------|------| | list | 列出夸克/115 网盘目录内容 | | view | 查看分享链接中的文件列表,支持通配符过滤 | | transfer | CP-Like 转存:从分享链接转存到你的网盘,支持路径通配符 | | offline_download | 115 离线下载:提交磁力链接离线任务(自动安装 rss2cloud) | | search | 多平台资源搜索:通过 PanSou 搜索 12+ 平台的分享链接和磁力链接 | | health | 检查 PanSou 搜索 API 状态和可用插件 |

快速开始

推荐使用 npx 直接运行——无需安装。

MCP 配置(Claude Desktop / Claude Code)

在你的 MCP 配置文件中添加:

{
  "mcpServers": {
    "netdisk": {
      "command": "npx",
      "args": ["-y", "@ptbsare/netdisk-mcp-server"],
      "env": {
        "NETDISK_QUARK_COOKIE": "你的夸克Cookie",
        "NETDISK_115_COOKIE": "你的115Cookie",
        "PANSOU_URL": "http://你的PanSou实例地址"
      }
    }
  }
}

npx -y 会在每次启动时自动下载并运行最新版本,无需手动安装。

其他运行方式

# 全局安装后运行
npm install -g @ptbsare/netdisk-mcp-server
netdisk-mcp-server

# 从源码运行
git clone https://github.com/ptbsare/netdisk-mcp-server.git
cd netdisk-mcp-server && npm install && npm start

环境变量

| 变量 | 必需 | 说明 | |------|------|------| | NETDISK_QUARK_COOKIE | 夸克功能 | 夸克网盘 Cookie | | NETDISK_115_COOKIE | 115 功能 | 115 网盘 Cookie | | PANSOU_URL | 搜索功能 | PanSou API 端点地址 | | NETDISK_TIMEOUT | 否 | 请求超时秒数(默认 30) |

也兼容 CLOUD_TRANSFER_* 前缀的环境变量名。

获取 Cookie

夸克网盘 — 访问 https://pan.quark.cn/,登录后打开开发者工具(F12)→ Network,复制任意请求的 Cookie 头。

115网盘 — 访问 https://115.com/,登录后打开开发者工具(F12)→ Network,复制任意请求的 Cookie 头。

工具说明

list — 列出网盘目录

路径由内部自动解析,无需关心文件夹 ID。

list(cloud="quark", path="/")           → 列出夸克根目录
list(cloud="115",   path="/媒体库")     → 列出 115 的媒体库

view — 查看分享链接

查看分享链接中的文件列表,支持通配符过滤。

view(share_link="https://pan.quark.cn/s/xxx", file_pattern="*.mp4")
view(share_link="https://115cdn.com/s/xxx?password=yyy", file_pattern="S01E01*")

支持的链接格式:

  • 夸克:https://pan.quark.cn/s/<id>(可带 ?pwd=<提取码>
  • 115:https://115.com/s/<code>https://115cdn.com/s/<code>(可带 ?password=<提取码>

transfer — CP-Like 转存

从分享链接转存文件到你的网盘。source_pattern 使用路径通配符。

transfer(share_link="...", source_pattern="/",                 target_path="/3670")
transfer(share_link="...", source_pattern="/Season 1/*.mp4",   target_path="/媒体库")
transfer(share_link="...", source_pattern="/Season 1/S01E01*", target_path="/媒体库")

source_pattern 规则:

  • / — 分享中的所有文件
  • /Season 1 — "Season 1" 文件夹中的所有文件
  • /Season 1/*.mp4 — "Season 1" 中仅 .mp4 文件
  • /Season 1/S01E01* — "Season 1" 中以 "S01E01" 开头的文件

注意:115 转存可能有延迟,文件需要一段时间才会出现在目标文件夹中。

offline_download — 115 离线下载

提交磁力链接到 115 进行离线下载(服务端下载,不消耗本地带宽)。首次使用时会自动从 GitHub Releases 下载 rss2cloud 二进制。

offline_download(
  magnet_links=["magnet:?xt=urn:btih:xxx"],
  target_path="/媒体库/云下载电影"
)

search — 多平台资源搜索

搜索 12+ 平台的资源,返回按网盘类型分组的分享链接和磁力链接。

search(query="肖申克的救赎")
search(query="权力的游戏", cloud_types=["quark", "magnet"])
search(query="电视剧", include=["合集"], exclude=["预告"])

支持的网盘类型:quark, 115, baidu, aliyun, tianyi, uc, mobile, pikpak, xunlei, 123, magnet, ed2k

health — 全面健康检查

一次调用检查所有已配置服务的连通性和有效性:

  • 夸克 Cookie — 调用轻量级 API 验证 Cookie 是否有效
  • 115 Cookie — 调用轻量级 API 验证 Cookie 是否有效
  • PanSou API — 检查 /api/health 并列出可用搜索插件

每项检查独立运行,部分失败不会中断其他检查。

health()

输出示例:

=== Health Check ===

✅ Quark: Quark cookie is valid
✅ 115: 115 cookie is valid
✅ PanSou: status ok
   Plugins (43): ddys, erxiao, jutoushe, labi, ...

典型工作流

1. search("流浪地球", cloud_types=["quark"])                          → 找到分享链接
2. view(share_link="https://...", file_pattern="*.mp4")               → 查看有哪些文件
3. transfer(share_link="...", source_pattern="/", target_path="/3670")→ 转存到你的网盘

1. search("电影", cloud_types=["magnet"])                              → 找到磁力链接
2. offline_download(magnet_links=["magnet:?xt=..."], target_path="/media") → 离线下载

致谢

许可证

GPL-3.0-only — 详见 LICENSE 全文。

GitHub: https://github.com/ptbsare/netdisk-mcp-server