MCP-NetDisk
A private cloud storage system with Model Context Protocol integration that allows AI models to manage files through operations like searching, reading, and creating content. It features a complete web interface for user administration, storage quota management, and rich media previews.
README
MCP-NetDisk 智能网盘
一个具备 MCP (Model Context Protocol) 集成能力的私有网盘系统。
功能特性
核心功能
- 文件管理: 上传、下载、预览、删除文件
- 文件夹管理: 创建、浏览文件夹
- 存储配额: 每个用户独立的存储空间限制
预览支持
- Markdown: 完整的 GFM 支持 + Mermaid 图表渲染
- 图片: JPG, PNG, GIF, WebP, SVG
- 视频: MP4, WebM, OGG
- 音频: MP3, WAV, OGG
- HTML: 沙箱预览
- PDF: 在线预览
- 代码: 语法高亮
MCP 集成
- 创建 API Token
- 生成 MCP 配置
- AI 可以通过 Token 访问您的网盘文件
- 支持搜索、读取、创建、删除文件
用户管理
- 管理员创建用户
- 存储配额管理
- 用户状态管理(启用/禁用)
- 无自助注册
快速开始
1. 安装依赖
npm install
2. 初始化数据库
npx prisma generate
npx prisma db push
npm run prisma:seed # 创建默认管理员
3. 配置环境变量
编辑 .env 文件:
DATABASE_URL="file:./dev.db"
JWT_SECRET="your-secret-key-change-this"
UPLOAD_DIR="./uploads"
4. 启动开发服务器
npm run dev
访问 http://localhost:3000
5. 登录
- 用户名:
admin - 密码:
admin123
MCP 配置
创建 Token
- 登录后进入 "Token 管理"
- 点击 "创建 Token"
- 填写名称并创建
Claude Desktop 配置
在 Claude Desktop 配置文件中添加:
{
"mcpServers": {
"netdisk": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "http://localhost:3000/api/mcp"],
"env": {
"NETDISK_TOKEN": "your-token-here"
}
}
}
}
MCP 工具
list_files: 列出目录文件search_files: 搜索文件read_file: 读取文件内容create_file: 创建新文件update_file: 更新文件delete_file: 删除文件get_storage_stats: 获取存储统计
技术栈
- 前端: Next.js 14, React 18, Tailwind CSS
- 后端: Next.js API Routes
- 数据库: SQLite, Prisma ORM
- 认证: JWT
- Markdown: react-markdown, remark-gfm, mermaid
项目结构
mcp-netdisk/
├── prisma/
│ └── schema.prisma # 数据库模型
├── src/
│ ├── app/
│ │ ├── api/ # API 路由
│ │ ├── dashboard/ # 管理界面
│ │ └── login/ # 登录页
│ ├── components/ # React 组件
│ └── lib/ # 工具函数
├── uploads/ # 文件存储目录
└── package.json
许可证
MIT License
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.
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.
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.
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.