Devcontainer MCP logo

Devcontainer MCP

Manage isolated dev containers through Docker, DevPod, and Codespaces using MCP tools.

Install Devcontainer MCP

Run the project’s own setup commands, in order.

Setup steps from the project

devcontainer-mcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    curl -fsSL https://raw.githubusercontent.com/aniongithub/devcontainer-mcp/main/install.sh | bash
    
  2. 2. Install
    Invoke-RestMethod https://github.com/aniongithub/devcontainer-mcp/releases/latest/download/install.ps1 | Invoke-Expression
    

Overview

The devcontainer-mcp MCP server lets AI coding agents create, operate, and remove development environments through local Docker, DevPod, and GitHub Codespaces. It exposes MCP tools for authentication, workspace lifecycle operations, command execution, logs, files, providers, contexts, and devcontainer configuration. Use it when agent-generated builds and tests should run in an isolated environment instead of directly on the host. Local installation uses stdio, while Windows clients can launch the binary through WSL.

Use cases

  • Run builds and tests inside an isolated dev container
  • Create and manage DevPod workspaces from a repository
  • Inspect and edit files inside a remote workspace
  • Discover and validate devcontainer configurations
  • Authenticate cloud providers without exposing raw tokens

Key features

  • Local Docker devcontainer lifecycle management
  • DevPod workspace, provider, and context controls
  • Command execution, logs, and file operations
  • Devcontainer configuration discovery and inspection
  • Brokered authentication for supported providers
  • Optional host-command protection hooks

Tools46

What Devcontainer MCP lets your agent do. Expand a tool for its parameters.

Self-reported~680 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

17/18 checks healthy over the last 111d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars28Stargazers on the source repository.
Last commit2mo agoMost recent push to the default branch.
Tools exposed46Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Devcontainer MCP works

What devcontainer-mcp does

The devcontainer-mcp MCP server gives an MCP-compatible coding agent an interface for working inside reproducible development environments. It supports the devcontainer specification through local Docker, and also describes DevPod and GitHub Codespaces backends for environments that run on cloud VMs or GitHub-hosted infrastructure.

An agent can create or build an environment from a repository, local path, or image, run commands inside it, inspect its state, collect logs, and clean up its resources. File operations are available for reading, writing, editing, and listing files within DevPod workspaces. The server also exposes configuration discovery and merged configuration reads for devcontainer projects, including multi-container configurations.

How it works

The MCP client communicates with the server over stdio JSON-RPC. The server delegates work to the DevPod and devcontainer command-line tools, the GitHub CLI, and Docker APIs. The required backend is selected by the tool family: devcontainer_* targets local Docker, while devpod_* manages DevPod workspaces and their configured providers and contexts.

Authentication is handled through brokered accounts rather than raw tokens passed to the agent. Agents can inspect provider accounts and scopes, start a login or scope-refresh flow, select an account, and revoke credentials. Supported authentication providers listed by the project are GitHub, AWS, Azure, GCP, and Kubernetes.

The installer can also configure hooks for Claude Code and GitHub Copilot CLI. In directories containing .devcontainer/devcontainer.json, the guard hook blocks ordinary host command execution so work is routed through MCP tools. A .devcontainer-mcp-disable marker disables both hooks for a repository, and USER_CONFIRMED_HOST_OPERATION=1 provides a one-command bypass.

Setup and configuration

Install on Linux or macOS with the project’s shell installer:

Terminal
curl -fsSL https://raw.githubusercontent.com/aniongithub/devcontainer-mcp/main/install.sh | bash

On Windows, installation runs through WSL. MCP clients launch wsl ~/.local/bin/devcontainer-mcp serve, and WSL 2 is required. The project publishes binaries for Linux x64, Linux ARM64, macOS x64, and macOS ARM64.

The backend command-line dependencies are detected at runtime. Docker is needed for local container work; the devcontainer CLI is needed for devcontainer_* operations; DevPod is needed for devpod_* operations; and the GitHub CLI is used for GitHub-related backend operations. If a detected dependency is missing, the server reports an error with installation guidance.

Tools and capabilities

The devcontainer-mcp MCP server exposes these capability groups:

  • Authentication: inspect accounts and scopes, log in, select an account, and log out.
  • DevPod workspaces: create, stop, delete, build, inspect status, list workspaces, run SSH commands, retrieve logs, and manage providers and contexts.
  • DevPod workspace files: read files with optional line ranges, write files, replace exact strings, and list non-hidden directory contents up to two levels deep.
  • Local dev containers: start, execute commands, build images, stop, remove, inspect status, and read or discover devcontainer.json configurations.
  • Docker-backed inspection: inspect container labels, ports, mounts, and state, and retrieve container logs.

Limitations and notes

The server does not remove the need to install and configure the backend tools it invokes. Cloud-backed workflows may also require provider authentication and appropriate scopes. Authentication handles are used instead of exposing raw credentials to the agent, but the underlying provider accounts and command-line tools still need to be available.

The host-protection hooks are limited to supported agent workflows and fail open when jq is unavailable or a hook payload cannot be parsed. They activate only when a repository contains .devcontainer/devcontainer.json; projects without that file are not covered by the guard behavior. A stale devcontainer configuration can be bypassed per repository with .devcontainer-mcp-disable.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Devcontainer MCP

devcontainer-mcp is an MCP server that connects AI coding agents to local Docker dev containers, DevPod workspaces, and GitHub Codespaces. Its main tools create, build, start, stop, and remove environments; execute commands; inspect status and logs; manage files; read devcontainer configurations; and handle provider authentication.

Install it on Linux or macOS with the project’s curl-based installer. Windows installation runs through WSL, where MCP clients launch `wsl ~/.local/bin/devcontainer-mcp serve`. WSL 2 is required on Windows, and backend CLIs such as Docker, DevPod, or the devcontainer CLI must be available for the operations you use.

Yes, the README names Cursor as a supported MCP-compatible client. The server uses stdio JSON-RPC, so Cursor must be configured to launch the installed `devcontainer-mcp serve` command. On Windows, that command runs through WSL as documented by the project.

Yes, commands can be executed inside local dev containers or DevPod workspaces through the MCP tools. The installer can add hooks that block shell or command execution on the host in repositories containing a devcontainer configuration. The hooks fail open and can be disabled with `.devcontainer-mcp-disable`.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDevcontainer MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/devcontainer-mcp?style=directory)](https://allmcps.com/mcp/devcontainer-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/devcontainer-mcp"><img src="https://allmcps.com/api/badge/devcontainer-mcp?style=directory" alt="Devcontainer MCP on AllMCPs" /></a>