
Cursor File Organizer
在 macOS 中按类型排序下载文件夹中的文件
概述
Cursor MCP 文件整理器
这是一个用于使用 Cursor IDE 整理 Downloads 文件夹中文件的 Model Context Protocol (MCP) 服务器。
功能
- 自动按类型整理 Downloads 文件夹中的文件
- 支持多种文件类别:
- 图像 (jpg, jpeg, png, gif, webp, svg 等)
- 文档 (pdf, doc, docx, txt 等)
- 压缩文件 (zip, rar, 7z, tar 等)
- 代码文件 (js, ts, py, java 等)
- 媒体文件 (mp4, mp3, wav 等)
- 设计文件 (psd, ai, sketch 等)
- 数据库 (sql, sqlite 等)
- 字体 (ttf, otf, woff 等)
- 可配置的整理规则
- 实时文件系统监控
- 支持 SSE(Server-Sent Events)以实现实时更新
先决条件
- Node.js (v14 或更高版本)
- TypeScript
- Cursor IDE
安装
- 克隆仓库:
bash
git clone https://github.com/AlexanderVTr/cursor-mcp-file-organizer.git
cd cursor-mcp-file-organizer
- 安装依赖:
bash
npm install
- 构建项目:
bash
npm run build
配置
- 配置 Cursor IDE 的 MCP 设置:
json
{
"mcpServers": {
"file-organizer": {
"url": "http://localhost:3001",
"port": 3001,
"enabled": true,
"description": "文件整理 MCP 服务器"
}
}
}
- 在
mcp-config.json
中自定义整理规则:
json
{
"version": "1.0",
"rules": {
"downloads": {
"path": "~/Downloads",
"organizeBy": {
"images": {
"extensions": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"],
"destination": "~/Downloads/Pictures"
}
// ... 其他类别
}
}
}
}
使用
- 启动服务器:
bash
npm start
- 使用 Cursor IDE 发送命令:
typescript
// 示例命令以整理文件
{
command: "organizeFiles",
args: {
path: "~/Downloads"
}
}
可用命令
listDir
: 列出目录内容readFile
: 读取文件内容writeFile
: 将内容写入文件moveFile
: 将文件移动到新位置createDir
: 创建目录organizeFiles
: 按类型整理文件
开发
bash
# 以开发模式运行并启用热重载
npm run dev
# 构建项目
npm run build
# 启动服务器
npm start
项目结构
cursor-mcp-file-organizer/
├── src/
│ ├── server.ts # 主服务器实现
│ └── organizer.ts # 文件整理逻辑
├── dist/ # 编译后的 JavaScript
├── package.json # 依赖和脚本
├── tsconfig.json # TypeScript 配置
└── mcp-config.json # 整理规则
贡献
- 叉仓库
- 创建你的功能分支 (
git checkout -b feature/amazing-feature
) - 提交更改 (
git commit -m 'Add some amazing feature'
) - 推送到分支 (
git push origin feature/amazing-feature
) - 提交 Pull Request
许可证
本项目采用 MIT 许可证,详情请参阅 LICENSE 文件。
致谢
- 感谢 Cursor IDE 团队提供的 MCP 协议
- 感谢 Node.js 社区提供的出色工具和库

1panel
mcp-1panel 是为 1Panel 实现的 Model Context Protocol (MCP) 服务器。
Aact mcp
与AACT临床试验数据库集成,支持查询和分析大规模试验数据,适用于研究和医疗应用。
Abap Adt
一个服务器,它将模型上下文协议(MCP)与SAP ABAP系统连接起来,使像Cline这样的工具能够检索ABAP源代码、表结构和其他开发工件。
Adwords Mcp
一个令人尴尬的MCP服务器,向Cursor、Claude和其他客户端的开发者提供广告