mcp-devcontainers

mcp-devcontainers

MCP server for generating and configuring development containers from devcontainer.json files, enabling management of devcontainer environments through tools like devcontainer_up, devcontainer_exec, and cleanup.

Category
访问服务器

README

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:

  • Install Node.js on your machine, or
  • Use the provided devcontainer virtual environment.

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

npx -y mcp-devcontainers

Docker is required in the execution environment:

  • For local MCP server: Install Docker on your local machine
  • For remote MCP server: Install Docker on the remote server

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

🚀 Getting Started

  • Build: npm run build - Compiles TypeScript to JavaScript
  • Watch mode: npm run watch - Automatically rebuilds on file changes
  • Prepare release: npm run prepare - Prepares the package for publishing
  • Run ESLint: npm run lint - Executes ESLint for code validation
  • Fix ESLint issues: npm run lint:fix - Automatically fixes ESLint errors

✨ MCP Transport

Option 1 - Start STDIO server

Launches the MCP server with stdio transport

npm start

Option 2 - Start SSE server

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

npm start sse

Option 3 - Start Streamable HTTP server

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

npm start http

📚 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.

  • Input Parameters

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

    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.

  • Input Parameters

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

    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.

  • Input Parameters

    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
  • Returns

    Text content with the command execution result

devcontainer_cleanup

Runs docker command to cleanup all devcontainer environments.

  • Input Parameters

    N/A

  • Returns

    Text content with Docker process ID removed

devcontainer_list

Runs docker command to list all devcontainer environments.

  • Input Parameters

    N/A

  • Returns

    Text content with the current devcontainer Docker process status

devcontainer_workspace_folders

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

  • Input Parameters

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

    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:

  • Wait for the environment to initialize in your browser

  • Install dependencies: npm install

  • Launch the service: npm start http

    The codespace will automatically provide a forwarded port (e.g., https://ominous-halibut-7vvq7v56vgq6hr5p9-3001.app.github.dev/)

  • Make the forwarded port publicly accessible (located on the right side of the VSCode Terminal tab)

  • Connect using mcp-inspector via Streamable HTTP

    npx -y @modelcontextprotocol/inspector
    

    For a streamable HTTP connection, remember to append /mcp to the URL

    devcontainer_up typically takes a considerable amount of time to start the container. If you want to receive the result within a single response interaction, you will need to increase both the Request Timeout and the Maximum Total Timeout in the Configuration of the mcp-inspector

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选