内容
[](https://mseep.ai/app/alexandervtr-cursor-mcp-file-organizer)
# Cursor MCP File Organizer
一个 Model Context Protocol (MCP) server,用于使用 Cursor IDE 整理 Downloads 文件夹中的文件。
## Features
- 自动按类型整理 Downloads 文件夹中的文件
- 支持多种文件类别:
- Images (jpg, jpeg, png, gif, webp, svg, etc.)
- Documents (pdf, doc, docx, txt, etc.)
- Archives (zip, rar, 7z, tar, etc.)
- Code files (js, ts, py, java, etc.)
- Media files (mp4, mp3, wav, etc.)
- Design files (psd, ai, sketch, etc.)
- Databases (sql, sqlite, etc.)
- Fonts (ttf, otf, woff, etc.)
- 可配置的组织规则
- 实时文件系统监控
- SSE (Server-Sent Events) 支持实时更新
## Prerequisites
- Node.js (v14 or higher)
- TypeScript
- Cursor IDE
## Installation
1. 克隆仓库:
```bash
git clone https://github.com/AlexanderVTr/cursor-mcp-file-organizer.git
cd cursor-mcp-file-organizer
```
2. 安装依赖:
```bash
npm install
```
3. 构建项目:
```bash
npm run build
```
## Configuration
1. 配置 Cursor IDE MCP 设置:
```json
{
"mcpServers": {
"file-organizer": {
"url": "http://localhost:3001",
"port": 3001,
"enabled": true,
"description": "File organization MCP server"
}
}
}
```
2. 在 `mcp-config.json` 中自定义组织规则:
```json
{
"version": "1.0",
"rules": {
"downloads": {
"path": "~/Downloads",
"organizeBy": {
"images": {
"extensions": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"],
"destination": "~/Downloads/Pictures"
}
// ... other categories
}
}
}
}
```
## Usage
1. 启动服务器:
```bash
npm start
```
2. 使用 Cursor IDE 发送命令:
```typescript
// Example command to organize files
{
command: "organizeFiles",
args: {
path: "~/Downloads"
}
}
```
## Available Commands
- `listDir`: 列出目录内容
- `readFile`: 读取文件内容
- `writeFile`: 将内容写入文件
- `moveFile`: 将文件移动到新位置
- `createDir`: 创建目录
- `organizeFiles`: 按类型整理文件
## Development
```bash
# Run in development mode with hot reload
npm run dev
# Build the project
npm run build
# Start the server
npm start
```
## Project Structure
```
cursor-mcp-file-organizer/
├── src/
│ ├── server.ts # Main server implementation
│ └── organizer.ts # File organization logic
├── dist/ # Compiled JavaScript
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── mcp-config.json # Organization rules
```
## Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## License
This project is licensed under the MIT License - see the LICENSE file for details.
## Acknowledgments
- Cursor IDE team for the MCP protocol
- Node.js community for the excellent tools and libraries
Certified by MCP Review https://mcpreview.com/mcp-servers/alexandervtr/cursor-mcp-file-organizer
连接信息
猜你喜欢
everything-claude-code
完整的 Claude Code 配置集合 - agents、skills、hooks、commands、rules、MCPs。来自 Anthropic...
MarkItDown
将文件和办公文档转换为Markdown的Python工具。
awesome-claude-skills
一份精心整理的 Claude Skills、资源和工具列表,用于定制 Claude AI 工作流程
agentic-awesome-skills
适用于 Claude Code、Cursor、Codex CLI、Autohand Code、Gemini CLI、Antigravity 等的...
antigravity-awesome-skills
Claude Code/Antigravity/Cursor 的 130 多个 Agentic Skills 终极合集。 经过实战检验、高性能的 AI...
context-mode
MCP 是用于工具访问的协议。我们是上下文的虚拟化层。