Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,26 +88,3 @@ jobs:
files: |
install.sh
install.ps1

build-windows:
name: Build devcontainer-mcp-windows-x64
runs-on: windows-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc
- uses: Swatinem/rust-cache@v2
with:
key: x86_64-pc-windows-msvc

- name: Build
run: cargo build --release --target x86_64-pc-windows-msvc -p devcontainer-mcp

- name: Package binary
run: Compress-Archive -Path target/x86_64-pc-windows-msvc/release/devcontainer-mcp.exe -DestinationPath devcontainer-mcp-windows-x64.zip

- name: Upload release asset
uses: softprops/action-gh-release@v3
with:
files: devcontainer-mcp-windows-x64.zip
58 changes: 2 additions & 56 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ tools:
- devpod_file_write
- devpod_file_edit
- devpod_file_list
- wsl_list
- wsl_exec
- wsl_terminate
- wsl_shutdown
- wsl_set_default
- wsl_file_read
- wsl_file_write
- wsl_file_edit
- wsl_file_list
---

# DevContainer MCP Skill
Expand All @@ -69,7 +60,7 @@ You have access to `devcontainer-mcp`, an MCP server that manages dev container

**If a project has `.devcontainer/devcontainer.json`, ALL work MUST happen inside a dev container — never install dependencies, run builds, or execute code directly on the host.**

**Use ONLY the MCP tools listed here.** Do not invoke `docker`, `devcontainer`, `devpod`, `gh`, or `wsl` CLI commands directly — the MCP tools wrap these CLIs with proper error handling, auth resolution, and escaping. Direct CLI usage bypasses these safeguards. This applies even when the user asks to work "directly in WSL" or "not in a devcontainer" — use `wsl_exec` and WSL file tools instead of raw `wsl` commands.
**Use ONLY the MCP tools listed here.** Do not invoke `docker`, `devcontainer`, `devpod`, or `gh` CLI commands directly — the MCP tools wrap these CLIs with proper error handling, auth resolution, and escaping. Direct CLI usage bypasses these safeguards.

## Authentication

Expand Down Expand Up @@ -175,51 +166,6 @@ codespaces_ssh(auth: "github-USERNAME", codespace: "codespace-name", command: "n
codespaces_stop(auth: "github-USERNAME", codespace: "codespace-name")
```

## Workflow: WSL (Windows only)

> **Use these tools — not raw `wsl.exe` or PowerShell `wsl` commands.** When a user asks to work "in WSL" or "directly in WSL", use `wsl_exec` and the WSL file tools below — these ARE the way to work in WSL through MCP.

WSL tools let you clone repos, build projects, and run commands inside any WSL distribution — without devcontainers or Docker.

### 1. List available distributions
```
wsl_list()
```

### 2. Clone and build a repo in WSL
```
wsl_exec(distro: "Ubuntu", command: "git clone https://github.com/org/repo.git /home/user/repo")
wsl_exec(distro: "Ubuntu", command: "cd /home/user/repo && cargo build")
```

### 3. Execute any command inside a distribution
```
wsl_exec(distro: "Ubuntu", command: "apt list --installed")
```

### 4. Set the default distribution
```
wsl_set_default(distro: "Ubuntu")
```

### 5. Stop a distribution
```
wsl_terminate(distro: "Ubuntu")
```

### 6. Shut down all WSL distributions
```
wsl_shutdown()
```

### File operations in WSL
```
wsl_file_read(distro: "Ubuntu", path: "/home/user/project/src/main.rs")
wsl_file_write(distro: "Ubuntu", path: "/home/user/file.txt", content: "fn main() {}")
wsl_file_edit(distro: "Ubuntu", path: "/home/user/file.txt", old_str: "fn main", new_str: "fn start")
wsl_file_list(distro: "Ubuntu", path: "/home/user/project")
```

## Self-Healing

If `devpod_up`, `devcontainer_up`, or `codespaces_create` returns errors:
Expand All @@ -233,7 +179,7 @@ If `devpod_up`, `devcontainer_up`, or `codespaces_create` returns errors:
- ❌ Do NOT install packages on the host
- ❌ Do NOT run builds on the host
- ❌ Do NOT modify the host's global config
- ❌ Do NOT run `docker`, `devcontainer`, `devpod`, `gh`, or `wsl` CLI commands directly — use the MCP tools
- ❌ Do NOT run `docker`, `devcontainer`, `devpod`, or `gh` CLI commands directly — use the MCP tools
- ✅ DO authenticate before using codespaces tools
- ✅ DO ask the user which account/machine type to use
- ✅ DO use `devpod_ssh`, `devcontainer_exec`, or `codespaces_ssh` for everything
Expand Down
7 changes: 0 additions & 7 deletions crates/devcontainer-mcp-core/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ pub enum CliBinary {
Gcloud,
/// Kubernetes CLI
Kubectl,
#[cfg(target_os = "windows")]
/// Windows Subsystem for Linux
Wsl,
}

impl CliBinary {
Expand All @@ -44,8 +41,6 @@ impl CliBinary {
CliBinary::Aws => "aws",
CliBinary::Gcloud => "gcloud",
CliBinary::Kubectl => "kubectl",
#[cfg(target_os = "windows")]
CliBinary::Wsl => "wsl",
}
}

Expand All @@ -58,8 +53,6 @@ impl CliBinary {
CliBinary::Aws => Error::AwsCliNotFound,
CliBinary::Gcloud => Error::GcloudCliNotFound,
CliBinary::Kubectl => Error::KubectlNotFound,
#[cfg(target_os = "windows")]
CliBinary::Wsl => Error::WslNotFound,
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions crates/devcontainer-mcp-core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ pub enum Error {
#[error("kubectl not found. Install from: https://kubernetes.io/docs/tasks/tools/")]
KubectlNotFound,

#[cfg(target_os = "windows")]
#[error("WSL (wsl.exe) not found. WSL must be installed: https://learn.microsoft.com/en-us/windows/wsl/install")]
WslNotFound,

#[error("DevPod command failed (exit code {exit_code}): {stderr}")]
DevPodCommand { exit_code: i32, stderr: String },

Expand Down
2 changes: 0 additions & 2 deletions crates/devcontainer-mcp-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ pub mod devpod;
pub mod docker;
pub mod error;
pub mod file_ops;
#[cfg(target_os = "windows")]
pub mod wsl;
182 changes: 0 additions & 182 deletions crates/devcontainer-mcp-core/src/wsl.rs

This file was deleted.

1 change: 0 additions & 1 deletion crates/devcontainer-mcp/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ fn active_tags() -> HashSet<String> {
tags.insert("macos".to_string());
tags.insert("windows".to_string());
tags.insert("docker-desktop".to_string());
tags.insert("wsl".to_string());
tags
}

Expand Down
9 changes: 2 additions & 7 deletions crates/devcontainer-mcp/src/tools/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ mod codespaces;
pub mod common;
mod devcontainer;
mod devpod;
#[cfg(target_os = "windows")]
mod wsl;

use rmcp::handler::server::router::tool::ToolRouter;
use rmcp::model::{ServerCapabilities, ServerInfo};
Expand All @@ -19,13 +17,10 @@ impl DevContainerMcp {
}

fn combined_router() -> ToolRouter<Self> {
let r = Self::devpod_router()
Self::devpod_router()
+ Self::devcontainer_router()
+ Self::codespaces_router()
+ Self::auth_router();
#[cfg(target_os = "windows")]
let r = r + Self::wsl_router();
r
+ Self::auth_router()
}
}

Expand Down
Loading