Logo von WSL Filesystem

WSL Filesystem

Community
webconsulting

filesystem MCP server for accessing WSL distributions from Windows

Herausgeberwebconsulting
Repositorymcp-server-wsl-filesystem
SpracheJavaScript
Forks
6
Sterne
15
Verfügbare Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Links
  • Tools mit KI-Workflows verbinden

    WSL Filesystem stellt MCP-Funktionen bereit, die kompatible KI-Clients und Agenten nutzen können.

  • 0 verfügbare Tools

    Sehen Sie sich unten die aufrufbaren Aktionen an, einschließlich Namen und Beschreibungen, sofern der Server diese bereitstellt.

  • Konfiguration zum Kopieren

    Nutzen Sie die Installationsbeispiele, um diesen Server in Ihrem bevorzugten MCP-Client zu konfigurieren.

  • Open-Source-Kennzahlen

    15 Sterne und 6 Forks im verlinkten Repository.

⚠️ IMPORTANT INFORMATION:
The original Filesystem MCP Server can already access WSL files by simply using the network path \\wsl.localhost\DistributionName as a parameter in the configuration.
Example:

json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "\\\\wsl.localhost\\Debian",
        "C:\\path\\to\\other\\allowed\\dir"
      ]
    }
  }
}

However, this project offers an alternative implementation specifically optimized for WSL Linux distributions.

While the official server works by recursively walking directories using Node.js’s fs module, this implementation leverages native Linux commands inside WSL (such as find, grep, etc.), making file listing and content search operations significantly faster.

This can be especially useful when dealing with large directory trees or when search performance is critical.

So while the native network path may be simpler for many use cases, this project remains a valuable solution for WSL users looking for better performance or more custom control over the indexing and searching logic.


Filesystem MCP Server for WSL

npm version License: MIT

Node.js server implementing the Model Context Protocol (MCP), specifically designed for filesystem operations in Windows Subsystem for Linux (WSL).
This project is a fork of the original Filesystem MCP Server but completely reimagined for WSL environments.
Unlike the original project, which handles generic file operations, this version focuses exclusively on seamless interaction between Windows and Linux distributions under WSL.
Both projects are compatible and can run in parallel on the same system.

Features

  • Access any WSL distribution from Windows
  • Read/write files in WSL from Windows host
  • Create/list/delete directories in WSL
  • Move files/directories across WSL filesystem
  • Search files within WSL
  • Get file metadata from the WSL filesystem
  • Support for multiple WSL distributions

Note: The server only allows operations within directories specified via args.


API

Resources

  • wsl -d <distrib>: Command for operations on WSL distributions

Tools

  • read_file

    • Read complete contents of a file from WSL
    • Input: path (string)
    • Reads content as UTF-8 text
  • read_file_by_parts

    • Read large files in parts of approximately 95,000 characters
    • Inputs:
      • path (string)
      • part_number (positive integer: 1, 2, 3, etc.)
    • Features:
      • Part 1 starts from the beginning of the file
      • Subsequent parts align to line boundaries (max 300 character adjustment)
      • Returns error with actual file size if requested part doesn't exist
      • Useful for files too large to read in one operation
  • read_multiple_files

    • Read multiple files simultaneously from WSL
    • Input: paths (string[])
    • Failed reads won't stop the entire operation
  • write_file

    • Create or overwrite a file in WSL (use with caution)
    • Inputs:
      • path (string)
      • content (string)
  • edit_file

    • Selective edits with advanced pattern matching and formatting
    • Inputs:
      • path (string)
      • edits (array of { oldText, newText })
      • dryRun (boolean, optional)
    • Features:
      • Multi-line matching
      • Indentation preservation
      • Git-style diff preview
      • Non-destructive dry run mode
  • create_directory

    • Create or ensure the existence of a directory in WSL
    • Input: path (string)
  • list_directory

    • List directory contents with [FILE] or [DIR] prefixes
    • Input: path (string)
  • directory_tree

    • Recursive JSON tree view of contents
    • Input: path (string)
  • move_file

    • Move or rename files/directories
    • Inputs:
      • source (string)
      • destination (string)
  • search_files

    • Recursively search by name
    • Inputs:
      • path (string)
      • pattern (string)
      • excludePatterns (string[], optional)
  • search_in_files

    • Search for text patterns within files recursively
    • Inputs:
      • path (string) - root directory to search
      • pattern (string) - text or regex pattern to find
      • caseInsensitive (boolean, optional) - case-insensitive search
      • isRegex (boolean, optional) - treat pattern as regex
      • includePatterns (string[], optional) - file patterns to include (e.g., *.js)
      • excludePatterns (string[], optional) - file patterns to exclude
      • maxResults (number, optional, default: 1000) - maximum results to return
      • contextLines (number, optional, default: 0) - lines of context before/after
    • Features:
      • Handles all special characters (apostrophes, quotes, $, backslashes)
      • Supports plain text and regular expression searches
      • Shows matching lines with file paths and line numbers
      • Automatically excludes .git, node_modules, .svn, .hg directories
      • Can show context lines around matches
  • get_file_info

    • Detailed metadata
    • Input: path (string)
    • Returns: size, timestamps, type, permissions
  • list_allowed_directories

    • Lists all directories accessible to the server
  • list_wsl_distributions

    • Lists available distributions and shows the active one

