mcp-wsl-exec
mcp-wsl-exec
Ein Model Context Protocol (MCP)-Server zur Ausführung von Befehlen in Windows Subsystem for Linux (WSL)-Umgebungen. Dieser Server bietet sichere Befehlsausführung mit integrierten Sicherheitsfunktionen und Validierung.
Merkmale
🔒 Sichere Befehlsausführung in WSL-Umgebungen
⚡ Integrierte Sicherheitsfunktionen:
Erkennung gefährlicher Befehle
Befehlsbestätigungssystem
Verhinderung der Pfaddurchquerung
Befehlsbereinigung
📁 Unterstützung von Arbeitsverzeichnissen
⏱️ Befehls-Timeout-Funktionalität
🔍 Detaillierte Formatierung der Befehlsausgabe
❌ Fehlerbehandlung und Validierung
🛡️ Schutz vor Shell-Injektion
Related MCP server: Windows CLI MCP Server
Konfiguration
Dieser Server muss über Ihren MCP-Client konfiguriert werden. Hier sind Beispiele für verschiedene Umgebungen:
Cline-Konfiguration
Fügen Sie dies zu Ihren Cline MCP-Einstellungen hinzu:
{
"mcpServers": {
"mcp-wsl-exec": {
"command": "npx",
"args": ["-y", "mcp-wsl-exec"]
}
}
}Claude Desktop-Konfiguration
Fügen Sie dies zu Ihrer Claude Desktop-Konfiguration hinzu:
{
"mcpServers": {
"mcp-wsl-exec": {
"command": "npx",
"args": ["-y", "mcp-wsl-exec"]
}
}
}API
Der Server implementiert zwei MCP-Tools:
Befehl ausführen
Führen Sie einen Befehl in WSL mit Sicherheitsprüfungen und Validierung aus.
Parameter:
command(Zeichenfolge, erforderlich): Auszuführender Befehlworking_dir(Zeichenfolge, optional): Arbeitsverzeichnis für die Befehlsausführungtimeout(Zahl, optional): Timeout in Millisekunden
Bestätigungsbefehl
Bestätigen Sie die Ausführung eines gefährlichen Befehls, der durch Sicherheitsüberprüfungen gekennzeichnet wurde.
Parameter:
confirmation_id(Zeichenfolge, erforderlich): Von execute_command empfangene Bestätigungs-IDconfirm(Boolesch, erforderlich): Ob mit der Befehlsausführung fortgefahren werden soll
Sicherheitsfunktionen
Erkennung gefährlicher Befehle
Der Server verwaltet eine Liste potenziell gefährlicher Befehle, die vor der Ausführung eine ausdrückliche Bestätigung erfordern, darunter:
Dateisystemoperationen (rm, rmdir, mv)
Systembefehle (Herunterfahren, Neustart)
Paketverwaltung (apt, yum, dnf)
Dateiumleitungen (>, >>)
Berechtigungsänderungen (chmod, chown)
Und mehr...
Befehlsbereinigung
Alle Befehle werden bereinigt, um Folgendes zu verhindern:
Shell-Metazeichen-Injektion
Pfaddurchquerungsversuche
Home-Verzeichnis-Referenzen
Gefährliche Befehlsverkettung
Entwicklung
Aufstellen
Klonen Sie das Repository
Installieren Sie Abhängigkeiten:
pnpm installErstellen Sie das Projekt:
pnpm buildIm Entwicklungsmodus ausführen:
pnpm devVeröffentlichen
Das Projekt verwendet Änderungssätze zur Versionsverwaltung. So veröffentlichen Sie:
Erstellen Sie einen Änderungssatz:
pnpm changesetVersionieren Sie das Paket:
pnpm changeset versionAuf npm veröffentlichen:
pnpm releaseBeitragen
Beiträge sind willkommen! Senden Sie gerne einen Pull Request.
Lizenz
MIT-Lizenz – Einzelheiten finden Sie in der Datei LICENSE .
Danksagung
Basierend auf dem Model Context Protocol
Entwickelt für die sichere Ausführung von WSL-Befehlen
Available Tools
7 toolsconfirm_commandConfirm dangerous command executionCDestructive
Confirm dangerous command execution
Inputs: confirmation_id (required), confirm (required).
execute_commandExecute a command in WSL (use read-only tools when possible)CDestructive
Execute a command in WSL (use read-only tools when possible)
Inputs: command (required), working_dir, timeout.
get_directory_infoGet directory contents and infoCRead-only
Get directory contents and info
Inputs: path, details.
get_disk_usageGet disk space informationCRead-only
Get disk space information
Inputs: path.
get_environmentGet WSL environment variablesCRead-only
Get WSL environment variables
Inputs: filter.
get_system_infoGet WSL system informationCRead-only
Get WSL system information
Inputs: no named parameters.
list_processesList running processes in WSLCRead-only
List running processes in WSL
Inputs: filter.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose: confirm_command handles safety checks, execute_command runs commands, get_directory_info lists files, get_disk_usage shows storage, get_environment retrieves variables, get_system_info provides system details, and list_processes shows running processes. There is no overlap or ambiguity between these functions.
All tools follow a consistent verb_noun pattern with snake_case (e.g., confirm_command, execute_command, get_directory_info). The naming is uniform throughout, using 'get_' for retrieval operations and clear action-object pairs.
With 7 tools, the server is well-scoped for WSL execution and system monitoring. Each tool serves a specific and necessary function, covering command execution, file management, system diagnostics, and process handling without being overly sparse or bloated.
The toolset provides strong coverage for WSL operations, including command execution, file system inspection, system monitoring, and environment management. A minor gap exists in file manipulation (e.g., create/delete files) or network-related tools, but core workflows are well-supported.
Maintenance
Related MCP Connectors
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
MCP server for Superserve sandboxes: create, exec, and manage Firecracker microVMs
Security scanner for AI agents and MCP servers: injection, jailbreak, tool abuse.
Termalin's hosted MCP server. Claude, ChatGPT or any MCP client runs commands, moves files over SFTP, queries databases and reads server metrics and monitoring alerts on your servers, keylessly through Termalin Connectors: no SSH key is handed over and no inbound port is opened. Per-host command policy and an audit log. Needs a termal.in Pro or Team account (new accounts start with a 14-day Pro trial).
Related MCP Servers
- AlicenseBqualityDmaintenanceA secure MCP server for executing whitelisted shell commands with resource and timeout controls, designed for integration with Claude and other MCP-compatible LLMs.20389 npm7MIT
- AlicenseBqualityFmaintenanceA Model Context Protocol server that provides secure command-line access to Windows systems, allowing MCP clients like Claude Desktop to safely execute commands in PowerShell, CMD, and Git Bash shells with configurable security controls.9419 npm265MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables secure execution of shell commands across Windows, macOS, and Linux with built-in whitelisting and approval mechanisms for enhanced security.968 npm23MIT
- AlicenseBqualityCmaintenanceA secure MCP server for shell operations, terminal management, and process control, enabling AI assistants to safely execute commands and manage interactive sessions.13158 npm6MIT