Deploy/deploy_private_repo
Tool · Deploy

deploy_private_repo

Deploy a private SSH Git repository to one domain on a caller's hosting service using a pre-installed per-repo deploy key. The repo MUST contain a .cpanel.yml at its root; without one, returns no_cpanel_yml. Call generate_deploy_key first (service_id — obtain via list_services) to provision the key, then add the returned public key to the repository's deploy keys on GitHub/GitLab/Bitbucket. Omitted branch deploys the repository default branch (HEAD). This destructive, non-idempotent write requires the write:deploy scope and is distinct from get_deploy_status (the URL-deploy lineage).

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.
repo_ssh_urlstringRequired
SSH clone URL of the private repository (e.g. git@github.com:org/repo.git). A deploy key for this URL must have been generated via generate_deploy_key for this service first.
target_domainstringRequired
The hosted domain to deploy to. Must belong to the hosting service (discover it via list_website_domains).
branchstringOptional
Optional branch, tag, or commit to deploy. Omit for the repository default branch (resolves to HEAD).

Response #

200 · application/json

deployobject
statusstring
commit_shastring
refstring
service_idinteger
target_domainstring
repository_rootstring
deployment_idstring
module_versionstring
statusstring
repository_rootstring
messagestring

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.