Skip to main content
Glama
DuploCloud Docker MCP Server

DuploCloud Docker MCP Server

DuploCloud Docker MCP Server

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

Tools (31 total)

Category

Tools

Tenants

tenant_list, tenant_get, tenant_create, tenant_delete

Services

service_list, service_get, service_create, service_update, service_delete, service_restart

Hosts

host_list, host_get, host_create, host_delete, host_reboot

Databases

database_list, database_get, database_create, database_update, database_delete

Storage

bucket_list, bucket_get, bucket_create, bucket_update, bucket_delete

Containers

ecs_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

Tool

Parameters

Description

tenant_list

—

List all tenants accessible in the DuploCloud portal

tenant_get

name

Get details of a specific tenant by name

tenant_create

account_name, plan_id

Create a new tenant

tenant_delete

name

Delete a tenant by name

Services

Tool

Parameters

Description

service_list

tenant_id

List all services in a tenant

service_get

tenant_id, name

Get details of a specific service

service_create

tenant_id, name, image, replicas=1

Create a new service

service_update

tenant_id, name, image?, replicas?

Update service image and/or replicas

service_delete

tenant_id, name

Delete a service

service_restart

tenant_id, name

Restart a service (rolling redeployment)

Hosts

Tool

Parameters

Description

host_list

tenant_id

List all hosts (VMs) in a tenant

host_get

tenant_id, name

Get details of a specific host

host_create

tenant_id, friendly_name, capacity, agent_platform=0

Create a new host (0=Linux Docker, 7=EKS Linux)

host_delete

tenant_id, name

Terminate a host

host_reboot

tenant_id, name

Reboot a host

Databases

Tool

Parameters

Description

database_list

tenant_id

List all RDS instances in a tenant

database_get

tenant_id, name

Get details of an RDS instance

database_create

tenant_id, identifier, engine, size, master_username="master", master_password?

Create an RDS instance

database_update

tenant_id, name, size?

Resize an RDS instance

database_delete

tenant_id, name

Delete an RDS instance

Storage

Tool

Parameters

Description

bucket_list

tenant_id

List all S3 buckets in a tenant

bucket_get

tenant_id, name

Get details of an S3 bucket

bucket_create

tenant_id, name

Create a new S3 bucket

bucket_update

tenant_id, name, versioning?

Update bucket configuration (versioning)

bucket_delete

tenant_id, name

Delete an S3 bucket

Containers (ECS)

Tool

Parameters

Description

ecs_service_list

tenant_id

List all ECS services in a tenant

ecs_task_def_list

tenant_id

List all ECS task definition families

ecs_task_list

tenant_id, service_name

List running tasks for a service

ecs_task_run

tenant_id, family_name, replicas=1

Run a task from a task definition family

ecs_service_update

tenant_id, name, image

Update the image of an ECS service

ecs_service_delete

tenant_id, name

Delete 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

Available Tools

31 tools
bucket_createC

Create a new S3 bucket in a DuploCloud tenant.

Args: tenant_id: The tenant ID to create the bucket in. name: Name for the new bucket.

Inputs: tenant_id (required), name (required). Returns: result

bucket_deleteB

Delete an S3 bucket from a DuploCloud tenant.

Args: tenant_id: The tenant ID containing the bucket. name: The bucket name to delete.

Inputs: tenant_id (required), name (required). Returns: result

bucket_getC

Get details of a specific S3 bucket.

Args: tenant_id: The tenant ID containing the bucket. name: The bucket name to look up.

Inputs: tenant_id (required), name (required). Returns: result

bucket_listB

List all S3 buckets in a DuploCloud tenant.

Args: tenant_id: The tenant ID to list buckets for.

Inputs: tenant_id (required). Returns: result

bucket_updateC

Update an S3 bucket configuration.

Args: tenant_id: The tenant ID containing the bucket. name: The bucket name to update. versioning: Enable or disable versioning (optional).

Inputs: tenant_id (required), name (required), versioning. Returns: result

database_createB

Create a new RDS database instance in a DuploCloud tenant.

Args: tenant_id: The tenant ID to create the database in. identifier: The database instance identifier. engine: Database engine (e.g. mysql, postgres, mariadb). size: Instance class (e.g. db.t3.micro). master_username: Master database username. Defaults to 'master'. master_password: Master database password. Required for most engines.

Inputs: tenant_id (required), identifier (required), engine (required), size (required), +2 more. Returns: result

database_deleteC

Delete an RDS database instance from a DuploCloud tenant.

Args: tenant_id: The tenant ID containing the database. name: The database instance identifier to delete.

Inputs: tenant_id (required), name (required). Returns: result

database_getA

Get details of a specific RDS database instance.

Args: tenant_id: The tenant ID containing the database. name: The database instance identifier.

Inputs: tenant_id (required), name (required). Returns: result

database_listA

List all RDS database instances in a DuploCloud tenant.

Args: tenant_id: The tenant ID to list databases for.

Inputs: tenant_id (required). Returns: result

database_updateC

Update an RDS database instance. Currently supports resizing.

Args: tenant_id: The tenant ID containing the database. name: The database instance identifier. size: New instance class (e.g. db.t3.small).

Inputs: tenant_id (required), name (required), size. Returns: result

ecs_service_deleteB

Delete an ECS service from a DuploCloud tenant.

