AutoShelf - Auto-organize files on your Mac | Product Hunt
← Back to journey

How to Use AI to Organize Files on Your Mac (With Claude and MCP)

Cloud chatbots cannot touch your Mac's files. Local MCP clients can. Here is how I connect Claude Desktop to AutoShelf so the AI writes file rules once and the app does the work every day after.

How to Use AI to Organize Files on Your Mac (With Claude and MCP)

People keep asking me whether they can just tell an AI to clean up their Downloads folder. You can, but only with the right kind of AI client, and there are two very different ways to do it.

Can AI organize files on my Mac?

It depends on where the AI runs. Cloud chat apps like ChatGPT on the web or Claude.ai run on remote servers and cannot reach the files on your Mac. Local MCP clients like Claude Desktop, Codex, Cursor, and Windsurf run on your machine and can. For a one-time cleanup of a single messy folder, letting a local agent move files directly is fine. For folders that keep filling up (Downloads, Desktop, screenshots), you are better off having the AI write rules that keep running without it. That second approach is what AutoShelf is built for.

What is MCP?

MCP (Model Context Protocol) is an open standard that lets AI applications connect to local and remote tools. A program that exposes tools over MCP is called an MCP server. An AI app that calls those tools is an MCP client.

AutoShelf exposes its rule engine as an MCP server. When you connect it, your AI assistant can list your rules, create new ones, change existing ones, and run them. If you are curious how the server itself works, I wrote about it in Building a JSON-RPC 2.0 MCP Server With Zero Dependencies.

Why can't ChatGPT or Claude.ai organize my files?

Because they do not run on your Mac. The AutoShelf MCP server is a local process that talks to the AutoShelf app through a local Unix socket. A web chat running in a data center has no way to start that process or open that socket.

Should the AI move files directly, or write rules?

There are two ways to get an AI to organize files.

Direct file moves. You give a local agent shell or file access and ask it to sort a folder. It reads the folder, decides where each file goes, and moves them. This works, but the AI has to do the job again every time new files arrive, and each run is a fresh judgment call. You are also trusting it with broad file access.

Durable rules. The AI describes what you want as a rule: a watched folder, a condition, and an action. The rule lives in AutoShelf. From then on, AutoShelf applies it to every new file on its own, with no AI in the loop and no tokens spent.

AI moves files directly AI writes AutoShelf rules
Who touches the files The AI agent The AutoShelf app
Runs when you are not chatting No Yes, from the menu bar
Same result every time Not guaranteed Yes, rules are explicit
Good for One-off cleanups of old clutter Folders that keep filling up
Can you inspect the logic Only in the chat history Yes, in the app, the CLI, or by asking the AI

I use both. If I have a folder of 400 old files to sort once, direct moves are quicker. For Downloads, I want rules.

How do I connect Claude Desktop to AutoShelf?

You need the AutoShelf app installed and running, plus the AutoShelf CLI, because the MCP server is built into the CLI.

  1. Install AutoShelf from the Mac App Store and open it so it is running in the menu bar.

  2. Install the CLI from Terminal:

    curl -fsSL https://useautoshelf.com/cli/install.sh | sh
    

    This installs to /usr/local/bin/autoshelf.

  3. Open your Claude Desktop config file. It lives at ~/Library/Application Support/Claude/claude_desktop_config.json. From Terminal:

    mkdir -p ~/Library/Application\ Support/Claude
    touch ~/Library/Application\ Support/Claude/claude_desktop_config.json
    open -e ~/Library/Application\ Support/Claude/claude_desktop_config.json
    
  4. Add the AutoShelf server:

    {
      "mcpServers": {
        "autoshelf": {
          "command": "/usr/local/bin/autoshelf",
          "args": ["mcp"]
        }
      }
    }
    

    If the file already has an mcpServers block, add the autoshelf entry inside it rather than replacing the whole file.

  5. Restart Claude Desktop.

  6. Ask it something simple, like "What AutoShelf rules do I have?" If it answers with your rule list, you are connected.

