Runs commands in Windows Subsystem for Linux with validation that blocks shell injection and dangerous commands.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add wsl-exec -- npx -y mcp-wsl-exec~/.codex/config.toml
[mcp_servers.wsl-exec]
command = "npx"
args = ["-y", "mcp-wsl-exec"]
# codex mcp add wsl-exec -- npx -y mcp-wsl-exec~/.cursor/mcp.json
{
"mcpServers": {
"wsl-exec": {
"command": "npx",
"args": [
"-y",
"mcp-wsl-exec"
]
}
}
}.vscode/mcp.json
{
"servers": {
"wsl-exec": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-wsl-exec"
]
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"wsl-exec": {
"command": "npx",
"args": [
"-y",
"mcp-wsl-exec"
]
}
}
}claude_desktop_config.json
{
"mcpServers": {
"wsl-exec": {
"command": "npx",
"args": [
"-y",
"mcp-wsl-exec"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"wsl-exec": {
"command": "npx",
"args": [
"-y",
"mcp-wsl-exec"
]
}
}
}