MCP Hub
Back to servers

DuploCloud Docker MCP Server

Enables comprehensive management of DuploCloud infrastructure, including tenants, services, hosts, databases, and storage. It provides tools for lifecycle operations on cloud resources like ECS tasks and S3 buckets through the Model Context Protocol.

Updated
Feb 13, 2026

DuploCloud Docker MCP Server

MCP server that exposes DuploCloud infrastructure management as tools consumable via Docker MCP Toolkit.

Tools (31 total)

CategoryTools
Tenantstenant_list, tenant_get, tenant_create, tenant_delete
Servicesservice_list, service_get, service_create, service_update, service_delete, service_restart
Hostshost_list, host_get, host_create, host_delete, host_reboot
Databasesdatabase_list, database_get, database_create, database_update, database_delete
Storagebucket_list, bucket_get, bucket_create, bucket_update, bucket_delete
Containersecs_service_list, ecs_task_def_list, ecs_task_list, ecs_task_run, ecs_service_update, ecs_service_delete

Setup

Prerequisites

  • Python 3.13+
  • uv
  • DuploCloud portal access with an API token

Environment Variables

export DUPLO_HOST=https://your-company.duplocloud.net
export DUPLO_TOKEN=your-api-token
export DUPLO_TENANT=default  # optional

Install & Run

uv sync
uv run main.py

Docker

docker build -f docker/Dockerfile -t duplocloud-mcp .
docker run -i --rm \
  -e DUPLO_HOST=https://your-company.duplocloud.net \
  -e DUPLO_TOKEN=your-api-token \
  duplocloud-mcp

Docker MCP Toolkit

docker mcp server add duplocloud-mcp

Tool Reference

Tenants

ToolParametersDescription
tenant_listList all tenants accessible in the DuploCloud portal
tenant_getnameGet details of a specific tenant by name
tenant_createaccount_name, plan_idCreate a new tenant
tenant_deletenameDelete a tenant by name

Services

ToolParametersDescription
service_listtenant_idList all services in a tenant
service_gettenant_id, nameGet details of a specific service
service_createtenant_id, name, image, replicas=1Create a new service
service_updatetenant_id, name, image?, replicas?Update service image and/or replicas
service_deletetenant_id, nameDelete a service
service_restarttenant_id, nameRestart a service (rolling redeployment)

Hosts

ToolParametersDescription
host_listtenant_idList all hosts (VMs) in a tenant
host_gettenant_id, nameGet details of a specific host
host_createtenant_id, friendly_name, capacity, agent_platform=0Create a new host (0=Linux Docker, 7=EKS Linux)
host_deletetenant_id, nameTerminate a host
host_reboottenant_id, nameReboot a host

Databases

ToolParametersDescription
database_listtenant_idList all RDS instances in a tenant
database_gettenant_id, nameGet details of an RDS instance
database_createtenant_id, identifier, engine, size, master_username="master", master_password?Create an RDS instance
database_updatetenant_id, name, size?Resize an RDS instance
database_deletetenant_id, nameDelete an RDS instance

Storage

ToolParametersDescription
bucket_listtenant_idList all S3 buckets in a tenant
bucket_gettenant_id, nameGet details of an S3 bucket
bucket_createtenant_id, nameCreate a new S3 bucket
bucket_updatetenant_id, name, versioning?Update bucket configuration (versioning)
bucket_deletetenant_id, nameDelete an S3 bucket

Containers (ECS)

ToolParametersDescription
ecs_service_listtenant_idList all ECS services in a tenant
ecs_task_def_listtenant_idList all ECS task definition families
ecs_task_listtenant_id, service_nameList running tasks for a service
ecs_task_runtenant_id, family_name, replicas=1Run a task from a task definition family
ecs_service_updatetenant_id, name, imageUpdate the image of an ECS service
ecs_service_deletetenant_id, nameDelete an ECS service

Troubleshooting

Missing environment variables

DuploError: DUPLO_HOST environment variable is required

Set DUPLO_HOST and DUPLO_TOKEN before running. See .env.example.

Invalid or expired token

{"error": "Unauthorized", "code": 401}

Generate a new API token from the DuploCloud portal: User menu > Security > API Token.

Tenant not found

{"error": "Tenant 'xyz' not found", "code": 404}

Verify the tenant name with tenant_list. Tenant names are case-sensitive.

Connection refused

{"error": "Unexpected error: Connection refused", "code": 500}

Verify DUPLO_HOST is correct and the DuploCloud portal is reachable from your network.

Development

# Install with dev dependencies
uv sync

# Lint & format
uv run ruff check .
uv run ruff format .

# Tests
uv run pytest
uv run pytest --cov=duplocloud_mcp --cov-report=term-missing

# Single test
uv run pytest tests/test_tools/test_services.py::test_service_list

Architecture

main.py                          # Entrypoint: mcp.run(transport="stdio")
duplocloud_mcp/
  server.py                      # FastMCP instance, imports tool modules
  client.py                      # DuploClient singleton wrapper
  errors.py                      # Error decorator, validators
  tools/
    tenants.py                   # Tenant CRUD tools
    services.py                  # Service CRUD + restart tools
    hosts.py                     # Host CRUD + reboot tools
    databases.py                 # RDS database CRUD tools
    storage.py                   # S3 bucket CRUD tools
    containers.py                # ECS service/task tools

Each tool module imports the shared mcp instance from server.py and registers tools via @mcp.tool(). The @handle_duplo_errors decorator translates DuploCloud exceptions into structured JSON error responses. The duplocloud-client library handles all REST API communication.

License

MIT

Reviews

No reviews yet

Sign in to write a review