Deploy an app to Hostinger
August 6, 2026 · View on GitHub
When to use
- User says "deploy this to Hostinger", "ship this app", or "put this live on
". - User wants to redeploy a project that already lives on Hostinger.
Inputs to gather first
- Target domain. Call
hosting_listWebsitesV1if it's ambiguous — filter with thedomainparameter, or page through withpage/per_page. - Whether the project needs a build. A
package.jsonwith abuildscript means yes; a folder of finished HTML/CSS/JS means no. - Project root, if it isn't the repo root (monorepos).
- Any build overrides the user already knows they need — Node version, package manager, entry file, output directory.
See rules/nodejs-deployments.mdc for the full list of accepted override values. Do not invent app_type values.
Steps
- Confirm the target domain and that deploying will overwrite what is currently live. Wait for explicit approval.
- Build the archive: source only, excluding
node_modules/, build output,.git/, and.env. Keep it under 50 MB. - Deploy:
- Default —
hosting_deployJsApplicationwithdomainandarchivePath. Hostinger auto-detects build settings and resolves the username. - Needs overrides —
hosting_createNodeJSBuildFromArchiveV1. This one also needsusername, fromhosting_listWebsitesV1. - No build step —
hosting_deployStaticWebsite, with the archive named<directoryname>_YYYYMMDD_HHMMSS.zip.
- Default —
- Track the build:
hosting_listJsDeployments(orhosting_listNodeJSBuildsV1) for state and the builduuid. - Stream logs while the state is
running—hosting_showJsDeploymentLogsorhosting_getNodeJSBuildLogsV1, passing the last line count back asfromLine/from_line. - On success, report the live URL and the build duration. On failure, hand off to
diagnose-build-failure.
Optional follow-ups
hosting_clearWebsiteCacheV1if the user is seeing stale content.hosting_restartNode_jsApplicationV1if the process needs a bounce after a config change.hosting_listNode_jsVulnerabilitiesV1to audit dependencies post-deploy.DNS_getDNSRecordsV1to confirm the domain actually points at Hostinger before promising the user a working URL.
Failure handling
- Surface Hostinger API errors verbatim — do not fabricate causes.
- If authentication fails, the MCP server opens a browser sign-in on the next tool call. Only if the user needs a non-interactive setup should they generate an API token in hPanel (Profile & settings → API Tokens) and export
HOSTINGER_API_TOKENbefore launching Cursor.
Do not
- Do not include
.env, credentials, or tokens in the archive. - Do not deploy to a production domain without explicit confirmation.
- Do not promise to set application environment variables — the API cannot. Direct the user to hPanel.