Skip to main content
Glama
mcp-wsl-exec
by spences10

mcp-wsl-exec

Linux용 Windows 하위 시스템(WSL) 환경에서 명령을 실행하기 위한 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버는 내장된 보안 기능과 검증 기능을 통해 안전한 명령 실행을 제공합니다.

특징

  • 🔒 WSL 환경에서 안전한 명령 실행

  • ⚡ 내장된 안전 기능:

    • 위험한 명령 감지

    • 명령 확인 시스템

    • 경로 탐색 방지

    • 명령 살균

  • 📁 작업 디렉토리 지원

  • ⏱️ 명령 시간 초과 기능

  • 🔍 자세한 명령 출력 형식

  • ❌ 오류 처리 및 검증

  • 🛡️ 쉘 주입에 대한 보호

Related MCP server: Windows CLI MCP Server

구성

이 서버를 사용하려면 MCP 클라이언트를 통한 구성이 필요합니다. 다음은 다양한 환경에 대한 예시입니다.

클라인 구성

Cline MCP 설정에 다음을 추가하세요.

지엑스피1

클로드 데스크톱 구성

Claude Desktop 구성에 다음을 추가하세요.

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

API

서버는 두 가지 MCP 도구를 구현합니다.

실행 명령

안전 검사 및 검증을 통해 WSL에서 명령을 실행합니다.

매개변수:

  • command (문자열, 필수): 실행할 명령

  • working_dir (문자열, 선택 사항): 명령 실행을 위한 작업 디렉토리

  • timeout (숫자, 선택 사항): 밀리초 단위의 시간 초과

확인_명령

안전 검사를 통해 표시된 위험한 명령의 실행을 확인합니다.

매개변수:

  • confirmation_id (문자열, 필수): execute_command에서 수신된 확인 ID

  • confirm (부울, 필수): 명령 실행을 진행할지 여부

안전 기능

위험한 명령 감지

서버는 다음을 포함하여 실행하기 전에 명시적인 확인이 필요한 잠재적으로 위험한 명령 목록을 유지 관리합니다.

  • 파일 시스템 작업(rm, rmdir, mv)

  • 시스템 명령(종료, 재부팅)

  • 패키지 관리(apt, yum, dnf)

  • 파일 리디렉션(>, >>)

  • 권한 변경(chmod, chown)

  • 그리고 더 많은 것...

명령 살균

모든 명령은 다음을 방지하기 위해 정리되었습니다.

  • 셸 메타문자 주입

  • 경로 탐색 시도

  • 홈 디렉토리 참조

  • 위험한 명령 체이닝

개발

설정

  1. 저장소를 복제합니다

  2. 종속성 설치:

pnpm install
  1. 프로젝트를 빌드하세요:

pnpm build
  1. 개발 모드에서 실행:

pnpm dev

출판

이 프로젝트에서는 버전 관리를 위해 변경 세트를 사용합니다. 게시하려면 다음을 수행하세요.

  1. 변경 세트를 만듭니다.

pnpm changeset
  1. 패키지 버전:

pnpm changeset version
  1. npm에 게시:

pnpm release

기여하다

기여를 환영합니다! 풀 리퀘스트를 제출해 주세요.

특허

MIT 라이센스 - 자세한 내용은 LICENSE 파일을 참조하세요.

감사의 말

Available Tools

7 tools
confirm_commandConfirm dangerous command executionC
Destructive

Confirm dangerous command execution

Inputs: confirmation_id (required), confirm (required).

execute_commandExecute a command in WSL (use read-only tools when possible)C
Destructive

Execute a command in WSL (use read-only tools when possible)

Inputs: command (required), working_dir, timeout.

get_directory_infoGet directory contents and infoC
Read-only

Get directory contents and info

Inputs: path, details.

get_disk_usageGet disk space informationC
Read-only

Get disk space information

Inputs: path.

get_environmentGet WSL environment variablesC
Read-only

Get WSL environment variables

Inputs: filter.

get_system_infoGet WSL system informationC
Read-only

Get WSL system information

Inputs: no named parameters.

list_processesList running processes in WSLC
Read-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

    B3.3/5.0

    Scored across 7 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A secure MCP server for executing whitelisted shell commands with resource and timeout controls, designed for integration with Claude and other MCP-compatible LLMs.
      20
      389 npm
      7
      MIT
    • A
      license
      B
      quality
      F
      maintenance
      A 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.
      9
      419 npm
      265
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that enables secure execution of shell commands across Windows, macOS, and Linux with built-in whitelisting and approval mechanisms for enhanced security.
      9
      68 npm
      23
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      A secure MCP server for shell operations, terminal management, and process control, enabling AI assistants to safely execute commands and manage interactive sessions.
      13
      158 npm
      6
      MIT