Skip to main content
Glama
Claude File Manager MCP

Claude File Manager MCP

by sadd11

Claude File Manager MCP

An MCP server for Claude that can create, read, edit, copy, move and delete files and folders — plus images, bulk replacements, ZIP archives, a compact project tree, and an optional terminal with background processes.

It runs locally over stdio, without internet access or third-party services.

Features

Tool

What it does

list_roots

Shows the allowed folders (one or several)

list_directory

Lists folder contents (optionally recursive)

list_tree

Draws a compact project tree

read_file

Reads a text file, optionally a line range

read_image

Shows a PNG/JPEG/GIF/WebP image to Claude

write_file

Creates or overwrites a file

append_file

Appends text to the end of a file

edit_file

Replaces an exact fragment and shows a diff

multi_edit

Several replacements in one call, atomically

replace_in_files

Replaces text across many files, with one undo step

create_directory

Creates a folder with all missing parents

move_path

Moves or renames a file/folder

copy_path

Copies a file or folder

zip_path

Packs files and folders into a ZIP archive

unzip_path

Extracts a ZIP archive into a folder

delete_path

Moves to trash (or permanently with permanent=true)

file_info

Shows type, size and dates of a file/folder

find_files

Finds files by glob or name substring

search_content

Searches text/regex, with context lines or a file list

list_trash

Shows the trash

restore_path

Restores a file/folder from the trash

undo_last_change

Undoes the last change (up to 20 steps)

run_command

Runs a terminal command (optional, off by default)

start_process

Starts a background command (optional, off by default)

read_output

Reads the output of a background process

stop_process

Stops a background process and its children

list_processes

Lists background processes of this session

That is 27 tools with the terminal enabled and 22 without. The five terminal tools are disabled unless MCP_ALLOW_SHELL=1 is set. All other tools work with files only.

Related MCP server: FS-MCP

Windows installation (prebuilt installer)

Download ClaudeFileManager-Setup-1.3.0.exe.

  1. Run the installer. If Windows shows the blue SmartScreen window, click More info → Run anyway (the file has no digital signature).

  2. It installs without administrator rights into %LOCALAPPDATA%\ClaudeFileManager. Node.js is bundled — nothing else needs to be installed.

  3. On the last screen the installer shows the instructions and offers "Run setup now".

  4. In the browser choose a folder → Use this folder → Connect to Claude Desktop → restart Claude Desktop.

"Claude File Manager" shortcuts appear in the Start menu and (optionally) on the desktop. Uninstall via Settings → Apps.

Portable version: ClaudeFileManager-Portable-1.3.0.zip — extract anywhere and run start-ui.cmd. No installation required.

Building the installer

winget install --id JRSoftware.InnoSetup -e
npm run build:installer

The output appears in installer\out. The script copies the Node runtime, installs production dependencies, draws the icon and builds both the .exe and the portable .zip.

Run from source

git clone https://github.com/sadd11/claude-file-manager-mcp.git
cd claude-file-manager-mcp
npm install
npm run ui

Or double-click start-ui.cmd.

The page http://127.0.0.1:4317 opens:

  1. Choose a folder — browse drives and subfolders, paste a path manually, or click Browse… and pick a folder in the system dialog.

  2. Click Use this folder.

  3. Optionally add more folders under Additional folders — Claude can then work in all of them, and can choose the right one itself.

  4. Click Connect to Claude Desktop.

  5. Fully close and reopen Claude Desktop.

The UI also provides:

  • Check server — actually starts the MCP server and lists the working tools;

  • a "Connected to Claude Desktop" indicator that shows which folders are used;

  • a list of recent folders;

  • a History and recovery section with Trash, Backups, Commands and Activity tabs — deleted items and file versions can be restored with one click, without writing a prompt;

  • an Open button that reveals the selected folder in Explorer;

  • an "Allow terminal commands" switch (see below);

  • the JSON config and a ready-made Claude Code command.

The UI creates (or carefully updates) %APPDATA%\Claude\claude_desktop_config.json, saves a backup, and shows the JSON config and Claude Code command if you prefer to connect manually.

Keep the console window open while you use the UI. Stop it with Ctrl+C.

Manual setup

Check that the server starts:

npm start

The server starts and waits for JSON-RPC on stdin — this is expected; nothing must be written to stdout. Stop it with Ctrl+C.

Connecting to Claude Desktop manually

  1. Open the config file: %APPDATA%\Claude\claude_desktop_config.json (create it if it does not exist).

  2. Add the server:

