Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DuploCloud Docker MCP Serverlist all services in the 'production' tenant"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DuploCloud Docker MCP Server
MCP server that exposes DuploCloud infrastructure management as tools consumable via Docker MCP Toolkit.
Tools (31 total)
Category | Tools |
Tenants |
|
Services |
|
Hosts |
|
Databases |
|
Storage |
|
Containers |
|
Setup
Prerequisites
Python 3.13+
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 # optionalInstall & Run
uv sync
uv run main.pyDocker
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-mcpDocker MCP Toolkit
docker mcp server add duplocloud-mcpTool Reference
Tenants
Tool | Parameters | Description |
| — | List all tenants accessible in the DuploCloud portal |
|
| Get details of a specific tenant by name |
|
| Create a new tenant |
|
| Delete a tenant by name |
Services
Tool | Parameters | Description |
|
| List all services in a tenant |
|
| Get details of a specific service |
|
| Create a new service |
|
| Update service image and/or replicas |
|
| Delete a service |
|
| Restart a service (rolling redeployment) |
Hosts
Tool | Parameters | Description |
|
| List all hosts (VMs) in a tenant |
|
| Get details of a specific host |
|
| Create a new host (0=Linux Docker, 7=EKS Linux) |
|
| Terminate a host |
|
| Reboot a host |
Databases
Tool | Parameters | Description |
|
| List all RDS instances in a tenant |
|
| Get details of an RDS instance |
|
| Create an RDS instance |
|
| Resize an RDS instance |
|
| Delete an RDS instance |
Storage
Tool | Parameters | Description |
|
| List all S3 buckets in a tenant |
|
| Get details of an S3 bucket |
|
| Create a new S3 bucket |
|
| Update bucket configuration (versioning) |
|
| Delete an S3 bucket |
Containers (ECS)
Tool | Parameters | Description |
|
| List all ECS services in a tenant |
|
| List all ECS task definition families |
|
| List running tasks for a service |
|
| Run a task from a task definition family |
|
| Update the image of an ECS service |
|
| Delete an ECS service |
Troubleshooting
Missing environment variables
DuploError: DUPLO_HOST environment variable is requiredSet 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_listArchitecture
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 toolsEach 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