ElmsPark Guides
PageMotor · Hosting · AI Tools

PageMotor on Hostinger with Claude Code

Hostinger has a native MCP server for Claude Code. Give it access to your account once, then tell it what you want. It provisions the VPS, sets the DNS record, and deploys PageMotor — without you leaving your editor.

🤖 Runs in Claude Code 🔗 Official Hostinger MCP One-time setup, then just ask
What this is: the Hostinger API is behind an official MCP (Model Context Protocol) server that Claude Code can talk to directly. You connect it once by pasting a JSON block into your CC config. After that, Claude Code can call the Hostinger API, read your server list, create VPSs, manage DNS records — without a browser, without copy-pasting credentials. The picture-by-picture manual guide shows every click if you prefer to do it yourself. This guide hands the whole thing to Claude Code.
First time on a VPS? Start here.

A VPS is a real computer that you control, and a few steps below ask you to run a command "on the server". Here is what that means, because it trips up nearly everyone the first time.

Three things, three different jobs:

So when you see a line like chown -R ..., it runs in a terminal on the VPS. Not in Claude, not in CloudPanel.

Two ways to open a terminal on your VPS:

  1. Browser terminal (easiest). In hPanel, open your VPS and click the Terminal button in the overview. A terminal opens in your browser, already logged in to your server. Paste your command and press Enter. Hostinger has a step-by-step with screenshots: How to use the Hostinger VPS Browser terminal.
  2. SSH from your own computer. Open Terminal on a Mac, or PowerShell on Windows, and type ssh root@YOUR-VPS-IP. Your IP is on the Hostinger VPS page. Enter the root password when prompted. Note: as you type the password nothing appears on screen, no dots or stars. That is normal, just type it and press Enter.

The details you swap into commands:

When you are finished, type exit to leave. That is the whole mystery solved. The rest of this guide is the easy part.

1Go to the Hostinger API page

Log into hPanel and click API in the left sidebar (under Dev tools). You land on the page Hostinger have built specifically for AI coding tools.

Hostinger hPanel showing the 'Connect your IDEs to Hostinger MCP' page with VS Code, Cursor, and Claude Code tabs
The MCP connection page in hPanel. There are tabs for each AI coding tool at the top.

2Choose Claude Code and the tools you need

Click the Claude Code tab. Then tick the tool categories you want to use. For provisioning a PageMotor VPS you need at minimum:

The others (Websites, Billing, Email Marketing) are useful but optional for this task. You can untick them for a leaner MCP config.

Tip: if you use Hostinger for domains too, tick Domains as well. Claude Code will then be able to register new domains and point them at your VPS in one conversation.

3Generate your API token

Scroll down on the same page and click Generate API token. It creates a token instantly. Give it a name you will recognise, for example hostinger-cc-api.

The 'Generate an API token' button on the Hostinger MCP page
One button, one token. Give it a name that tells you what it is for.

4Copy the token before the page refreshes

The token appears once. Hostinger will not show it again if you refresh or leave the page. Copy it now.

The generated API token displayed with a copy button. The token is shown once only.
Copy the token immediately. The page is showing it for the last time. If you miss it, just regenerate a new one.
Missed it? If you accidentally refreshed, delete the old token and click Generate again. Tokens are cheap, security is not.

5Copy the MCP JSON config

Scroll back up. The page shows a ready-made JSON block you copy straight into your Claude Code config. It looks like this:

The MCP JSON config block shown by Hostinger, with a red callout pointing at the your-token-here placeholder and the instruction to replace every one with your real API token
The exact JSON config Hostinger generates for you. Copy the whole block or click the Copy button on the page.

Replace every your-token-here with the token you just copied. The full block, with your token in place, is what goes into Claude Code next.

"mcpServers": {
  "hostinger-hosting": {
    "command": "npx",
    "args": ["--package=hostinger-api-mcp@latest", "hostinger-hosting-mcp"],
    "env": { "HOSTINGER_API_TOKEN": "YOUR-TOKEN-HERE" }
  },
  "hostinger-domains": {
    "command": "npx",
    "args": ["--package=hostinger-api-mcp@latest", "hostinger-domains-mcp"],
    "env": { "HOSTINGER_API_TOKEN": "YOUR-TOKEN-HERE" }
  },
  "hostinger-dns": {
    "command": "npx",
    "args": ["--package=hostinger-api-mcp@latest", "hostinger-dns-mcp"],
    "env": { "HOSTINGER_API_TOKEN": "YOUR-TOKEN-HERE" }
  },
  "hostinger-vps": {
    "command": "npx",
    "args": ["--package=hostinger-api-mcp@latest", "hostinger-vps-mcp"],
    "env": { "HOSTINGER_API_TOKEN": "YOUR-TOKEN-HERE" }
  }
}

6Add it to Claude Code

Open your Claude Code config file at ~/.claude/config.json (create it if it does not exist). Paste the mcpServers block inside the top-level JSON object.

{
  "mcpServers": {
    /* paste the hostinger-hosting, hostinger-domains,  */
    /* hostinger-dns, and hostinger-vps blocks here     */
  }
}

If you already have other MCP servers in the file, just add the Hostinger entries inside the existing mcpServers object — do not create a second one.

After saving, restart Claude Code so it picks up the new servers. You can confirm they loaded by typing /mcp in a CC session — the Hostinger servers should appear in the list.

Shortcut: if you prefer, open a CC session and type /mcp add hostinger-vps npx --package=hostinger-api-mcp@latest hostinger-vps-mcp (repeat for each server). CC adds it to the config for you.

