Files
media-center/storage/quark/v1/install.md
T
sutong 750f981c7e feat: init media-center skill
资源中心——从多渠道获取资源链接,转存到夸克网盘并整理归档。
- sources/tencent-doc: 腾讯文档读取
- sources/search: 网盘搜索
- storage/quark: 夸克网盘操作
- ref/: 来源 skill 参考归档

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-16 18:28:23 +08:00

64 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 夸克网盘 — 安装配置
## 前置依赖
- Node.js >= 18
- mcporter
- curlWindows Git Bash 自带)
```bash
mcporter --version || npm i -g mcporter
```
## 安装 MCP Server
```bash
npm i -g @ptbsare/netdisk-mcp-server
```
## 配置到 mcporter
### 1. 获取夸克 Cookie
浏览器打开 [pan.quark.cn](https://pan.quark.cn/) 并登录 → F12 开发者工具 → Network 标签 → 刷新页面 → 复制任意请求的 `Cookie` 请求头完整内容。
### 2. 配置
```bash
mcporter config add netdisk \
--stdio "npx -y @ptbsare/netdisk-mcp-server" \
--env "NETDISK_QUARK_COOKIE=粘贴你的完整Cookie"
```
> Cookie 是敏感信息,建议保存在单独的文件(如 `项目根目录/cookie/quark.txt`)中,
> 使用时 `COOKIE=$(cat cookie/quark.txt)`,避免在命令行历史中泄露。
### 3. 验证
```bash
mcporter call netdisk.health
```
输出 ✅ `Quark: Quark cookie is valid` 表示成功。
```bash
# 列出根目录
mcporter call 'netdisk.list(cloud: "quark", path: "/")'
```
## API 补全配置
MCP 工具缺少创建文件夹/移动/删除功能,这些操作通过直调 Quark API 实现。API 调用同样使用 Cookie 认证,无需额外配置。
API base URL`https://drive-h.quark.cn`
```bash
# 验证 API 连通性
curl -s "https://drive-h.quark.cn/1/clouddrive/file/sort?pr=ucpro&fr=pc&pdir_fid=0" \
-H "cookie: 你的Cookie" | head -c 200
```
## 文件整理
整理功能(建目录/移动/删除)依赖 Quark API 直调,详见 `usage.md` 中的对应章节。