mcp-server-wslc
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-wslc Pull alpine:latest"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-wslc
MCP (Model Context Protocol) server for Microsoft's wslc CLI — a typed API wrapper that lets AI agents manage WSL containers safely.
Supported Clients
Claude Code · Codex CLI · Hermes · OpenClaw · Cursor · VS Code Agent
Related MCP server: ContainMind
Quick Start
Add to your MCP client's configuration file:
{
"mcpServers": {
"wslc": {
"command": "npx",
"args": ["-y", "mcp-server-wslc"]
}
}
}Restart the client, then try:
List all WSL containers. Pull alpine:latest. Create a container named "web-test" from ubuntu:24.04 with 512M memory.
Requirements: Node.js >= 22, wslc on PATH.
Commands
npm run dev # tsx — run TypeScript directly
npm run build # tsc → dist/
npm run check # tsc --noEmit (type-check only)
npm run test # vitest — run unit tests
npm run test:watch # vitest — watch mode
npm run test:coverage # vitest — test coverage report
npm start # node dist/index.js (production)Available Tools
Core
Tool | Description | Parameters |
| List all WSL containers |
|
| List all WSL container images |
|
Container Management
Tool | Description | Key Parameters |
| Create a new container |
|
| Run a container |
|
| Show container details |
|
| Start a stopped container |
|
| Stop a running container |
|
| Restart a container (stop + start) |
|
| Remove a container |
|
| View container logs |
|
| Execute a command in a container |
|
| Resource usage snapshot |
|
container_restartcomposesstop+start— wslc has no native restart command.
Image Management
Tool | Description | Key Parameters |
| Pull an image from a registry |
|
| Push an image to a registry |
|
| Build an image from a Dockerfile |
|
| Tag an image |
|
| Show image details |
|
| Remove an image |
|
Network Management
Tool | Description | Key Parameters |
| List all networks |
|
| Create a network |
|
| Remove a network |
|
Volume Management
Tool | Description | Key Parameters |
| List all volumes |
|
| Create a named volume |
|
| Remove a volume |
|
Registry Authentication
Tool | Description | Key Parameters |
| Log in to a registry |
|
| Log out from a registry |
|
Security: Prefer
passwordStdinoverpasswordto avoid exposing credentials in process lists.
System
Tool | Description | Key Parameters |
| Get wslc CLI version | — |
| Remove all stopped containers | — |
Example Prompts
List all running WSL containers.
Show me the wslc version.
What container images are available? Show in JSON format.
Create a container named "web-test" from ubuntu:24.04 with 1 CPU and 512M memory.
Run nginx in the background with port 8080 published.
View the last 50 lines of logs from container "web-test".
Get stats for all running containers in JSON format.
Pull alpine:latest and create a container from it.
Tag ubuntu:24.04 as my-ubuntu:latest.
Create a network named "backend" and run a container attached to it.Project Structure
mcp-server-wslc/
├── src/
│ ├── index.ts # Entry point
│ ├── server.ts # McpServer + stdio transport
│ ├── registry/
│ │ └── registerTools.ts # Central tool registration
│ ├── tools/
│ │ ├── containers/ # 11 files + 1 test
│ │ │ ├── list.ts, create.ts, run.ts, run.test.ts, inspect.ts
│ │ │ ├── start.ts, stop.ts, restart.ts, remove.ts
│ │ │ └── logs.ts, exec.ts, stats.ts
│ │ ├── images/ # 7 files
│ │ │ ├── list.ts, pull.ts, push.ts, build.ts
│ │ │ └── tag.ts, inspect.ts, remove.ts
│ │ ├── networks/ # 3 files
│ │ │ └── list.ts, create.ts, remove.ts
│ │ ├── volumes/ # 3 files
│ │ │ └── list.ts, create.ts, remove.ts
│ │ ├── registry/ # 2 files
│ │ │ └── login.ts, logout.ts
│ │ └── system/ # 2 files
│ │ └── version.ts, prune.ts
│ └── utils/
│ ├── wslc.ts # runWslc() — single execution point
│ └── wslc.test.ts # Unit tests for runWslc()
├── dist/ # Compiled output (33 JS files)
├── vitest.config.ts
├── package.json
├── tsconfig.json
├── README.md
└── README.zh-CN.mdTesting
Unit tests use vitest. Tests cover:
runWslc()— execution wrapper: stdout/stderr trimming, timeout, ENOENT, error propagationbuildContainerRunArgs()— CLI argument construction forcontainer_run: all parameter types and combinations
npm run test # Single run
npm run test:watch # Watch mode
npm run test:coverage # Coverage report (v8)License
ISC
Available Tools
28 toolscontainer_createC
Create a new WSL container. Returns the container ID on success.
Inputs: image (required), rm, env, tty, +9 more.
container_execB
Execute a command inside a running WSL container.
Inputs: command (required), containerId (required), env, tty, +5 more.
container_inspectB
Display detailed information about a WSL container.
Inputs: containerId (required).
container_logsB
View logs from a WSL container.
Inputs: containerId (required), tail, since, until, +2 more.
container_removeB
Remove a WSL container.
Inputs: containerId (required), force.
container_restartA
Restart a WSL container. Since wslc has no native restart command, this stops then starts the container.
Inputs: containerId (required), time, signal.
container_runB
Run a new WSL container. Defaults to foreground; use detach for background.
Inputs: image (required), rm, env, tty, +10 more.
container_startA
Start a stopped WSL container.
Inputs: containerId (required), attach, interactive.
container_statsB
Display resource usage snapshot for running WSL containers.
Inputs: all, format, noTrunc, containerId.
container_stopB
Stop a running WSL container.
Inputs: containerId (required), time, signal.
image_buildB
Build a container image from a Dockerfile.
Inputs: path (required), tag, file, pull, +5 more.
image_inspectB
Display detailed information about a container image.
Inputs: image (required).
image_pullB
Pull a container image from a registry.
Inputs: image (required).
image_pushA
Push a container image to a registry.
Inputs: image (required).
image_removeB
Remove a container image.
Inputs: image (required), force, noPrune.
image_tagB
Tag a container image with a new name/tag.
Inputs: source (required), target (required).
list_containersA
List all WSL containers. Use the optional 'format' parameter to control output format (table, json).
Inputs: format.
list_imagesA
List all WSL container images. Use the optional 'format' parameter to control output format (table, json).
Inputs: format.
network_createC
Create a new WSL network.
Inputs: name (required), opt, label, driver.
network_listA
List all WSL networks.
Inputs: quiet, format.
network_removeC
Remove one or more WSL networks.
Inputs: name (required), force.
registry_loginA
Log in to a container registry. If no server is specified, the session default is used. Prefer using passwordStdin over password to avoid exposing credentials in process lists.
Inputs: server, password, username, passwordStdin.
registry_logoutA
Log out from a container registry. If no server is specified, the session default is used.
Inputs: server.
system_pruneA
Remove all stopped containers and unused images, networks, and volumes to free up resources.
Inputs: no named parameters.
system_versionA
Get wslc CLI version information.
Inputs: no named parameters.
volume_createA
Create a new named volume that can be attached to containers.
Inputs: opt, name, label, driver.
volume_listB
List all WSL volumes.
Inputs: quiet, format.
volume_removeA
Remove one or more volumes. Volumes in use by a container cannot be removed.
Inputs: name (required), force.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 28 tools
Each tool targets a distinct resource-action pair, such as container_run vs container_create vs container_start, which are clearly differentiated by their descriptions. Resources like containers, images, volumes, networks, and registry operations are cleanly separated, leaving no ambiguity.
Most tools follow the verb_noun pattern (e.g., container_create, image_pull, network_list), but a few like list_containers and list_images reverse the order, creating minor inconsistency. The overall structure is predictable and readable, with only slight deviations.
With 28 tools, the count is on the higher end, but it corresponds to the broad domain of container management, covering containers, images, volumes, networks, and registry operations. Each tool serves a distinct purpose, making the size justified despite being above the typical 15-tool benchmark.
The tool surface provides comprehensive lifecycle coverage for containers (create, run, start, stop, restart, remove, inspect, logs, exec, stats), images (build, pull, push, tag, inspect, remove), and basic operations for volumes, networks, and registries. Minor gaps such as network connect/disconnect and volume inspect are present, but core workflows are well-supported.
Maintenance
Related MCP Connectors
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Linux VMs for AI agents: create VMs, run commands, edit files and open preview URLs.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables natural language interaction with Docker commands and operations. Supports container management, image operations, system information, and Docker Compose through conversational requests.14101 npm1MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage and analyze containers across Docker and Podman through natural language, providing unified inspection, monitoring, and diagnostics.3-
- AlicenseBqualityDmaintenanceEnables AI assistants to manage Docker containers and Kubernetes resources through natural language, supporting operations like container management, image building, and pod/deployment/service management.9MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to manage Docker containers and Compose stacks through natural language, including lifecycle operations, logs, stats, and secure remote access.216 npm3MIT