{
  "mcpServers": {
    "files": {
      "command": "node",
      "args": ["C:\\path\\to\\claude-file-manager-mcp\\src\\index.js"],
      "env": {
        "MCP_FILE_ROOT": "C:\\path\\to\\your\\project"
      }
    }
  }
}
  1. Fully close and reopen Claude Desktop.

  2. A tools icon appears in the chat — the files server is ready.

MCP_FILE_ROOT is the folder the server is allowed to work in. Point it at your project so Claude cannot accidentally change something elsewhere. To allow several folders, use MCP_FILE_ROOTS instead with paths separated by ; (Windows) or : (macOS/Linux). Relative paths resolve against the first folder. Add "MCP_ALLOW_SHELL": "1" to env to enable the optional terminal tools.

Connecting to Claude Code (CLI)

claude mcp add files --scope user `
  --env MCP_FILE_ROOT="C:\path\to\your\project" `
  -- node "C:\path\to\claude-file-manager-mcp\src\index.js"

Verify:

claude mcp list

Trash, backups and undo

The server creates a service directory .mcp inside the working folder:

.mcp/
├─ trash/       deleted files and folders
├─ backups/     copies saved before edits
├─ trash.json   trash index
├─ activity.json change history
└─ commands.log terminal command log (if the terminal is enabled)

The service folder lives in the first allowed folder. With several roots, trash, backups and history are still stored there.

  • delete_path by default does not destroy the file; it moves it to the trash. Restore it with restore_path or undo_last_change.

  • edit_file, multi_edit, write_file and append_file save a copy of the old version before modifying.

  • replace_in_files backs up every changed file and records a single undo step, so one undo_last_change reverts the whole bulk replacement.

  • zip_path and unzip_path can be undone when they create a new path.

  • undo_last_change reverts the last action; several steps can be undone.

  • Permanent deletion happens only with permanent=true.

  • The setup UI shows the same trash, backups, commands and activity, with Restore buttons. A backup restore first saves the current version as a new backup, so it can be undone too.

If your project is under git, add .mcp/ to its .gitignore.

Terminal tool (optional)

run_command lets Claude run a shell command in the chosen folder — for example npm test, git status or a build script. It is off by default so that a plain installation stays file-only.

Enable it in one of these ways:

  • tick Allow terminal commands (run_command) in the setup UI and click Connect to Claude Desktop again;

  • add "MCP_ALLOW_SHELL": "1" to the env block of the files server in the Claude Desktop config;

  • pass --env MCP_ALLOW_SHELL=1 to claude mcp add.

What it does:

  • runs in the same allowed folder as the file tools (outside folders are rejected unless MCP_ALLOW_OUTSIDE_ROOT=1);

  • returns stdout, stderr and the exit code;

  • stops the command after the timeout (default 30 s, maximum 300 s) and kills the whole process tree;

  • appends one JSON line per command to .mcp/commands.log.

On Windows the default shell is Windows PowerShell (powershell.exe). The command is passed as a UTF-16LE -EncodedCommand, so Cyrillic and other non-ASCII text works in arguments and output. Use PowerShell syntax: Get-ChildItem, Get-Content, $env:NAME, and so on.

MCP_SHELL

Shell

powershell

powershell.exe (default on Windows)

pwsh

PowerShell 7

cmd

cmd.exe (legacy, non-ASCII text may break)

sh

/bin/sh (default on macOS/Linux)

bash

bash (macOS/Linux)

Background processes

For dev servers, watchers and long builds there are four more tools, enabled by the same switch:

  • start_process starts a command in the background and returns an id;

  • read_output returns what it has printed so far, can wait for it to finish and can clear the buffer;

  • stop_process stops it and the whole process tree;

  • list_processes lists the processes of this session.

Up to 8 processes can run at once (MCP_MAX_PROCESSES), each keeps at most 100000 characters of stdout and stderr (MCP_MAX_PROCESS_BUFFER), and all of them are stopped when the server exits. Starts and exits are also written to .mcp/commands.log.

The terminal is not a sandbox. Commands run with your user rights and every side effect is real — rm, git reset --hard and similar commands do what they say, and the file tools' trash and undo do not cover them. Leave the switch off unless you need it, and read a command before you approve it.

