deepseek-harness-baidu-netdisk-audit
DeepSeek Harness × 百度网盘:只读目录审计
一个非官方、社区维护的最小项目:让 DeepSeek Harness 通过百度网盘官方 MCP 读取用户自己的网盘,递归整理大型教程目录,同时默认阻止下载和写入操作。
本仓库不包含任何人的 Access Token、真实网盘目录、文件清单或审计报告,也不会安装、同步或上传网盘文件。
为什么需要桥接
百度网盘官方目前提供远程 SSE 地址 https://mcp-pan.baidu.com/sse。DeepSeek Harness 的通用 MCP 客户端支持 stdio 和 Streamable HTTP;本项目提供一个很小的 SSE → stdio 适配器,并在适配器中使用显式只读 allowlist。
DeepSeek Harness
│ stdio
▼
本地只读桥接器
│ 官方 SSE + 用户自己的 Access Token
▼
百度网盘官方 MCPHarness 中只会注册这些工具:
file_listfile_doc_listfile_image_listfile_video_listfile_metafile_keyword_searchfile_semantics_searchuser_infoget_quota
上传、下载、分享、删除、移动、复制、重命名和新建目录等工具不会暴露给模型。
Related MCP server: local-tools-mcp-server
前置条件
Windows 10/11(当前脚本在 Windows 验证;桥接器本身是跨平台 Node.js)
Node.js 20 或更高版本
已能正常启动的官方 DeepSeek Harness
从百度网盘官方流程取得的 Access Token
官方资料:
安装
git clone https://github.com/MarenV-narrative/deepseek-harness-baidu-netdisk-audit.git
Set-Location '.\deepseek-harness-baidu-netdisk-audit'
npm installnpm install 只安装公开声明的 MCP SDK 依赖,不安装或覆盖 DeepSeek Harness。
1. 安全保存 Access Token
按照百度官方 README 的“使用准备”完成授权。不要把 token 写进源码、Git、命令行参数或聊天内容。
Windows 推荐使用隐藏输入脚本:
& '.\scripts\set-token-user.ps1'它把 token 保存为当前 Windows 用户的 BAIDU_NETDISK_ACCESS_TOKEN 环境变量。保存后关闭并重新打开 Harness。
2. 生成 Harness 配置片段
npm run generate-config脚本会生成 config/harness-cordis-entry.generated.yml,其中只有本机 Node 和项目的绝对路径,没有 token。把整个 patch 操作追加到:
%USERPROFILE%\.dsh\profiles\web\cordis.patch.yml先备份原文件,不要覆盖已有 patch。重启 Harness 后,模型侧应出现 mcp__baidu-netdisk__... 工具。
可先运行一个不读取私人文件名的连接测试:
npm run smoke它只获取桥接器公开的工具清单,并确认其中没有下载或写入工具。
3. 指定自己的网盘目录
编辑 config/audit.json:
{
"target_dir": "/网络安全教程",
"dir_encoding": "urlencoded",
"max_pages_per_directory": 10000,
"document_content_preview_chars": 2000
}也可以只在本次测试覆盖目标:
& '.\scripts\run-readonly-test.ps1' --target '/网络安全教程'4. 最小只读验证
& '.\scripts\run-readonly-test.ps1'该测试会:
用
file_list分页列出目标目录;递归取得子目录树;
选择一个文档,用
file_meta检查 metadata、content 和 abstract;把私人结果写入本地
inventory/与reports/。
这两个输出目录默认被 Git 忽略。测试脚本没有任何下载、上传或写入网盘的调用。
5. 在 Harness 中整理教程
复制 prompts/course-audit.zh.md 的提示词,并把目标目录换成自己的路径。
如果 content 或 abstract 为空,它通常表示百度尚未生成解析结果,不代表文件为空。先根据路径、文件名、扩展名、大小和相邻课程推断;只对会影响学习顺序或安装安全的低置信度文件建立按需检查队列。
本项目故意不实现下载工具。若以后增加按需下载,建议放在独立、需要人工确认的工具中,并限制单文件大小和本地落盘目录。
隐私与安全
远程地址固定为百度官方域名,避免环境变量把 token 转发到任意服务器。
token 只通过环境变量传给桥接子进程。
错误信息会尝试遮蔽 token。
只读权限由代码 allowlist 强制执行,不只依赖提示词。
inventory/和reports/可能含私人文件名、路径、摘要和内容预览,禁止提交。运行
npm run privacy-check可检查常见 token 形状、Windows 用户路径和已知私人路径。
兼容性说明
本项目最初验证组合:DeepSeek Harness 0.1.0-rc.6、MCP SDK 1.30.0、Windows 11。上游传输方式、工具名称或配置格式变化时,应优先参考百度网盘和 DeepSeek Harness 的官方文档。
免责声明
本项目不是百度或 DeepSeek 官方项目,与其不存在隶属、合作或背书关系。使用者应遵守百度网盘服务条款,仅访问自己拥有或获授权的数据。
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only MCP tools for AI agent discovery, structured resources, and NIULAI information.
Browse and manage files in your Moxt AI workspace from any MCP client.
Read-only Remote MCP for externally grounded AI agent trust receipts.
Read-only MCP for AI usage profiles, leaderboards, stats, and docs; no writes or private data.
Related MCP Servers
- AlicenseCqualityDmaintenanceConnects Baidu Netdisk to MCP-compatible AI clients, enabling AI to safely read selected files and generate summaries, key points, to-dos, tags, and organization suggestions.274MIT
- FlicenseAqualityCmaintenanceA read-only MCP server that enables AI assistants to search files, list directories, retrieve system info, and get file metadata on the local file system.4-
- AlicenseNot gradedqualityCmaintenanceEnables secure, read-only access to local project files (including text, DOCX, PDF, and XLSX) through MCP, with strict directory whitelisting and no write, edit, or command-execution tools.1MIT
- AlicenseNot gradedqualityAmaintenanceProvides a read-only MCP bridge that lets Claude Web inspect workspace files, git state, and recorded test results while Codex remains the sole executor of changes.542 npm2MIT