Args: tenant_id: The tenant ID containing the ECS service. name: The ECS service name to delete.

Inputs: tenant_id (required), name (required). Returns: result

ecs_service_listC

List all ECS services in a DuploCloud tenant.

Args: tenant_id: The tenant ID to list ECS services for.

Inputs: tenant_id (required). Returns: result

ecs_service_updateC

Update the image of an ECS service's task definition.

Args: tenant_id: The tenant ID containing the ECS service. name: The task definition family name. image: The new Docker image to deploy.

Inputs: tenant_id (required), name (required), image (required). Returns: result

ecs_task_def_listB

List all ECS task definition families in a DuploCloud tenant.

Args: tenant_id: The tenant ID to list task definitions for.

Inputs: tenant_id (required). Returns: result

ecs_task_listB

List running ECS tasks for a specific service.

Args: tenant_id: The tenant ID containing the ECS service. service_name: The ECS service name to list tasks for.

Inputs: tenant_id (required), service_name (required). Returns: result

ecs_task_runC

Run an ECS task from a task definition family.

Args: tenant_id: The tenant ID to run the task in. family_name: The task definition family name. replicas: Number of task instances to run. Defaults to 1.

Inputs: tenant_id (required), family_name (required), replicas. Returns: result

host_createB

Create a new host (VM) in a DuploCloud tenant.

Args: tenant_id: The tenant ID to create the host in. friendly_name: A friendly name for the host. capacity: The instance type/size (e.g. t3.medium). agent_platform: The agent platform type. 0=Linux Docker, 7=EKS Linux. Defaults to 0.

Inputs: tenant_id (required), friendly_name (required), capacity (required), agent_platform. Returns: result

host_deleteB

Terminate a host in a DuploCloud tenant.

Args: tenant_id: The tenant ID containing the host. name: The host name to delete.

Inputs: tenant_id (required), name (required). Returns: result

host_getB

Get details of a specific host by name.

Args: tenant_id: The tenant ID containing the host. name: The host name to look up.

Inputs: tenant_id (required), name (required). Returns: result

host_listB

List all hosts (virtual machines) in a DuploCloud tenant.

Args: tenant_id: The tenant ID to list hosts for.

Inputs: tenant_id (required). Returns: result

host_rebootC

Reboot a host in a DuploCloud tenant.

Args: tenant_id: The tenant ID containing the host. name: The host name to reboot.

Inputs: tenant_id (required), name (required). Returns: result

service_createB

Create a new service in a DuploCloud tenant.

Args: tenant_id: The tenant ID to create the service in. name: Name for the new service. image: Docker image to deploy (e.g. nginx:latest). replicas: Number of replicas to run. Defaults to 1.

Inputs: tenant_id (required), name (required), image (required), replicas. Returns: result

service_deleteC

Delete a service from a DuploCloud tenant.

Args: tenant_id: The tenant ID containing the service. name: The service name to delete.

Inputs: tenant_id (required), name (required). Returns: result

service_getC

Get details of a specific service by name.

Args: tenant_id: The tenant ID containing the service. name: The service name to look up.

Inputs: tenant_id (required), name (required). Returns: result

service_listB

List all services in a DuploCloud tenant.

Args: tenant_id: The tenant ID to list services for.

Inputs: tenant_id (required). Returns: result

service_restartC

Restart a service, triggering a rolling redeployment.

Args: tenant_id: The tenant ID containing the service. name: The service name to restart.

Inputs: tenant_id (required), name (required). Returns: result

service_updateB

Update an existing service. Provide only the fields to change.

Args: tenant_id: The tenant ID containing the service. name: The service name to update. image: New Docker image (optional). replicas: New replica count (optional).

Inputs: tenant_id (required), name (required), image, replicas. Returns: result

tenant_createC

Create a new DuploCloud tenant.

Args: account_name: Name for the new tenant. plan_id: The infrastructure plan ID to associate with.

Inputs: account_name (required), plan_id (required). Returns: result

tenant_deleteB

Delete a DuploCloud tenant by name.

Args: name: The tenant name to delete.

Inputs: name (required). Returns: result

tenant_getB

Get details of a specific DuploCloud tenant by name.

Args: name: The tenant name to look up.

Inputs: name (required). Returns: result

tenant_listA

List all tenants accessible in the DuploCloud portal.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 31 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific resources (buckets, databases, ECS services, hosts, services, tenants) with well-defined actions (create, delete, get, list, update, restart, reboot, run). There is no ambiguity or overlap between tools, as each combines a resource type with a unique operation.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with snake_case, such as bucket_create, database_list, ecs_service_update, host_reboot, service_restart, and tenant_delete. The naming is uniform across all 31 tools, making them predictable and easy to understand.

    Tool Count3/5

    With 31 tools, the count is borderline high for a single server, potentially feeling heavy. However, given the broad scope covering multiple AWS services (S3, RDS, ECS, EC2) and DuploCloud-specific operations, it is reasonable but could be overwhelming for agents due to the volume.

    Completeness4/5

    The tool set provides comprehensive CRUD/lifecycle coverage for each resource type (buckets, databases, hosts, services, tenants) and includes additional operations like restart, reboot, and run. Minor gaps exist, such as no update for tenants and limited ECS service operations (e.g., missing create), but core workflows are well-covered.

    Related MCP Connectors