7Ask Claude Code to provision the VPS

Open Claude Code and give it a clear brief. This is the whole prompt — the MCP handles the API calls behind it:

Paste this into Claude Code (edit the domain and details)
Using the Hostinger MCP, provision a new VPS for me: - Plan: KVM 2 - Template: CloudPanel on Ubuntu 24.04 - Region: Manchester, UK (data_center_id 18) - Hostname: pagemotor-mysite - Inject my SSH key from ~/.ssh/id_ed25519.pub Once the VPS is running: 1. Read the IP address from the Hostinger API 2. Create a DNS A record pointing mysite.com at that IP (if my domain is at Hostinger, use the Hostinger DNS MCP; if it is at Cloudflare, I will add it manually) Then tell me the IP and confirm when DNS is set.
Which region should I pick? (datacenter IDs)

Specify by name or ID — the MCP understands both. IDs confirmed from the live API:

ID Location Good for
18Manchester, UKIreland, UK, Northern Europe
15Paris, FranceWestern Europe
19Frankfurt, GermanyCentral Europe
11Vilnius, LithuaniaEastern Europe / Baltic
24Boston 2, USAUS East Coast
What does Claude Code actually send to the Hostinger API?

For the technically curious. The MCP translates your plain-English request into a call like this:

POST /api/vps/v1/virtual-machines
{
  "item_id": "hostingercom-vps-kvm2-usd-1m",   // KVM 2, billed monthly
  "setup": {
    "template_id": 1096,               // Ubuntu 24.04 with CloudPanel
    "data_center_id": 18,             // Manchester, UK
    "hostname": "pagemotor-mysite",
    "public_key": "ssh-ed25519 ..."   // from ~/.ssh/id_ed25519.pub
  }
}

The item_id is the billing price ID, not just the plan name. Monthly and annual differ by suffix:

Plan RAM Monthly price ID Intro price
KVM 14 GBhostingercom-vps-kvm1-usd-1m$9.99/mo
KVM 28 GBhostingercom-vps-kvm2-usd-1m$13.99/mo
KVM 416 GBhostingercom-vps-kvm4-usd-1m$25.99/mo
KVM 832 GBhostingercom-vps-kvm8-usd-1m$50.99/mo

Swap -1m for -1y or -2y for annual billing, which is cheaper per month.

Bonus template: Hostinger also has template 1189 — "Ubuntu 24.04 with Claude Code" — which pre-installs the CC CLI on your server. If you want to use Claude Code directly on the VPS itself, swap template_id: 1096 for 1189 and tell CC that in your prompt.

Claude Code will use the hostinger-vps MCP to create the server and hostinger-dns to set the DNS record. Provisioning takes three to six minutes. CC polls the API and tells you when the VPS is running.

A word on billing: the VPS creation call charges your Hostinger account. Make sure you have a payment method on file. KVM 2 (8 GB, the recommended starting point for PageMotor) is $13.99/month at introductory pricing. Annual billing reduces that significantly.

8Let Claude Code finish the on-box setup

Once you have the IP and DNS is set, give CC the second brief. It will SSH in and use CloudPanel’s CLI to create the site, database, and SSL certificate, then deploy PageMotor.

Second prompt — run after step 7 is confirmed
Good. Now SSH into [IP] as root using ~/.ssh/id_ed25519 and: 1. Create a PHP 8.3 site in CloudPanel for mysite.com (site user: mysite, generate a password) 2. Add a database: mysite-db / user mysite-user / strong random password 3. Upload ~/Downloads/pagemotor-0.9.4b.zip to /tmp/pagemotor.zip on the server, then extract it into /home/mysite/htdocs/mysite.com/ 4. Write config.php with the database credentials (DB_HOST is 127.0.0.1, prefix pm_, error logs on) 5. Fix file ownership: chown -R mysite:www-data 6. Once DNS resolves, run: clpctl lets-encrypt:install:certificate --domainName=mysite.com 7. Confirm the site is live at https://mysite.com/ Use provision-pagemotor.sh if you need a reference for the exact commands.

Download the ready-made on-box script and drop it in your project folder so Claude Code can reference it:

⇓ Download provision-pagemotor.sh

You do not need to run the script yourself. Give Claude Code the file and the prompt above — it reads the script, adapts the commands to your site, and runs them over SSH.

CloudPanel clpctl gotchas baked into the script:
  • Database names and users use hyphens, not underscores (CloudPanel rejects underscores).
  • PHP version must be set to 8.3 — do not let it default to 8.5.
  • PageMotor files go directly into the site root, not a subfolder, so no web root change is needed.
  • SSL cert is requested after DNS resolves, not before — the script handles the wait loop.

9Verify with EP Host Check

Visit https://mysite.com/admin/ and register your PageMotor admin account. Then install the EP Host Check plugin (available on the EP Suite updates channel) and run it.

You are looking for all 12 checks green, especially PHP can save PageMotor’s files. That one goes red on a locked-down shared host — it should be green here because you are on a proper VPS with correct file ownership.

You are done when: the EP Host Check plugin reports green on a Hostinger VPS, which means PageMotor can write its compiled CSS to disk. That is the thing that breaks on cheap shared hosting, and the whole reason this setup exists.
Related guides: Picture-by-picture manual guide (34 screenshots, for people who prefer to click) · CloudPanel concept guide (why the panel approach fixes the hosting problem) · Same setup with Cursor