Example prompts

  • "Find all *.tsx files in src."

  • "Show me the project tree two levels deep."

  • "Look at design/mockup.png and build the same layout."

  • "Find where MCP_FILE_ROOT is used and show two lines of context."

  • "In config.js replace port: 3000 with port: 8080 and debug: false with debug: true — do it in one action."

  • "Replace oldName with newName in every .js file under src."

  • "Zip src and README.md into release.zip."

  • "Delete temp.log." → the file goes to the trash.

  • "Run npm test and show me the failures." (terminal enabled)

  • "Start npm run dev in the background and show its output." (terminal enabled)

  • "Run git status in this folder." (terminal enabled)

  • "Restore the last deletion." / "Undo the last two changes."

  • "Show the trash."

  • "Create docs/api.md and describe the endpoints from src/routes."

Settings (environment variables)

Variable

Default

Description

MCP_FILE_ROOT

current directory

Root folder inside which operations are allowed

MCP_FILE_ROOTS

—

Several allowed folders separated by ; / :

MCP_ALLOW_OUTSIDE_ROOT

0

1 — allow arbitrary paths (use with care!)

MCP_ALLOW_SHELL

0

1 — register the terminal and background tools

MCP_SHELL

powershell / sh

Shell used by run_command (cmd, pwsh, bash)

MCP_MAX_OUTPUT_CHARS

200000

stdout/stderr capture limit per command

MCP_MAX_READ_CHARS

400000

Character limit when reading a file

MCP_MAX_LIST_ENTRIES

5000

Entry limit when listing

MCP_MAX_IMAGE_BYTES

5000000

Largest image read_image will return

MCP_MAX_PROCESSES

8

Maximum number of background processes

MCP_MAX_PROCESS_BUFFER

100000

Buffered output characters per background process

MCP_MAX_ARCHIVE_BYTES

500000000

Size limit for ZIP sources and extraction

MCP_DATA_DIR

<root>/.mcp

Where to store trash, backups and history

UI_PORT

4317

Local UI port (npm run ui)

UI_NO_OPEN

—

1 — do not open the browser automatically

Security

  • All paths are normalized; escaping every allowed folder is blocked.

  • Root folders cannot be deleted, moved or overwritten.

  • A non-empty folder can only be deleted with recursive=true.

  • Overwriting or copying onto an existing file requires overwrite=true.

  • The service folder .mcp is protected from changes through the tools.

  • Deletion is reversible by default: the file goes to the trash.

  • Archives are extracted inside the destination only; paths that try to escape it are rejected, ZIP64 and encrypted archives are not supported.

  • The server never runs shell commands unless MCP_ALLOW_SHELL=1 is set. When enabled, commands run with your user rights, are limited to the allowed folders, are logged to .mcp/commands.log, and are not covered by trash or undo. Background processes are capped and stopped when the server exits.

  • The UI listens on 127.0.0.1 only and requires a random token in the URL, so other devices and websites cannot control it.

If you need access to the whole disk, set MCP_ALLOW_OUTSIDE_ROOT=1. Do this consciously: Claude will be able to change any file your user has rights to.

Development

npm run inspect

Starts MCP Inspector for manual testing of the tools.

License

MIT

Available Tools

22 tools
append_fileAppend to a fileA

Appends text to the end of a file, creating it if needed.

Inputs: path (required), content (required), create_parents.

copy_pathCopy a file or folderC

Copies a file or folder (folders recursively).

Inputs: source (required), destination (required), overwrite.

create_directoryCreate a folderB

Creates a folder (including all missing parents by default).

Inputs: path (required), recursive.

delete_pathDelete a file or folderA

Deletes a file or folder. By default the item goes to the trash (/app/.mcp/trash) and can be restored via restore_path or undo_last_change. A non-empty folder can only be deleted with recursive=true. The root folder cannot be deleted.

Inputs: path (required), permanent, recursive.

edit_fileEdit a fileA

Replaces an exact occurrence of old_string with new_string and shows a diff. If old_string occurs more than once, set replace_all=true explicitly. A backup is saved before editing (undo_last_change).

Inputs: path (required), new_string (required), old_string (required), replace_all.

file_infoFile or folder infoC

Returns the type, size and modification time of an item.

Inputs: path (required).

find_filesFind files by nameA

Finds files by glob (*.js, src/**/*.ts, config*) or a substring in the name. Service folders (node_modules, .git, .mcp) are skipped.

Inputs: pattern (required), path, ignore, max_depth, +2 more.

list_directoryList a folderC

Lists files and folders. Paths can be relative to the server's root folder. Supports recursive traversal.

Inputs: path, max_depth, recursive, show_hidden.

