Labsco
AdamTovatt logo

FilerMoverMcp

from AdamTovatt

A file mover tool that stages and executes file moves safely. Works as both a CLI tool and an MCP server for AI agents.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

FileMoverMcp

Tests NuGet Version NuGet Downloads License: MIT

A file mover tool that stages and executes file moves safely. Works as both a CLI tool and an MCP (Model Context Protocol) server for AI agents.

Behavior

Directories are auto-created

If the destination path includes directories that don't exist yet, they will be created automatically. For example, fm mv "file.txt" "a/b/c/file.txt" will create a/b/c/ if needed.

Files and directories are auto-detected

When you run fm mv, the tool checks whether the source is a file or a directory and handles it accordingly. Directory moves preserve the full internal structure, including nested subdirectories.

Overwrite is opt-in

If the destination already exists (file or directory), the move will be rejected unless you pass --overwrite. With --overwrite, the existing destination is replaced entirely.

Paths are sandboxed

All paths are relative to the session's base directory. Attempting to reference paths outside it will be rejected.

Sessions are shared

CLI and MCP mode share the same session storage, so you can initialize a session in one mode and commit in the other.

As MCP Server

fm --mcp

When running as an MCP server, the following tools are available:

  • fm_init(path?: string) - Initialize a session
  • fm_move(source: string, destination: string, overwrite: boolean) - Stage a move
  • fm_preview() - Preview staged moves
  • fm_commit() - Execute staged moves
  • fm_cancel() - Cancel session
  • fm_help() - Get help

Development

git clone <repository-url>
cd FileMoverMcp
dotnet build FileMoverMcp.sln
dotnet test FileMoverMcp.sln

To run as MCP server during development:

dotnet run --project FileMoverMcp.Cli/FileMoverMcp.Cli.csproj -- --mcp

To package:

dotnet pack FileMoverMcp.Cli/FileMoverMcp.Cli.csproj --configuration Release

License

MIT License