mcp-wsl-exec
About
A secure MCP server for Windows Subsystem for Linux environments, facilitating safe command execution with extensive validation and protection against vulnerabilities like shell injection and dangerous commands.
Details
- Author
- spences10
- Repository
- spences10/mcp-wsl-exec
- GitHub stars
- 9
- License
- MIT License
- Categories
- Developer Tools
Jump to
Setting up with Highlight
Follow these steps to add this server as a custom Highlight plugin:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
mcp-wsl-execCommand (node, npx, python, etc.)npxArguments-
Argument 1
-y -
Argument 2
mcp-wsl-exec
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
This server requires configuration through your MCP client. Here are
examples for different environments:
Add this to your Cline MCP settings:
{
"mcpServers": {
"mcp-wsl-exec": {
"command": "npx",
"args": ["-y", "mcp-wsl-exec"]
}
}
}
Add this to your Claude Desktop configuration:
{
"mcpServers": {
"mcp-wsl-exec": {
"command": "npx",
"args": ["-y", "mcp-wsl-exec"]
}
}
}
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), details (boolean, optional)
get_disk_usage
Get disk space information. Parameters: path (string, optional)
get_environment
Get environment variables. Parameters: filter (string, optional)
list_processes
List running processes. Parameters: filter (string, optional)
execute_command
Execute a command in WSL with safety checks and validation. Parameters: command (string, required), working_dir (string, optional), timeout (number, optional)
confirm_command
Confirm execution of a dangerous command that was flagged by safety checks. Parameters: confirmation_id (string, required), confirm (boolean, required)
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp-wsl-exec": {
"env": {},
"args": [
"-y",
"mcp-wsl-exec"
],
"command": "npx"
}
}
}
Linux
{
"env": [],
"args": [
"-y",
"mcp-wsl-exec"
],
"command": "npx"
}
Macos
{
"env": [],
"args": [
"-y",
"mcp-wsl-exec"
],
"command": "npx"
}
Windows
{
"env": [],
"args": [
"/c",
"npx",
"-y",
"mcp-wsl-exec"
],
"command": "cmd"
}
A Model Context Protocol (MCP) server forWindows + Claude Desktop usersto interact with Windows Subsystem for Linux (WSL). Provides both read-only information gathering and secure command execution capabilities.
- You're usingClaude 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're usingClaude 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)
- 🖥️ 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
This server requires configuration through your MCP client. Here are examples for different environments:
{ "mcpServers": { "mcp-wsl-exec": { "command": "npx", "args": ["-y", "mcp-wsl-exec"] } } }
Add this to your Claude Desktop configuration:
{ "mcpServers": { "mcp-wsl-exec": { "command": "npx", "args": ["-y", "mcp-wsl-exec"] } } }
These tools provide context about your WSL environment without making changes:
Get system information (OS version, kernel, hostname).
Get directory contents and file information.
- path(string, optional): Directory path (defaults to current directory)
- details(boolean, optional): Show detailed information (permissions, sizes, etc.)
- path(string, optional): Specific path to check (defaults to all filesystems)
- filter(string, optional): Filter pattern to search for specific variables
- 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 a command in WSL with safety checks and validation.
- command(string, required): Command to execute
- working_dir(string, optional): Working directory for command execution
- timeout(number, optional): Timeout in milliseconds
Note:Dangerous commands will require confirmation viaconfirm_command.
Confirm execution of a dangerous command that was flagged by safety checks.
- confirmation_id(string, required): Confirmation ID received from execute_command
- confirm(boolean, required): Whether to proceed with the command execution
The server maintains a list of potentially dangerous commands that require explicit confirmation before execution, including:
- File system operations (rm, rmdir, mv)
- System commands (shutdown, reboot)
- Package management (apt, yum, dnf)
- File redirections (>, >>)
- Permission changes (chmod, chown)
- And more...
Commands are executed throughbash -c, so normal shell syntax such as pipes, quotes, redirects, and command chaining is preserved. The server validates empty/null-byte inputs, quotes arguments used by built-in tools, and requires confirmation for potentially dangerous commands.
- Clone the repository
- Install dependencies:
The project uses changesets for version management. To publish:
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see theLICENSEfile for details.
- Built on theModel Context Protocol
- Designed for secure WSL command execution
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Create crafted UI components inspired by the best 21st.dev design engineers.
Bring agent evaluations, observability, and synthetic test set generation directly into your IDE for free with Galileo's new MCP server
An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .
MCP server for AI Diagram Maker — generate beautiful software engineering diagrams directly inside Cursor, Claude Desktop, Claude Code, or any MCP-compatible AI agent
ALAPI MCP Tools,Call hundreds of API interfaces via MCP
AI-powered SVG animation generator that transforms static files into animated SVG components using the Allyson platform
MCP server that gives AI assistants on-demand access to 1,500+ amCharts docs, ~300 code examples, and 1000+ class API references.
APIMatic MCP Server is used to validate OpenAPI specifications using APIMatic. The server processes OpenAPI files and returns validation summaries by leveraging APIMatic’s API.
One shared context layer for AI agents and humans — live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.
Build and deploy full-stack Next.js apps with 98 tools for React, AWS, and MongoDB
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





