# devcontainer-mcp

Runs agent builds, tests, and terminal commands inside isolated dev containers. Keeps your host machine clean by routing work to Docker, DevPod, or GitHub Codespaces.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 28
- Author: aniongithub
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/aniongithub/devcontainer-mcp
- Updated: 2026-09-08
- HTML: https://affpapa.org/en/nevibecode/mcp/devcontainer-mcp

## What it does

The server connects coding assistants to the devcontainer specification. Instead of altering your local setup, the assistant operates inside containers defined by `.devcontainer/devcontainer.json`. Supported backends include local Docker, remote DevPod instances, and GitHub Codespaces. Your operating system stays untouched.

Under the hood, the server delegates work to CLI binaries like `gh`, `devpod`, or the `@devcontainers/cli` package. A built-in auth broker manages credentials for GitHub, AWS, Azure, GCP, and Kubernetes without exposing secret tokens to the language model. If a required CLI tool is missing, the server returns an error explaining how to install it.

Installation sets up guard hooks for Claude Code and GitHub Copilot CLI. The `devcontainer-guard` hook intercepts shell executions on the host, permitting only safe tools like `git` and `gh`. To bypass host blocking for a single command, include `USER_CONFIRMED_HOST_OPERATION=1`. You can also drop a `.devcontainer-mcp-disable` file in the project root to deactivate the hooks entirely.

## Requirements
- Needs: Docker

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- Run build scripts and tests inside isolated Docker containers
- Spin up cloud development workspaces on GitHub Codespaces
- Block coding agents from executing untrusted commands on the host machine
- Connect to cloud providers without revealing raw authentication tokens

## Example prompts
- Run the project test suite inside the dev container
- Create a Codespace for this repository and compile the code
- Check GitHub authentication status before launching DevPod

## Similar
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Oh My Posh Validator](https://affpapa.org/en/nevibecode/mcp/oh-my-posh-validator.md) — MCP server · ★ 23643
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Coder](https://affpapa.org/en/nevibecode/mcp/coder.md) — MCP server · ★ 17160
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12109

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
