Integrate Espressif's QEMU fork for virtual ESP device management: - QemuManager component with 5 MCP tools (start/stop/list/status/flash) - Config auto-detects QEMU binaries from ~/.espressif/tools/ - Supports esp32, esp32s2, esp32s3, esp32c3 chip emulation - Virtual serial over TCP (socket://localhost:PORT) transparent to esptool - Scan integration: QEMU instances appear in esp_scan_ports results - Blank flash images initialized to 0xFF (erased NOR flash state) - 38 unit tests covering lifecycle, port allocation, flash writes
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
services:
|
|
mcp-esptool-server:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: ${DOCKER_TARGET:-development}
|
|
container_name: mcp-esptool-server
|
|
environment:
|
|
- ESPTOOL_PATH=${ESPTOOL_PATH:-esptool}
|
|
- ESP_DEFAULT_BAUD_RATE=${ESP_DEFAULT_BAUD_RATE:-460800}
|
|
- ESP_CONNECTION_TIMEOUT=${ESP_CONNECTION_TIMEOUT:-30}
|
|
- ESP_ENABLE_STUB_FLASHER=${ESP_ENABLE_STUB_FLASHER:-true}
|
|
- ESP_IDF_PATH=${ESP_IDF_PATH:-}
|
|
- MCP_ENABLE_PROGRESS=${MCP_ENABLE_PROGRESS:-true}
|
|
- MCP_ENABLE_ELICITATION=${MCP_ENABLE_ELICITATION:-true}
|
|
- MCP_LOG_LEVEL=${MCP_LOG_LEVEL:-INFO}
|
|
- PRODUCTION_MODE=${PRODUCTION_MODE:-false}
|
|
- DEV_ENABLE_HOT_RELOAD=${DEV_ENABLE_HOT_RELOAD:-true}
|
|
- DEV_MOCK_HARDWARE=${DEV_MOCK_HARDWARE:-false}
|
|
volumes:
|
|
# Development mode: mount source for hot reload
|
|
- .:/app:cached
|
|
# Mount ESP projects directory
|
|
- ${ESP_PROJECTS_DIR:-./esp_projects}:/workspace/esp_projects
|
|
# Mount device access for real hardware
|
|
- /dev:/dev
|
|
privileged: true # Required for USB device access
|
|
networks:
|
|
- mcp-network
|
|
ports:
|
|
- "8080:8080"
|
|
develop:
|
|
watch:
|
|
- action: sync
|
|
path: ./src
|
|
target: /app/src
|
|
- action: rebuild
|
|
path: ./pyproject.toml
|
|
|
|
networks:
|
|
mcp-network:
|
|
external: false |