SM

spences10/mcp-wsl-exec

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

26 stars 10 forks 品質 85 トレンド 20MIT

Linux (WSL) 用の Windows サブシステムとやり取りするためのモデルコンテキストプロトコル (MCP) サーバー。 読み取り専用の情報収集と安全なコマンド実行機能の両方を提供します.

概要

Linux (WSL) 用の Windows サブシステムとやり取りするためのモデルコンテキストプロトコル (MCP) サーバー。 読み取り専用の情報収集と安全なコマンド実行機能の両方を提供します。 - あなたは使用しています - あなたのWSL環境と相互作用する必要があります - あなたは、Claude(システム情報、プロセス、ファイルなど)にWSLコンテキストを提供したい - 使用している(ネイティブバッシュアクセスを持つ) - Linux/macOS (ネイティブツールを使用する代わりに) - Windows PowerShell/CMDのみ(異なるMCPサーバーを使用する) - システム情報(OS、カーネル、ホスト名)を取得する - 📁 ディレクトリのコンテンツを参照 - 💾 チェックディスクの使用法 - ◀️ リスト環境変数 - 監視実行プロセス - WSL環境での安全なコマンド実行 - ビルトイン安全機能: - 危険なコマンドの検出 - コマンドの確認システム - パストラバーサル防止 - コマンドサニタイゼーション - コマンドサニタイゼーション - 作業ディレクトリサポート - エキスパートのタイムアウト機能 - ️️シェルの注射に対する保護 このサーバーは、設定が必要です...

概要(AI 翻訳)

Windows + Claudeデスクトップ用のモデルコンテキストプロトコル(MCP)サーバー user Linux (WSL) 用の Windows サブシステムとやり取りします。 オファー 読み取り専用の情報収集と安全なコマンド実行 機能。

⚠️ 重要: 誰がこれを使うべきか?

✅ あなた SHOULD はこの場合使用します:

  • WindowsでClaudeデスクトップを使用している
  • WSL環境とのやり取りが必要です
  • WSLコンテキストをClaude(システム情報、プロセス、 ファイル等)

**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

-Claude Code(ネイティブバッシュアクセス)を使用している

  • Linux/macOS (ネイティブツールを使用する代わりに)
  • Windows PowerShell/CMDのみが必要です(異なるMCPサーバーを使用します)

##特徴

情報収集 (Read-Only)

  • システム情報の取得(OS、カーネル、ホスト名)
  • 📁 ディレクトリの内容を参照
  • 💾 ディスクの使用状況をチェック
  • η️ 環境変数の一覧
  • 監視実行プロセス

↔ コマンド実行(安全)

  • WSL環境でのセキュアなコマンド実行
  • ⚡ 作り付けの安全特徴:
  • 危険なコマンド検出
  • コマンド確認システム
  • パス横断防止
  • コマンド sanitization
  • 📁 作業ディレクトリサポート

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

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"] } } }