Skip to main content
Glama
riparino

@modelcontextprotocol/server-wsl

by riparino

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_distrosA

List all installed WSL distributions and their current state. Shows each distribution's name, whether it is Running or Stopped, its WSL version (1 or 2), and which one is the default. Use this to discover available distributions before running commands.

run_commandA

Execute a shell command inside a WSL distribution as the default (unprivileged) user. Returns stdout, stderr, and the exit code. Do NOT include 'sudo' in the command — it will hang waiting for a password that cannot be supplied. For operations that require root access use run_privileged_command instead.

run_privileged_commandA

⚠️ ELEVATED — runs as root (via wsl.exe --user root). IMPORTANT: Before calling this tool you MUST show the user the exact command that will be executed and ask for explicit confirmation. Only call it once the user has confirmed. Use this instead of sudo — do not include 'sudo' in the command string. Examples of operations that require this tool: apt install, systemctl, editing /etc files, chown/chmod on system paths, mounting filesystems.

read_fileA

Read the contents of a file from the WSL filesystem. Returns the file content as a UTF-8 string. Supports any text file accessible to the default WSL user. For binary files, consider piping through base64 using run_command instead.

write_fileA

Write or overwrite a file in the WSL filesystem with the provided content. Creates the file if it does not exist; overwrites it if it does. The parent directory must already exist. Use run_command with mkdir -p to create missing directories first.

list_directoryA

List the contents of a directory in the WSL filesystem. Returns each entry with its name, type (file, directory, symlink), Unix permissions, size in bytes, and last-modified timestamp. Equivalent to running ls -la in the target directory.

get_distro_infoA

Get detailed information about a specific WSL distribution. Returns the WSL version, running state, current user identity, Linux kernel version, and OS release details (distro name, version, etc.). Useful for understanding the environment before running commands.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/riparino/wsl-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server