SM

spences10/mcp-wsl-exec

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

25 stars 10 forks 품질 85 트렌드 31MIT

A Model Context Protocol (MCP) server for to interact with Windows Subsystem for Linux (WSL). Provides both read-only information gathering and secure command execution capabilities.

개요

A Model Context Protocol (MCP) server for to interact with Windows Subsystem for Linux (WSL). Provides both read-only information gathering and secure command execution capabilities. - You're using - You need to interact with your WSL environment - You want to provide WSL context to Claude (system info, processes, files, etc.) - You're using (it has native bash access) - You're on Linux/macOS (use native tools instead) - You only need Windows PowerShell/CMD (use a different MCP server) - 🖥️ Get system information (OS, kernel, hostname) - 📁 Browse directory contents - 💾 Check disk usage - ⚙️ List environment variables - 🔄 Monitor running processes - 🔒 Secure command execution in WSL environments - ⚡ Built-in safety features: - Dangerous command detection - Command confirmation system - Path traversal prevention - Command sanitization - 📁 Working directory support - ⏱️ Command timeout functionality - 🛡️ Protection against shell injection This server requires configuration...

README

원문 README의 일부입니다. 원문 보기.

mcp-wsl-exec

A Model Context Protocol (MCP) server for Windows + Claude Desktop users to interact with Windows Subsystem for Linux (WSL). Provides both read-only information gathering and secure command execution capabilities.

⚠️ Important: Who Should Use This?

✅ You SHOULD use this if:

  • You’re using Claude Desktop on Windows
  • You need to interact with your WSL environment
  • You want to provide WSL context to Claude (system info, processes, files, etc.)

❌ You DON’T need this if:

  • You’re using Claude Code (it has native bash access)
  • You’re on Linux/macOS (use native tools instead)
  • You only need Windows PowerShell/CMD (use a different MCP server)

Features

📊 Information Gathering (Read-Only)

  • 🖥️ Get system information (OS, kernel, hostname)
  • 📁 Browse directory contents
  • 💾 Check disk usage
  • ⚙️ List environment variables
  • 🔄 Monitor running processes

🔧 Command Execution (With Safety)

  • 🔒 Secure command execution in WSL environments
  • ⚡ Built-in safety features:
    • Dangerous command detection
    • Command confirmation system
    • Path traversal prevention
    • Command sanitization
  • 📁 Working directory support
  • ⏱️ Command timeout functionality
  • 🛡️ Protection against shell injection

Configuration

This server requires configuration through your MCP client. Here are examples for different environments:

Cline Configuration

Add this to your Cline MCP settings:

{
	"mcpServers": {
		"mcp-wsl-exec": {
			"command": "npx",
			"args": ["-y", "mcp-wsl-exec"]
		}
	}
}

Claude Desktop Configuration

Add this to your Claude Desktop configuration:

{
	"mcpServers": {
		"mcp-wsl-exec": {
			"command": "npx",
			"args": ["-y", "mcp-wsl-exec"]
		}
	}
}

API

The server provides 7 MCP tools:

Information Gathering (Read-Only) 📊

These tools provide context about your WSL environment without making changes:

get_system_info

Get system information (OS version, kernel, hostname).

Parameters: None

get_directory_info

Get directory contents and file information.

Parameters:

  • path (string, optional): Directory path (defaults to current directory)
  • details (boolean, optional): Show detailed information (permissions, sizes, etc.)

get_disk_usage

Get disk space information.

Parameters:

  • path (string, optional): Specific path to check (defaults to all filesystems)

get_environment

Get environment variables.

Parameters:

  • filter (string, optional): Filter pattern to search for specific variables

list_processes

List running processes.

Parameters:

  • filter (string, optional): Filter by process name

Command Execution (Potentially Destructive) 🔧

Use these tools when you need to make changes or run custom commands:

execute_command

GitHub에서 전체 README 보기

설치

npx -y mcp-wsl-exec
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "mcp-wsl-exec": { "command": "npx", "args": ["-y", "mcp-wsl-exec"] } } }