Skip to content

MCP server

An MCP server (in mcp/) exposes the suite to AI agents such as Claude Desktop. It's a thin Python wrapper that shells out to the built folder_* executables over stdio — the C++ tools stay dependency-free; only this wrapper needs Python.

Tools

Tool Wraps Notes
compare folder_parity report differences; use_hash, ignore_system
sync folder_parity --sync sync_to, prefer
find folder_find name, contains, size/age filters
view folder_view text or as_hex
clean folder_clean dry-run unless delete=True
copy folder_copy overwrite
move folder_move move / rename
delete folder_delete dry-run unless force=True

Destructive operations are dry-run by default; sync/copy/move only ever add or overwrite.

Setup

Build the CLI tools first, then:

cd mcp
pip install -r requirements.txt
python server.py            # stdio transport, for an MCP client

The server finds the executables via $FOLDER_TOOLS_DIR, else the repo root.

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "folder-tools": {
      "command": "python",
      "args": ["D:/Github-Sina/folder_parity/mcp/server.py"],
      "env": { "FOLDER_TOOLS_DIR": "D:/Github-Sina/folder_parity" }
    }
  }
}

Then: "compare J:\Photos and I:\Photos by hash", "find *.log over 1 MB under D:\logs", "clean OS junk in this folder (dry run)".