home / mcp / file system mcp server
A comprehensive MCP (Model Context Protocol) server for file system operations, providing Claude and other AI assistants with access to local files and directories.
Configuration
View docs{
"mcpServers": {
"calebmwelsh-file-system-mcp-server": {
"command": "/absolute/path/to/python",
"args": [
"/absolute/path/to/file-system-mcp-server/fs_server.py"
]
}
}
}The File System MCP Server provides a structured, automation-friendly way to perform common file and directory operations through a FastMCP-based API. You can copy, move, delete, read, and write files, manage directories, and retrieve system and disk information, all from a consistent interface that works across supported platforms. This makes it ideal for automating workflows, integrating with other tools, and building repos or CI pipelines around file-system tasks.
You use the server by connecting an MCP client to the local or remote MCP endpoint and calling the available file-system operations. The server exposes a rich set of actions for files, directories, and system information, which you can combine in scripts or workflows to manage data, organize assets, or perform automated checks.
Prerequisites you need before installing include Python and pip. You will also require a working FastMCP-based environment if you plan to run this server as part of an MCP ecosystem.
Step by step commands to set up and run the server locally:
1. Set up a Python virtual environment and activate it.
2. Install required dependencies.
3. Run the server using Python.
To run the File System MCP Server from a local Python process, you can use the following configuration snippet for an MCP client that launches the server as a stdio process. This demonstrates how to start the Python interpreter and point it to the server script.
All file operations include path validation. Destructive operations back up files before proceeding. Access to system information is restricted to safe operations to reduce exposure. Handle the server in trusted environments only.
If you encounter issues with file deletion or drive detection, verify permissions and ensure the target paths exist. Check that the server has the appropriate privileges on the host OS and that the runtime environment matches the platform requirements.
{
"mcpServers": {
"file_system": {
"command": "/absolute/path/to/python",
"args": [
"/absolute/path/to/file-system-mcp-server/fs_server.py"
]
}
}
}Copy a file with optional backup before overwriting the destination.
Move a file with optional backup before transferring to the new location.
Delete a file with safety checks to prevent unintended removals.
Read the contents of a file and return the data.
Write content to a file, creating or replacing the target as needed.
Retrieve detailed information about a file such as size and timestamps.
Search for files by name pattern within a directory hierarchy.
Create a collection object that groups related files for batch operations.
List the contents of a directory.
Create a new directory at the specified path.
Delete a directory and its contents with safety checks.
Show directory contents in a tree-like recursive structure.
Search for directories by name pattern.
Return high-level information about the host system (OS, CPU, memory).
Report disk usage including total, used, and free space.
Provide statistics for a given directory such as file count and total size.