Requirements

For Claude Desktop users:
No additional installation required — just configure your claude_desktop_config.json.

NPM Package:
The package is available on npm: mcp-server-wsl-filesystem

For development:

  • Node.js (v18.0.0 or higher)
  • TypeScript (included as a dev dependency)

Installing Node.js on Windows

  1. Download the installer from nodejs.org
  2. Run it and follow the instructions
  3. Check versions:
bash
node --version
npm --version

Usage

Before running the server, you need to build the TypeScript project:

bash
npm install
npm run build

Run the server by specifying which WSL distribution to use (optional) and which directories to expose:

bash
node dist/index.js [--distro=distribution_name] <allowed_directory> [additional_directories...]

If no distribution is specified, the default WSL distribution will be used.

Examples

Access Ubuntu-20.04 distribution:

bash
node dist/index.js --distro=Ubuntu-20.04 /home/user/documents

Use default distribution:

bash
node dist/index.js /home/user/documents

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

Option 1: Using a specific WSL distribution

json
{
  "mcpServers": {
    "wsl-filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-wsl-filesystem",
        "--distro=Ubuntu-20.04",
        "/home/user/documents"
      ]
    }
  }
}

Option 2: Using the default WSL distribution

json
{
  "mcpServers": {
    "wsl-filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-wsl-filesystem",
        "/home/user/documents"
      ]
    }
  }
}

In the second example, the system will use your default WSL distribution without you needing to specify it.

Differences from original project

This fork adapts the original Filesystem MCP Server to work with WSL by:

  1. Replacing direct Node.js filesystem calls with WSL command executions
  2. Adding support for selecting specific WSL distributions
  3. Implementing path translation between Windows and Linux formats
  4. Enhancing file content handling for cross-platform compatibility
  5. Adding specialized tools for WSL management

License

This project is a fork of the original Filesystem MCP Server created by the Model Context Protocol team.

This MCP server for WSL is licensed under the MIT License, following the original project's license. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the original project repository.

Installation

TypingMind
Voraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "wsl-filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-wsl-filesystem",
        "/home/user/documents"
      ]
    }
  }
}

WSL Filesystem MCP mit mehreren KI-Modellen nutzen

TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. Sobald WSL Filesystem verbunden ist, können Sie die Integration mit verschiedenen KI-Modellen in TypingMind verwenden, statt sie für jedes Modell separat einzurichten. Diese MCP-Integration läuft lokal über den TypingMind-MCP-Konnektor auf Ihrem Gerät.

Einrichtungsanleitung für den lokalen Konnektor

Nutzen Sie diese Option, wenn der MCP-Server Zugriff auf lokale Dateien, Apps oder private Ressourcen auf Ihrem Computer benötigt.

1

MCP-Einstellungen öffnen

Gehen Sie in TypingMind zu „Einstellungen“, „Erweiterte Einstellungen“ und dann „Model Context Protocol“ und wählen Sie „Konnektor-Setup“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Klicken Sie auf das Symbol „Optionen“.
  3. Gehen Sie zu „Erweiterte Einstellungen“.
  4. Öffnen Sie den Abschnitt „Model Context Protocol“.
  5. Klicken Sie auf „Konnektor-Setup“ und wählen Sie „Dieses Gerät“.
Einrichtungsbildschirm des TypingMind-MCP-Konnektors mit ausgewählter Option „Dieses Gerät“
2

Konnektor-Befehl ausführen

Wählen Sie „Dieses Gerät“, kopieren Sie den Befehl aus TypingMind und führen Sie ihn im Terminal aus. Lassen Sie den Prozess laufen, solange Sie MCP verwenden.

  1. Kopieren Sie den in TypingMind angezeigten Einrichtungsbefehl.
  2. Öffnen Sie unter macOS Terminal bzw. unter Windows Windows Terminal.
  3. Fügen Sie den Befehl ein und führen Sie ihn aus.
  4. Bestätigen Sie die Paketinstallation, wenn Sie im Terminal zum Fortfahren aufgefordert werden.
  5. Lassen Sie das Terminalfenster geöffnet und den Prozess darin laufen, solange Sie MCP-Tools verwenden.
