Filesystem MCP Server for WSL
@webconsulting
filesystem MCP server for accessing WSL distributions from Windows
Overview
What is Filesystem MCP Server for WSL?
Filesystem MCP Server for WSL is a Node.js server implementing the Model Context Protocol (MCP), specifically designed for filesystem operations in Windows Subsystem for Linux (WSL). It is a fork of the original Filesystem MCP Server but completely reimagined for WSL environments, leveraging native Linux commands inside WSL for faster file listing and content search. It is intended for users who need high-performance file operations across WSL distributions from Windows.
How to use Filesystem MCP Server for WSL?
Install via npm (mcp-server-wsl-filesystem). For Claude Desktop, configure claude_desktop_config.json with the npx command and the desired WSL distribution and allowed directories. You can also run it directly from the command line: node dist/index.js [--distro=distribution_name] <allowed_directory> [additional_directories...]. Build the project first with npm install and npm run build.
Key features of Filesystem MCP Server for WSL
- Access any WSL distribution from Windows.
- Read, write, and edit files in WSL from the Windows host.
- Create, list, and delete directories within WSL.
- Move files and directories across the WSL filesystem.
- Search files by name or text content with pattern matching.
- Get detailed file metadata from the WSL filesystem.
- Support for multiple WSL distributions simultaneously.
Use cases of Filesystem MCP Server for WSL
- Manage WSL project files directly from a Windows-based AI assistant.
- Perform rapid file searches across large WSL directory trees using native Linux commands.
- Edit configuration files inside a specific WSL distribution without leaving Windows.
- Move or copy files between different WSL distributions from a single MCP tool.
FAQ from Filesystem MCP Server for WSL
How is this different from the original Filesystem MCP Server?
The original server can already access WSL files via \\wsl.localhost\DistributionName. This fork replaces direct Node.js filesystem calls with native Linux commands inside WSL (like find, grep), offering significantly faster file listing and content search operations, especially for large directory trees. It also adds support for selecting specific WSL distributions and path translation.
What are the runtime requirements?
You need a properly configured Windows Subsystem for Linux (WSL) with at least one Linux distribution installed. For development, Node.js v18.0.0 or higher is required. No additional installation is needed for Claude Desktop users beyond configuring the JSON.
Where does the data live?
The server only allows operations within directories explicitly specified via the args parameter when launching the server. All data stays inside the WSL filesystem of the chosen distribution.
What transport and authentication does the server use?
The server communicates over stdio (standard input/output) as per the MCP protocol. No authentication is required; access control is enforced by limiting allowed directories to those specified at startup.