Deploy/deploy_site_from_url
Tool · Deploy

deploy_site_from_url

Deploy a Git repository to one domain on one of the caller's hosting services. Source repositories are restricted to a server-side host allowlist. NO build step runs (no npm/composer install, no compilation) — the repository must contain ready-to-serve files. Deploys are contained: the module refuses to overwrite a target that is not a clean scaffold (status=target_not_empty), so an established site is never clobbered. Rollback is by ref — re-deploy a previous ref from get_deploy_status history to restore an earlier state. status=ok means the deploy landed (commit_sha/file_count describe it); status=quota_exceeded means the account disk quota would be exceeded and nothing was deployed; status=target_not_empty is the containment refusal; status=unavailable_on_server means the deploy module is not rolled out on that hosting server yet. This is a state-changing, destructive, non-idempotent write — it requires the write:deploy scope.

DestructiveOpen‑worldscope write:deploy

Invoked over the MCP transport with a tools/call request naming this tool.

Authorization #

Requires a valid OAuth 2.1 bearer access_token whose grant includes the write:deploy scope — Deploy websites from a git repository — a public URL or a private SSH repo — to your hosting (overwrites the target site). The broker resolves the caller from the token and returns only records the account owns.

Parameters #

service_idintegerRequired
The hosting service ID to deploy to. Obtain it via list_services.
target_domainstringRequired
The hosted domain to deploy to. Must belong to the hosting service (discover it via list_website_domains).
repo_urlstringRequired
The Git repository URL to deploy. Only repositories on the server-side host allowlist are accepted; no build step runs, so the repository must contain ready-to-serve files.
refstringOptional
Optional branch, tag, or commit to deploy. Omit for the repository default branch. To roll back, pass a ref from get_deploy_status history.
subdirstringOptional
Optional document-root-relative subdirectory to deploy into. Omit to deploy into the target document root itself.

Response #

200 · application/json

deployobject
service_idinteger
target_domainstring
statusstring
One of: ok quota_exceeded target_not_empty unavailable_on_server
repo_urlstring
refstring
commit_shastring
targetstring
file_countinteger
module_versionstring

Errors #

ResultWhen
{ "error": "invalid_target_domain" }See the tool description for when this result is returned.
{ "error": "invalid_repo_url" }See the tool description for when this result is returned.
{ "error": "not_found" }The requested item does not exist, or it belongs to another account. Cross-account IDs are indistinguishable from missing ones by design.