deepseek-harness-baidu-netdisk-audit
Read-only bridge that lets DeepSeek Harness audit Baidu Netdisk directories via official MCP, blocking downloads and writes.
README
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
▼
百度网盘官方 MCP
Harness 中只会注册这些工具:
file_listfile_doc_listfile_image_listfile_video_listfile_metafile_keyword_searchfile_semantics_searchuser_infoget_quota
上传、下载、分享、删除、移动、复制、重命名和新建目录等工具不会暴露给模型。
前置条件
- 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 install
npm 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 官方项目,与其不存在隶属、合作或背书关系。使用者应遵守百度网盘服务条款,仅访问自己拥有或获授权的数据。
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.