3

WSL Filesystem als Server hinzufügen

Wenn der Konnektorstatus „Bereit“ anzeigt, klicken Sie auf „Server ändern“ und fügen Sie die MCP-Server-Konfiguration ein.

  1. Warten Sie, bis der Konnektorstatus „Bereit“ anzeigt.
  2. Klicken Sie auf „Server ändern“.
  3. Fügen Sie die MCP-Server-Konfiguration für WSL Filesystem ein.
  4. Speichern Sie die Serverliste.
  5. Aktualisieren Sie die Ansicht, um bei Bedarf zu prüfen, ob der Konnektor weiterhin bereit ist.
MCP-Einstellungen in TypingMind mit aktivem Server und der Schaltfläche „Server ändern“
{
  "mcpServers": {
    "wsl-filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-wsl-filesystem"
      ]
    }
  }
}
4

Verbindung modellübergreifend nutzen

Speichern Sie die Serverliste, öffnen Sie „Plugins“ und aktivieren Sie die MCP-Tools von WSL Filesystem. Wählen Sie dann ein beliebiges unterstütztes KI-Modell in TypingMind und verwenden Sie die Tools im Chat oder weisen Sie sie einem KI-Agenten zu.

  1. Öffnen Sie die Seite „Plugins“ in TypingMind.
  2. Aktivieren Sie die MCP-Tools von WSL Filesystem.
  3. Starten Sie einen Chat und wählen Sie das KI-Modell, das Sie verwenden möchten.
  4. Nutzen Sie die MCP-Tools im Chat oder weisen Sie sie einem KI-Agenten zu.
  5. Wechseln Sie bei Bedarf zu einem anderen KI-Modell, ohne die MCP-Verbindung erneut herzustellen.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit WSL Filesystem bei dieser Aufgabe helfen?
WSL Filesystem
Gerne. Ich habe es gelesen.
Das habe ich mit WSL Filesystem gefunden.

Häufig gestellte Fragen

Wofür wird der MCP-Server WSL Filesystem verwendet?

WSL Filesystem ist ein MCP-Server, über den kompatible KI-Clients auf externe Tools und Kontext zugreifen können. In TypingMind können Sie diesen MCP-Server einmal hinzufügen und seine Tools in Ihrem KI-Arbeitsbereich verfügbar machen.

Kann ich WSL Filesystem MCP mit mehreren KI-Modellen in TypingMind verwenden?

Ja. TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. So können Sie WSL Filesystem mit verschiedenen KI-Modellen wie Claude, ChatGPT, Gemini oder anderen in TypingMind konfigurierten Modellen verwenden, ohne den MCP-Server für jedes Modell separat einzurichten.

Warum WSL Filesystem MCP mit TypingMind nutzen?

TypingMind ist eine der besten Oberflächen für LLM-Chats, da es mehrere KI-Modelle, Prompts, Plugins, KI-Agenten, API-Schlüssel und MCP-Tools in einem Arbeitsbereich vereint. Sobald WSL Filesystem verbunden ist, können Sie die zugehörigen MCP-Tools mit Ihren bevorzugten Modellen nutzen und Ihre Chat-Abläufe in TypingMind übersichtlich organisieren.

Wie verbinde ich WSL Filesystem MCP mit TypingMind?

WSL Filesystem wird über den lokalen MCP-Konnektor von TypingMind angebunden. Das ist die beste Wahl, wenn der MCP-Server auf lokale Dateien, Desktop-Apps, Befehlszeilentools oder private Ressourcen auf Ihrem Computer zugreifen muss.

Welche Tools stellt WSL Filesystem MCP in TypingMind bereit?

WSL Filesystem stellt MCP-Funktionen bereit, die Sie auf der Plugins-Seite in TypingMind aktivieren und im Chat verwenden oder KI-Agenten zuweisen können.

Muss ich meine API-Schlüssel mit TypingMind teilen, um WSL Filesystem MCP zu verwenden?

Nein. TypingMind arbeitet vorrangig lokal, sodass Sie die Kontrolle über Ihre Modellanbieter, API-Schlüssel, Prompts und MCP-Konfiguration behalten. Falls WSL Filesystem eine Authentifizierung erfordert, fügen Sie beim Erstellen der Verbindung die erforderlichen Header, OAuth-Einstellungen oder die lokale Konfiguration für diesen MCP-Server hinzu.

Ähnliche MCP-Server

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