devenv-mcp-server

devenv-mcp-server

Provisions Docker-based development environments on demand, allowing AI agents to create, manage, and inspect containerized dev environments without manual setup.

Category
访问服务器

README

DevEnv MCP Server

An MCP (Model Context Protocol) server that provisions Docker-based development environments on demand.

Any AI agent (Claude, Gemini, Cursor, etc.) can call these tools to create, manage, and inspect containerized dev environments — completely hands-free. No more manual setup of Node, Python, or Docker Compose for every new project.

Features

  • Instant Scaffolding: Create full-stack projects (Next.js, Flask, FastAPI, etc.) with one command.
  • Docker Isolation: Every environment runs in its own container, keeping your host machine clean.
  • Two Workspace Modes: isolated (default, container-only files) or mapped (bind-mounted host files).
  • Hands-free Dependencies: The AI automatically installs required packages and sets up the environment.
  • Direct File Access: write_file and read_file tools let the agent modify files inside the container.
  • Portable Export: export_environment snapshots an environment into a Docker image tarball.
  • Universal IDE Support: Works with VS Code (Gemini), Claude Desktop, Cursor, Windsurf, and Claude CLI.

Supported Stacks

Stack Framework Base Image Default Port
flask Flask (Python) python:3.12-slim 5000
django Django (Python) python:3.12-slim 8000
fastapi FastAPI (Python) python:3.12-slim 8000
nextjs Next.js (React) node:20-slim 3000
vite-react Vite + React node:20-slim 5173
vite-vue Vite + Vue node:20-slim 5173
express Express.js node:20-slim 3000
static-html Static HTML/CSS/JS node:20-slim 8080
laravel Laravel (PHP) php:8.3-fpm-alpine 8000
symfony Symfony (PHP) php:8.3-fpm-alpine 8000
nestjs NestJS (Node.js) node:22-slim 3000
bun-hono Hono (Bun) oven/bun:1-alpine 3000
rust-axum Axum/Actix (Rust) rust:1-slim 8080
go-gin Gin/Fiber (Go) golang:1.24-alpine 8080
nginx-static Nginx (Static Assets) nginx:alpine 80

Prerequisites

  • Docker with docker compose v2 installed and running.
  • Python 3.10+ with pip.

Quick Start

  1. Clone and Install:

    git clone https://github.com/ClaudiuJitea/devenv-mcp-server.git
    cd devenv-mcp-server
    pip install -r requirements.txt
    
  2. Configure your IDE: (See IDE Integration below)

  3. Start Creating: Ask your AI agent:

    "Create a new Next.js project called 'my-portfolio' using the devenv tool."

IDE Integration

Gemini Code Assist (VS Code)

Add to your VS Code settings.json:

{
  "gemini.mcp.servers": {
    "devenv": {
      "command": "python3",
      "args": ["/absolute/path/to/server.py"],
      "env": {}
    }
  }
}

Claude Desktop

Add to ~/.config/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "devenv": {
      "command": "python3",
      "args": ["/absolute/path/to/server.py"]
    }
  }
}

Cursor / Windsurf / Claude CLI

The server supports the standard MCP protocol via stdio. Use the path to server.py in your configuration.

Available Tools

Tool Description
list_supported_stacks Show all available technology stacks
create_environment Create a new Docker dev environment
list_environments List all environments and their status
start_environment Start a stopped environment
stop_environment Stop a running environment
destroy_environment Remove environment, container, volumes, associated images, and files by default
exec_command Run a command inside a container
write_file Write/create a file inside a container's /app
read_file Read a file from a container's /app
get_environment_info Get detailed environment info
export_environment Export a portable image tar and generate deploy scripts

Workspace Modes

create_environment supports workspace_mode:

  • isolated (default): no host bind mount. Source code, dependencies, and generated files stay inside the container.
  • mapped: bind-mount project files from ~/devenv-projects/<project> to /app for direct host editing.

Recommended default is isolated when you want portability and host isolation.

How It Works

  1. Request: The AI agent identifies a stack requirement (e.g., "I want a Flask app").
  2. Execution: It calls create_environment(project_name="app", stack="flask", workspace_mode="isolated").
  3. Provisioning: The MCP server:
    • Creates a project directory at ~/devenv-projects/<project>/.
    • Generates Dockerfile, compose, and metadata files.
    • Builds and starts a dedicated container for that project.
    • Runs stack-specific initialization commands when required.
  4. Editing Workflow:
    • In isolated mode, use write_file, read_file, and exec_command to work entirely in-container.
    • In mapped mode, edit files directly from the host and they reflect in the container.
  5. Portability: Call export_environment to snapshot and save a tarball (docker load -i ... on another machine). In mapped mode, export automatically captures mapped host files into an isolated image first. The export also writes deploy-<project>.sh and deploy-<project>.ps1 next to the tar.

Directory Structure

~/devenv-projects/
└── my-project/
    ├── Dockerfile
    ├── docker-compose.yml
    ├── .devenv.json
    ├── app.py            # or stack scaffold files
    └── ...

Development

To test the server manually:

python3 server.py

Or use the MCP Inspector:

npx @modelcontextprotocol/inspector python3 server.py

Built for the AI-First Developer Workflow.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选