The same pattern, a command of /usr/local/bin/autoshelf with the argument mcp, works for other local MCP clients such as Codex, Cursor, and Windsurf. Each one keeps its MCP config in its own place, so check that client's documentation for where to put it. The MCP setup page has the current list of supported clients.

What can I ask the AI to do?

Through MCP, the assistant can do four things with AutoShelf:

  • Create rules from a plain-language description
  • Audit active rules and watched folders
  • Modify existing rules
  • Troubleshoot a rule that did not trigger

It works with the same conditions and actions you have in the app. Conditions include file type, file extension, filename, source URL, the app that downloaded the file, size, and age. Actions include move, copy, rename, tag, trash, archive to ZIP, and optimize images.

Example prompts and the rules they produce

Here are prompts I would actually type, and the rule each one turns into.

  1. "Whenever I download a ZIP file from GitHub, move it to my Developer folder."
    Watched folder: Downloads. Conditions: extension is zip and source URL contains github.com. Action: move to ~/Developer.

  2. "Delete DMG files in Downloads once they are more than a week old."
    Watched folder: Downloads. Conditions: extension is dmg and date added is older than 7 days. Action: move to Trash.

  3. "Anything I download with Arc should go into an Arc Downloads folder in Documents."
    Watched folder: Downloads. Condition: downloaded by Arc. Action: move to ~/Documents/Arc Downloads.

  4. "Tag every PDF with 'invoice' in the name and move it to Finance."
    Watched folder: Downloads. Conditions: extension is pdf and filename contains invoice. Actions: add a Finder tag, then move to ~/Documents/Finance.

  5. "Shrink the PNG screenshots on my Desktop."
    Watched folder: Desktop. Condition: extension is png. Action: optimize the image. This is also a Pro action. If you are on the free version, the AI does not see the Pro-only actions at all, so it will not offer them.

  6. "Zip up anything on my Desktop I haven't opened in 30 days."
    Watched folder: Desktop. Condition: last opened more than 30 days ago. Action: archive to ZIP.

After a rule is created, it shows up in the AutoShelf app like any rule you made by hand. You can preview it with a dry run before it touches anything, and edit it in the app, the CLI, or the chat.

How do I check what the AI built?

Ask it. "List my AutoShelf rules and explain what each one does" is the prompt I use most.

You can also check from Terminal with the CLI:

autoshelf rules list
autoshelf folders

And if a rule did not fire, ask "Why didn't my DMG rule move anything?" The assistant can inspect the rule and the watched folder status and suggest a fix.

Is it private?

Yes. The MCP server runs entirely on your Mac and talks to the AutoShelf app over a local Unix socket. AutoShelf itself has no analytics, no tracking, and makes no network calls. All data stays on your device.

One thing to keep in mind: the AI client you connect is a separate app. Whatever you type into Claude Desktop or Codex goes to that model's provider under their own terms. AutoShelf only sends the AI what it asks for through the MCP tools, such as rule definitions and folder status. The file processing itself happens locally in AutoShelf, whether or not the AI is running.

What does it cost?

AutoShelf is free with 1 rule, or $19.99 one-time for unlimited rules, with no subscription (as of October 2026). It requires macOS 14 Sonoma or later. The MCP server comes with the CLI.

If you would rather start without AI at all, the built-in templates cover the common cases, and the Hazel comparison explains when Hazel is the better fit.

Frequently asked questions

Does the AI need to stay open for my rules to work?

No. Once a rule exists, AutoShelf runs it from the menu bar. The AI is only needed to create, change, or inspect rules.

Can I use AutoShelf with ChatGPT?

Not with ChatGPT on the web, because it runs in the cloud and cannot reach a local server on your Mac. Codex, OpenAI's local CLI, is a supported MCP client.

Do rules created by the AI show up in the app?

Yes. Rules created through MCP appear in the AutoShelf app and in the CLI, and rules you make in the app are visible to the AI. They share the same engine.

Can the AI delete my files?

Only by creating a rule with a trash action, and those rules move files to the Trash rather than deleting them permanently. Use a dry run to see exactly which files would match before turning a new rule on.

Do I need the app if I only use MCP?

Yes. The MCP server is part of the AutoShelf CLI, and the CLI requires the AutoShelf app to be installed and running.