management MCP/CLI cannot migrate workspace compute provider (canvas can) #64

Closed
opened 2026-06-15 02:08:08 +00:00 by devops-engineer · 0 comments
Member

Gap

The canvas can migrate a workspace's compute provider across clouds (AWS ↔ Hetzner ↔ GCP), but the management MCP server and CLI cannot. This is a real capability gap: an operator driving the platform through the MCP/CLI has no way to trigger or observe a cross-cloud provider migration.

update_workspace exposes the workspace tier but has no provider field, so there is no existing path to change a workspace's compute provider through these tools.

Control-plane contract to wrap (CP-admin auth)

Start a migrationPOST /cp/admin/workspaces/:id/migrate-provider

{ "from": "aws", "to": "hetzner", "confirm": true }

202 { "status": "migration_started", "workspace_id": "…", "from": "aws", "to": "hetzner" }

  • to is required; one of aws|hetzner|gcp.
  • from is required by CP; one of aws|hetzner|gcp (must differ from to).
  • confirm:true is mandatory — a real migration mutates two clouds; without it CP returns 400.
  • from_instance_id is required by CP for non-AWS (Hetzner/GCP) sources; optional for AWS (CP resolves the real instance from EC2 tags).
  • Runs asynchronously (~15-20 min).

Read statusGET /cp/admin/workspaces/:id/migrate-provider (alias …/migration-status)

200 { "migration": { "state", "from_provider", "to_provider", "detail", … }, "terminal": <bool> }

States: snapshotting → provisioning_target → target_healthy → retiring_source → completed (terminal also includes failed, rolled_back). 404 when the workspace has never been migrated.

Proposed fix

  • MCP server: add migrate_workspace_provider (inputs: workspace_id, to [required], from?, confirm?, from_instance_id?) and get_workspace_migration_status tools, wired through the existing CP-admin HTTP-client + tool-registration pattern.
  • CLI: add molecule workspace migrate-provider --to <p> [--from <p>] <workspace_id> and a migration-status subcommand via the existing cpAdminClient() helper.

Follow-up PRs will close this issue.

## Gap The canvas can migrate a workspace's compute provider across clouds (AWS ↔ Hetzner ↔ GCP), but the management MCP server and CLI cannot. This is a real capability gap: an operator driving the platform through the MCP/CLI has no way to trigger or observe a cross-cloud provider migration. `update_workspace` exposes the workspace **tier** but has **no provider field**, so there is no existing path to change a workspace's compute provider through these tools. ## Control-plane contract to wrap (CP-admin auth) **Start a migration** — `POST /cp/admin/workspaces/:id/migrate-provider` ```json { "from": "aws", "to": "hetzner", "confirm": true } ``` → `202 { "status": "migration_started", "workspace_id": "…", "from": "aws", "to": "hetzner" }` - `to` is required; one of `aws|hetzner|gcp`. - `from` is required by CP; one of `aws|hetzner|gcp` (must differ from `to`). - `confirm:true` is mandatory — a real migration mutates two clouds; without it CP returns 400. - `from_instance_id` is required by CP for non-AWS (Hetzner/GCP) sources; optional for AWS (CP resolves the real instance from EC2 tags). - Runs asynchronously (~15-20 min). **Read status** — `GET /cp/admin/workspaces/:id/migrate-provider` (alias `…/migration-status`) → `200 { "migration": { "state", "from_provider", "to_provider", "detail", … }, "terminal": <bool> }` States: `snapshotting → provisioning_target → target_healthy → retiring_source → completed` (terminal also includes `failed`, `rolled_back`). `404` when the workspace has never been migrated. ## Proposed fix - **MCP server**: add `migrate_workspace_provider` (inputs: `workspace_id`, `to` [required], `from?`, `confirm?`, `from_instance_id?`) and `get_workspace_migration_status` tools, wired through the existing CP-admin HTTP-client + tool-registration pattern. - **CLI**: add `molecule workspace migrate-provider --to <p> [--from <p>] <workspace_id>` and a `migration-status` subcommand via the existing `cpAdminClient()` helper. Follow-up PRs will close this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-mcp-server#64