mcp-server-wslc
Click on "Install 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-wslcPull 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: Docker MCP Server
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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/aihuali213/mcp-server-wslc'
If you have feedback or need assistance with the MCP directory API, please join our Discord server