Build an AI-Powered File Organizer with MCP (Filesystem + Google Drive Recipe)
Nikhil Tiwari
MCP Playground
🍳 MCP Recipe
- What you'll build: An AI assistant that organizes files locally and in Google Drive using natural language
- MCP servers used: Filesystem MCP, Google Drive MCP
- Time to complete: 50-70 minutes
- Difficulty: Intermediate
Downloads folder full of PDFs, screenshots, and random files? This recipe gives you an AI file organizer that sorts files by type, date, or project—using plain English.
You'll build an assistant that can:
- List and scan folders (local or Google Drive)
- Move or copy files by rules you describe in natural language
- Create folder structures and rename files in bulk
- Summarize what's in a folder before organizing
What You'll Build
"Sort my Downloads by file type"
Uses MCP to list files, then move by extension
PDFs, images, and docs in separate folders
Prerequisites
Local file read/write (STDIO)
OAuth or API key for Drive
Claude Desktop or Cursor
Step 1: Set Up Filesystem MCP
Filesystem MCP runs locally and exposes tools to read, write, list, and move files within allowed directories. Install and restrict it to folders you want the AI to access (e.g. Downloads, Documents).
Example Claude Desktop config (limit to safe paths):
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/Downloads", "/path/to/Documents"]
}
}
}
Step 2: Set Up Google Drive MCP
Use a Google Drive MCP server (e.g. community or official) that supports OAuth or service account. Configure it in your MCP client so the AI can list, create folders, and move/copy files in Drive.
After setup, verify tools like: list files, create folder, move file, upload file.
Step 3: Example Prompts
- "List everything in my Downloads folder and group by file extension. Then create folders for PDFs, images, and documents and move files into them."
- "In my Google Drive 'Projects' folder, create a subfolder for each client name that appears in the filenames, and move each file into the right client folder."
- "Find all screenshots from the last 7 days in Downloads and move them to Documents/Screenshots/2026-01."
Best Practices
- Always restrict Filesystem MCP to specific directories—never give access to system or home root.
- For Drive, use a dedicated service account or OAuth scope with minimal permissions (e.g. only specific folders).
- Ask the AI to summarize what it will do before performing move/delete operations.
Related Recipes
Frequently Asked Questions
Is it safe to give Filesystem MCP access to my folders?
Can I use this only with local files (no Google Drive)?
Written by Nikhil Tiwari
15+ years in product development. AI enthusiast building developer tools that make complex technologies accessible to everyone.
Related Resources