Cross-Platform Filesystem MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cross-Platform Filesystem MCP Server list the contents of my home directory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cross-Platform Filesystem MCP Server
A comprehensive filesystem MCP server that works across Linux, macOS, and Windows platforms with intelligent platform-specific adaptations.
π Platform Support
β Supported Platforms
Linux - Full support with Unix-style commands
macOS - Full support with Unix-style commands
Windows - Full support with Windows-specific commands
FreeBSD/OpenBSD - Basic support
π§ Platform-Specific Features
Linux (/home/, /tmp/, /opt/, /usr/local/, /etc/)
Uses
findfor file searchUnix-style permissions and ownership
Standard shell commands via
/bin/bashPackage manager paths included
macOS (/Users/, /tmp/, /opt/homebrew/, /usr/local/)
Uses
findfor file searchUnix-style permissions and ownership
Homebrew paths for both Intel and Apple Silicon
Standard shell commands via
/bin/bash
Windows (C:\Users\, C:\temp\, C:\tmp\, D:\)
Uses
dirfor file search with recursionWindows-style paths and permissions
Commands via
cmd.exeMultiple drive support
π οΈ Available Tools
Core Filesystem Operations
get_platform_info- Show current platform and allowed pathslist_directory- List directory contents with platform-aware hidden file filteringread_file/write_file- File content operationscreate_directory/delete_directory- Directory managementdelete_file- File removalmove_item/copy_item- File/directory manipulationget_file_info- Detailed file metadata (platform-specific)
Search & Navigation
search_files- Platform-aware file search (find/dir)get_current_directory- Current working directory infoexecute_command- Platform-aware shell command execution
π Quick Setup
1. Install Dependencies
cd mcp-filesystem-cross-platform
npm install2. Build (Optional)
npm run build3. Run Development Mode
npm run dev4. Install to a Runtime Directory (Optional)
./scripts/install-runtime.shBy default the script installs the server into /opt/mcp-servers/mcp-filesystem-cross-platform. Use --prefix to change the parent directory or --name to customize the folder name.
π Platform-Specific Allowed Paths
The MCP automatically detects the platform and restricts access to safe directories:
Linux
/home/ # User directories
/tmp/ # Temporary files
/var/tmp/ # System temporary
/opt/ # Optional software
/usr/local/ # Local installations
/etc/ # Configuration files (read access)macOS
/Users/ # User directories
/tmp/ # Temporary files
/var/tmp/ # System temporary
/opt/homebrew/ # Homebrew (Apple Silicon)
/usr/local/ # Homebrew (Intel) + local installationsWindows
C:\Users\ # User directories
C:\temp\ # Temporary files
C:\tmp\ # Alternative temp
D:\ # Additional drivesπ Security Features
Path validation prevents directory traversal attacks
Platform-aware restrictions to system-appropriate safe directories
Sandboxed execution environment
No access to system-critical directories outside allowed paths
βοΈ Claude Desktop Configuration
Linux/macOS
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["tsx", "/path/to/mcp-filesystem-cross-platform/src/index.ts"]
}
}
}Windows
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["tsx", "C:\\path\\to\\mcp-filesystem-cross-platform\\src\\index.ts"]
}
}
}π― Usage Examples
Once configured, you can ask Claude:
Platform Detection
"What platform am I running on?"
"Show me the allowed filesystem paths"
File Operations
"List the contents of my home directory"
"Create a new directory called 'projects'"
"Read the contents of my .bashrc file" (Linux/macOS)
"Search for all .js files in my projects folder"
Cross-Platform Commands
"Run 'ls -la'" (Linux/macOS) or "Run 'dir'" (Windows)
"Execute 'npm install' in my project directory"
π Differences from macOS-Only Version
Improvements:
β Cross-platform compatibility (Linux, macOS, Windows)
β Platform-aware command execution (find vs dir)
β Intelligent path restrictions based on OS
β Better error handling for platform differences
β Platform detection and reporting
Key Changes:
Uses
os.platform()for platform detectionPlatform-specific allowed paths arrays
Different search commands per platform (
findvsdir)Platform-aware shell selection (
bashvscmd.exe)Windows drive letter support
Enhanced hidden file filtering (includes
$files on Windows)
π§ Linux-Specific Notes
The filesystem MCP works excellently on Linux with these considerations:
Package Management: Can access
/opt/and/usr/local/for installed softwareConfiguration: Read access to
/etc/for system configsPermissions: Full Unix permissions and ownership support
Shell: Uses
/bin/bashfor command executionTemporary Files: Supports both
/tmp/and/var/tmp/
π» Windows-Specific Notes
Full Windows support with these adaptations:
Drive Letters: Supports multiple drives (C:, D:, etc.)
Path Separators: Handles Windows backslashes correctly
Commands: Uses
cmd.exeand Windows-native commandsHidden Files: Filters both
.and$prefixed filesPermissions: Windows-style file attributes
π Migration from macOS-Only Version
If you're currently using the macOS-only version, here's how to migrate:
1. Update your Claude Desktop config:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["tsx", "/path/to/mcp-filesystem-cross-platform/src/index.ts"]
}
}
}2. Test platform detection:
Ask Claude: "What platform am I running on?" to verify it's working.
3. Benefits you'll gain:
Future-proof for Linux servers/containers
Better Windows compatibility if needed
More robust error handling
Platform-aware command suggestions
π Troubleshooting
Common Issues:
Permission Denied
Check that the path is within allowed directories
Use "get platform info" to see allowed paths
Command Not Found
Commands are platform-specific (use
lson Unix,diron Windows)MCP will suggest appropriate commands for your platform
Path Not Found
Use forward slashes
/on all platforms (Node.js handles conversion)Check path exists with "list directory" first
This cross-platform version provides excellent Linux support with full compatibility for Linux-specific paths, permissions, and shell commands. The original macOS version would have failed on Linux due to hardcoded /Users/ paths and macOS-specific assumptions.
Available Tools
13 toolscopy_itemC
Copy a file or directory
Inputs: source (required), destination (required).
create_directoryC
Create a directory (and parent directories if needed)
Inputs: path (required).
delete_directoryC
Delete a directory and its contents
Inputs: path (required), recursive.
delete_fileC
Delete a file
Inputs: path (required).
execute_commandC
Execute a shell command (platform-aware)
Inputs: command (required), cwd.
get_current_directoryA
Get the current working directory
Inputs: no named parameters.
get_file_infoC
Get information about a file or directory
Inputs: path (required).
get_platform_infoB
Get information about the current platform and allowed paths
Inputs: no named parameters.
list_directoryC
List contents of a directory
Inputs: path (required), showHidden.
move_itemC
Move or rename a file or directory
Inputs: source (required), destination (required).
read_fileC
Read contents of a text file
Inputs: path (required), encoding.
search_filesC
Search for files by name pattern
Inputs: path (required), pattern (required), maxDepth.
write_fileC
Write content to a file
Inputs: path (required), content (required), encoding.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 13 tools
Every tool has a clearly distinct purpose with no ambiguity. Each targets a specific filesystem operation (e.g., copy_item vs. move_item, delete_file vs. delete_directory, read_file vs. write_file), and the descriptions clearly differentiate them. An agent can easily distinguish between tools like get_file_info (metadata) and list_directory (contents).
Tool names follow a consistent verb_noun pattern throughout, using snake_case uniformly. Examples include copy_item, create_directory, delete_file, get_current_directory, and list_directory. This predictability makes the set easy to navigate and understand at a glance.
With 13 tools, the count is well-scoped for a cross-platform filesystem server. Each tool earns its place by covering essential operations like CRUD for files and directories, navigation, information retrieval, and utilities like search and command execution. It avoids bloat while providing comprehensive coverage.
The toolset offers complete CRUD/lifecycle coverage for the filesystem domain, including create (create_directory, write_file), read (read_file, list_directory, get_file_info), update (move_item, copy_item), and delete (delete_file, delete_directory). It also includes utilities like search_files, get_platform_info, and execute_command, ensuring no dead ends for agents.
Related MCP Connectors
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.