Back to Blog
RecipeJan 22, 202616 min read

Build an AI-Powered File Organizer with MCP (Filesystem + Google Drive Recipe)

NT

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

1. You Ask

"Sort my Downloads by file type"

2. AI Plans

Uses MCP to list files, then move by extension

3. Done

PDFs, images, and docs in separate folders

Prerequisites

Filesystem MCP

Local file read/write (STDIO)

Google Drive MCP

OAuth or API key for Drive

MCP Client

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.

Test MCP Servers in Your Browser

Try remote MCP servers without local setup

Open MCP Playground →

Related Recipes

Frequently Asked Questions

Is it safe to give Filesystem MCP access to my folders?
Only if you limit it to specific directories (e.g. Downloads, a project folder). Never give it access to your entire home directory or system paths. The MCP server only has access to paths you explicitly pass in the config.
Can I use this only with local files (no Google Drive)?
Yes. You can use only Filesystem MCP for local organization. Add Google Drive MCP later if you want the same logic for cloud storage.
NT

Written by Nikhil Tiwari

15+ years in product development. AI enthusiast building developer tools that make complex technologies accessible to everyone.