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
Visit Server

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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured