GitHub - AI-QL/mcp-devcontainers: MCP server for devcontainer to generate and configure development containers directly from devcontainer.json configuration files. (original) (raw)

MCP Devcontainers

npm NPM Downloads LICENSE

MCP server for devcontainer to generate and configure development containers directly from devcontainer.json configuration files.

📌 Pre-condition

This project is built with Node.js. For local development, you can either:

You may run the project without installing Node.js locally by using npx:

Docker is required in the execution environment:

📦 Docker installation guide: https://docs.docker.com/get-started/get-docker/

🚀 Getting Started

✨ MCP Transport

Option 1 - Start STDIO server

Launches the MCP server with stdio transport

Option 2 - Start SSE server

Runs the MCP server with Server-Sent Events transport on https://{your-domain}/sse

Option 3 - Start Streamable HTTP server

Starts the MCP server with Streamable HTTP transport on https://{your-domain}/mcp

📚 Tools

Tools are built on the devcontainers/cli

They enable you to generate and configure development containers directly from devcontainer.json configuration files:

devcontainer_up

Initializes and starts a devcontainer environment in the specified workspace folder. Ensures the devcontainer is operational and ready for development tasks.

Name Required Type Description
workspaceFolder string Path to the workspace folder
outputFilePath string Path for output logs


Text content with the devcontainer startup information

devcontainer_run_user_commands

Executes user-defined postCreateCommand and postStartCommand scripts within the devcontainer for the specified workspace. Use this to run setup or initialization tasks after container startup.

Name Required Type Description
workspaceFolder string Path to the workspace folder
outputFilePath string Path for output logs


Text content with the command execution result

devcontainer_exec

Runs a custom shell command inside the devcontainer for the specified workspace. Useful for executing arbitrary commands or scripts within the devcontainer environment.

Name Required Type Description
workspaceFolder string Path to the workspace folder
outputFilePath string Path for output logs
command string[ ] Command to execute as string array


Text content with the command execution result

devcontainer_cleanup

Runs docker command to cleanup all devcontainer environments.


N/A


Text content with Docker process ID removed

devcontainer_list

Runs docker command to list all devcontainer environments.


N/A


Text content with the current devcontainer Docker process status

devcontainer_workspace_folders

Runs find command to get all workspace folders with devcontainer config.

Name Required Type Description
rootPath string A path used to search its subdirectories for all workspace folders containing a devcontainer configuration.


Text content with all workspace folders under the specified root path.

🧑‍💻 Quick Experience / Trial

For developers who want to quickly try this project without a local Docker setup, we recommend using GitHub Codespaces:

Open in GitHub Codespaces

Then follow these steps to set up a trial environment:

For MCP Clients that don't support remote URLs, use this alternative configuration:

{ "mcpServers": { "Devcontainer": { "command": "npx", "args": ["mcp-remote", "https://ominous-halibut-7vvq7v56vgq6hr5p9-3001.app.github.dev/mcp"] } } }

🤝 Contributing

We welcome contributions of any kind to this project, including feature enhancements, UI improvements, documentation updates, test case completions, and syntax corrections. I believe that a real developer can write better code than AI, so if you have concerns about certain parts of the code implementation, feel free to share your suggestions or submit a pull request.

Please review our Code of Conduct. It is in effect at all times. We expect it to be honored by everyone who contributes to this project.

For more information, please see Contributing Guidelines

🐞 Opening an Issue

Before creating an issue, check if you are using the latest version of the project. If you are not up-to-date, see if updating fixes your issue first.

🔒 Reporting Security Issues

Review our Security Policy. Do not file a public issue for security vulnerabilities.

⭐ Credits

Written by @AIQL.com.

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.