English | 简体中文
Turn Baidu Netdisk into an AI-readable personal knowledge base.
Many people keep years of PDFs, course materials, ebooks, project documents, saved articles, and notes in Baidu Netdisk. The files are there, but finding, reading, summarizing, and organizing them is still painful.
Baidu Netdisk Knowledge MCP connects Baidu Netdisk to MCP-capable AI clients such as Codex, Claude Desktop, and ChatGPT. It lets AI read selected files, extract summaries and knowledge points, run reusable skills, and generate safe organization plans.
Use it when you want to:
- Ask AI to read PDFs, notes, documents, and course materials stored in Baidu Netdisk.
- Extract summaries, key points, questions, tags, and action items from scattered files.
- Turn cloud-drive folders into a personal knowledge base.
- Review an organization plan before moving any files.
- Process different material types with reusable Markdown/YAML skills.
This is not another cloud-drive UI, and it is not just a thin upload/download wrapper.
It is an AI knowledge assistant interface:
- You authorize Baidu Netdisk by scanning a QR code.
- You ask AI to search or browse files.
- You select one or more files.
- AI reads the content and produces notes, summaries, tags, and folder suggestions.
- Organization is dry-run first, so files are not moved without your approval.
You can ask your AI client:
Find my MCP-related files in Baidu Netdisk, read the recent documents, summarize them as knowledge notes, and suggest where they should be filed.
The MCP server can then:
- Search Baidu Netdisk files.
- Return a numbered file list.
- Create a reusable
selectionId. - Download and parse selected files.
- Generate structured notes and organization suggestions.
Example output:
{
"title": "MCP Study Notes",
"category": "AI",
"tags": ["MCP", "Knowledge Management"],
"summary": "These files explain MCP tool calling, protocol concepts, and client integration.",
"keyPoints": ["MCP lets AI call external tools", "It can become a personal knowledge-base gateway"],
"questions": ["Which clients support MCP?"],
"actionItems": ["Build a list of useful MCP servers"],
"suggestedFolder": "/apps/Knowledge Base/AI/MCP"
}| Feature | Description |
|---|---|
| QR login | Build Baidu OAuth links, terminal QR codes, and PNG data URLs |
| Flexible file selection | Select by numbered search results, remote paths, fs_id, recursive directories, and file types |
| Document reading | Parse .txt, .md, .json, .csv, .pdf, and .docx |
| Long-document chunking | Split long files into chunks for safer AI context usage |
| Knowledge analysis | Summaries, key points, questions, action items, tags, value judgment, and suggested folders |
| Custom skills | Add Markdown/YAML processing templates without changing code |
| Safe organization | Generate dry-run plans before any move/delete action |
| Audit log | Record executed write operations as local JSONL logs |
knowledge-notes: turn scattered files into structured knowledge notes.course-notes: extract concepts, exercises, and review hints from course materials.paper-reader: read papers and extract problems, methods, evidence, and conclusions.book-summary: summarize books and long-form reading materials.cleanup-organizer: suggest cleanup, archive, and classification plans.
The server is conservative by default:
- It does not automatically move or delete Baidu Netdisk files.
- Organization is dry-run first.
- Deletion requires
confirm: "DELETE". - Tokens are stored under the user home directory by default.
- Local file access is restricted by
BAIDU_LOCAL_ROOT. - Write operations are restricted to
/apps/<appName>by default.
- People who store learning materials, papers, ebooks, and project docs in Baidu Netdisk.
- People who want to turn Baidu Netdisk into an AI-readable knowledge base.
- Users of Codex, Claude Desktop, ChatGPT, or other MCP-capable clients.
- Personal knowledge-management users who do not want to manually download and copy file contents.
- People looking for a full graphical Baidu Netdisk app.
- People who only need sync, upload, or download.
- People who do not want to configure a Baidu Open Platform app.
- People who do not use an MCP-capable AI client.
Clone and build:
git clone https://github.com/capwitf/baidu-netdisk-knowledge-mcp.git
cd baidu-netdisk-knowledge-mcp
npm install
npm run buildPrepare Baidu Open Platform credentials:
BAIDU_APP_KEY=your-app-key
BAIDU_SECRET_KEY=your-secret-keyRun locally:
node dist/cli.jsReplace the path with your local repository path:
{
"mcpServers": {
"baidu-netdisk-knowledge": {
"command": "node",
"args": ["C:/path/to/baidu-netdisk-knowledge-mcp/dist/cli.js"],
"env": {
"BAIDU_APP_KEY": "your-app-key",
"BAIDU_SECRET_KEY": "your-secret-key",
"BAIDU_REDIRECT_URI": "oob",
"BAIDU_LOCAL_ROOT": "C:/path/to/baidu-netdisk-knowledge-mcp"
}
}
}
}- Create an app in Baidu Netdisk Open Platform.
- Save the app
AppKeyandSecretKey. - Call
baidu_auth_qrcodefrom your MCP client. - Scan the QR code and pass the returned
codetobaidu_auth_exchange_code. - Tokens are saved locally and refreshed automatically when needed.
Search files:
{
"tool": "baidu_search_selectable_files",
"args": {
"key": "MCP",
"dir": "/apps/Knowledge Base",
"recursion": true
}
}Select by indexes:
{
"tool": "baidu_select_files",
"args": {
"resultId": "res_xxx",
"select": "1,3,5-9"
}
}Read and analyze:
{ "tool": "baidu_read_selection", "args": { "selectionId": "sel_xxx" } }
{ "tool": "baidu_analyze_selection", "args": { "selectionId": "sel_xxx" } }
{ "tool": "baidu_run_skill", "args": { "selectionId": "sel_xxx", "skill": "knowledge-notes" } }Generate an organization plan:
{
"tool": "baidu_plan_organize_selection",
"args": {
"selectionId": "sel_xxx",
"targetRoot": "/apps/Knowledge Base"
}
}baidu_plan_organize_selection only returns a plan. It does not move files.
Authorization
baidu_auth_statusbaidu_auth_urlbaidu_auth_qrcode_urlbaidu_auth_qrcodebaidu_auth_exchange_codebaidu_auth_refresh
Browse and selection
baidu_quotabaidu_list_filesbaidu_list_all_filesbaidu_search_filesbaidu_search_selectable_filesbaidu_list_selectable_filesbaidu_select_filesbaidu_file_metas
Knowledge base
baidu_read_selectionbaidu_analyze_selectionbaidu_list_skillsbaidu_run_skillbaidu_plan_organize_selection
File operations
baidu_create_folderbaidu_rename_filebaidu_copy_filebaidu_move_filebaidu_delete_filebaidu_upload_filebaidu_download_filebaidu_operation_log
Put .md, .markdown, .yaml, or .yml files in BAIDU_SKILLS_DIR.
Markdown example:
---
name: my-research-note
description: Research note extractor
category: research
outputSchema: knowledge-note
---
Extract thesis, evidence, questions, and follow-up tasks.Use baidu_list_skills to list skills and baidu_run_skill to run one.
See .env.example for all options.
| Variable | Description | Default |
|---|---|---|
BAIDU_APP_KEY |
Baidu Open Platform AppKey | Required |
BAIDU_SECRET_KEY |
Baidu Open Platform SecretKey | Required |
BAIDU_REDIRECT_URI |
OAuth redirect URI | oob |
BAIDU_SCOPE |
OAuth scope | basic,netdisk |
BAIDU_TOKEN_STORE |
token file | ~/.baidu-netdisk-mcp/tokens.json |
BAIDU_OPERATION_LOG |
write-operation audit log | ~/.baidu-netdisk-mcp/operations.jsonl |
BAIDU_SELECTION_STORE |
selection store | ~/.baidu-netdisk-mcp/selections.json |
BAIDU_CACHE_ROOT |
local cache root | ~/.baidu-netdisk-mcp/cache |
BAIDU_SKILLS_DIR |
custom skills directory | ~/.baidu-netdisk-mcp/skills |
BAIDU_LOCAL_ROOT |
local file access root | current working directory |
BAIDU_STRICT_APP_PATHS |
restrict writes to /apps/<appName> |
true |
BAIDU_UPLOAD_CHUNK_SIZE_BYTES |
upload chunk size | 4194304 |
BAIDU_TRANSFER_MAX_RETRIES |
upload/download retries | 3 |
npm run checkThis runs TypeScript build and Vitest tests.
Baidu Netdisk MCP, Baidu Pan MCP, 百度网盘 MCP, Baidu Netdisk Knowledge Base, AI knowledge base, MCP server, personal knowledge management, AI file organizer
MIT