list_rootsShow the allowed foldersA

Lists the folders this server may work in. Relative paths in other tools resolve against the first root; absolute paths are accepted inside any listed root.

Inputs: no named parameters.

list_trashShow the trashB

Lists deleted files and folders that can be restored.

Inputs: no named parameters.

list_treeShow a compact project treeA

Renders a compact tree of folders and files with box-drawing characters. Much less noisy than a recursive list_directory. Skips node_modules, .git, .mcp and other service folders by default; limits depth and total entries.

Inputs: path, depth, ignore, show_files, +3 more.

move_pathMove or renameC

Moves or renames a file or folder.

Inputs: source (required), destination (required), overwrite.

multi_editMultiple edits at onceA

Applies several replacements to one file atomically: if any fragment is not found, the file is left unchanged. Returns a combined diff. A backup is saved before editing.

Inputs: path (required), edits (required).

read_fileRead a fileB

Reads a text file. An optional line range can be specified (1-based). Large files are truncated.

Inputs: path (required), end_line, start_line.

read_imageView an imageA

Returns an image file so you can actually see it (screenshots, design mockups, diagrams). Supports PNG, JPEG, GIF and WebP. The file must be at most 4.8 MB. For text files use read_file.

Inputs: path (required).

replace_in_filesReplace text in many filesA

Replaces every occurrence of a string (or regular expression) across text files, with a backup of each changed file and a single undo step. Skips binary and very large files, node_modules, .git and .mcp by default. Use dry_run=true to preview the changes first.

Inputs: query (required), replacement (required), path, ignore, +6 more.

restore_pathRestore from the trashA

Restores a file or folder from the trash to its original location. Get the id from list_trash or from the delete_path response.

Inputs: id (required), overwrite.

search_contentSearch text inside filesA

Searches for a string or regular expression inside text files and returns file:line: text. Binary and large files are skipped.

Inputs: query (required), path, ignore, include, +6 more.

undo_last_changeUndo the last changeA

Reverts the last change made by the server: restores a file from its backup, removes a created file, or brings back a deleted item from the trash. Multiple steps can be undone in a row.

Inputs: steps.

unzip_pathExtract a ZIP archiveA

Extracts a ZIP archive into a folder, creating missing parent folders. Stored and deflated entries with UTF-8 names are supported (ZIP64 and encrypted archives are not). Paths that would escape the destination are rejected. By default nothing is overwritten.

Inputs: source (required), destination (required), overwrite.

write_fileCreate or overwrite a fileA

Writes text to a file. Creates missing parent folders. By default overwrites an existing file and keeps a backup (restorable via undo_last_change).

Inputs: path (required), content (required), overwrite, create_parents.

zip_pathCreate a ZIP archiveA

Packs files and folders into a ZIP archive. Each source keeps its own name at the top level of the archive; subfolders are included recursively. Symbolic links are skipped. UTF-8 file names are stored correctly. Set overwrite=true to replace an existing archive.

Inputs: sources (required), destination (required), overwrite.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 22 tools

    Disambiguation4/5

    Most tools target clearly distinct actions and resource types, and descriptions help distinguish listing, searching, and archive operations. Some overlap remains among editing tools (edit_file, multi_edit, replace_in_files) and file-writing tools (write_file, append_file), but the boundaries are reasonably explained.

    Naming Consistency4/5

    Nearly all tools use a consistent snake_case verb_noun pattern such as read_file, create_directory, and restore_path. Minor deviations like file_info (noun-first) and multi_edit (missing an explicit object) are readable and do not seriously undermine consistency.

    Tool Count4/5

    At 22 tools the surface is on the heavy side, but this is a broad file-manager domain with editing, search, archives, trash, and undo operations. Each tool appears to earn its place rather than being redundant filler.

    Completeness5/5

    The server covers a full file-management lifecycle: listing, reading, writing, editing, moving/copying, deleting, restoring from trash, archive creation/extraction, search, and undo. No obvious operational gaps remain for the stated purpose.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Provides Claude Desktop with direct access to your local file system for development tasks, enabling file operations (read, write, edit), directory browsing, command execution, and codebase search within a configured projects directory.
      6
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides Claude with complete file system integration including directory management, file operations, Office document creation/editing, and advanced file tree visualization.
      3
      MIT
    • F
      license
      B
      quality
      D
      maintenance
      Enables local file reading and writing for your project via Claude Desktop, with tools to read, write, and list files in a specified root path.
      7
      1
      -