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.
▶ The whole route in 4 minutes 23 seconds, narrated, with captions — including the template whose name makes it look right and which quietly breaks everything afterwards.
The shape of it. Hostinger has a native MCP server. Give it access once, then tell it what you want: it provisions the VPS, sets the DNS record and deploys PageMotor, without you leaving your editor.
First time on a VPS? Three things do three different jobs. Claude Desktop, the chat app, cannot reach your server at all. CloudPanel is your control panel — a web page for sites, databases and SSL, point and click, not where you type commands. And a terminal is a text window connected to the server itself, which is where any command actually runs. Claude Code can reach the server once connected.
hPanel › API. In the left sidebar under Dev tools — a page Hostinger built for AI coding tools. Click the Claude Code tab and tick the categories you need: VPS hosting creates and manages servers, Domains and DNS sets the A record. The rest are optional, and fewer tools means a leaner config.
The token appears once. Generate it, name it something recognisable, and copy it before the page refreshes — Hostinger will not show it again. Missed it? Delete the old one and generate another. Tokens are cheap; security is not.
Paste the config. The page shows a ready-made JSON block for the tools you picked. Replace every placeholder with your token, then put the mcpServers block into ~/.claude/config.json, creating the file if it does not exist.
Then you just ask. One brief covers the whole job: the plan, the CloudPanel template, the region, a hostname and your SSH public key. Then read the IP back from the API and create the DNS A record pointing your domain at it. Regions work by name or by ID.
The trap on this page. Hostinger ships a separate image named for Claude Code, and it sounds like exactly what you want. It has no control panel on it, so site creation, the database and the certificate all break afterwards. Take the CloudPanel template and add the CLI later if you want it. And do not trust the ID number — template IDs change, so have it list the templates and pick by name first.
What it actually sends. Your brief becomes one API call carrying a template id, a data centre id, the hostname and your public key. The item_id in it is a billing price ID rather than just the plan name, and its suffix picks the billing period — monthly, annual or two-year, the longer ones cheaper per month.
Let it finish on the box. Provisioning gets you a running server; the on-box setup — site, database, certificate and PageMotor itself — is the second half, and the guide has the script.
Then prove it. Install EP Host Check and read its report. It inspects the finished box and tells you what it can and cannot do, each with a plain fix, rather than you assuming the provisioning worked.
Use this guide with any AI assistant
Download it as a prompt file, paste it into Claude, ChatGPT, Gemini or any LLM, and it will walk you through every step interactively.
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:
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:
/home/SITEUSER/htdocs/yourdomain.com.When you are finished, type exit to leave. That is the whole mystery solved. The rest of this guide is the easy part.
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.
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.
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 token appears once. Hostinger will not show it again if you refresh or leave the page. Copy it now.
Scroll back up. The page shows a ready-made JSON block you copy straight into your Claude Code config. It looks like this:
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" }
}
}
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.
/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.Open Claude Code and give it a clear brief. This is the whole prompt — the MCP handles the API calls behind it:
Specify by name or ID — the MCP understands both. IDs confirmed from the live API:
| ID | Location | Good for |
|---|---|---|
18 | Manchester, UK | Ireland, UK, Northern Europe |
15 | Paris, France | Western Europe |
19 | Frankfurt, Germany | Central Europe |
11 | Vilnius, Lithuania | Eastern Europe / Baltic |
24 | Boston 2, USA | US East Coast |
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 1 | 4 GB | hostingercom-vps-kvm1-usd-1m | $9.99/mo |
| KVM 2 | 8 GB | hostingercom-vps-kvm2-usd-1m | $13.99/mo |
| KVM 4 | 16 GB | hostingercom-vps-kvm4-usd-1m | $25.99/mo |
| KVM 8 | 32 GB | hostingercom-vps-kvm8-usd-1m | $50.99/mo |
Swap -1m for -1y or -2y for annual billing, which is cheaper per month.
1189, "Ubuntu 24.04 with Claude Code", as a separate image with no control panel on it. Every clpctl step below needs CloudPanel, so 1189 would break site creation, the database and the certificate. If you want Claude Code on the server itself, take 1096 and install the CLI afterwards. And do not trust the number: template IDs change, so ask Claude Code to list the available templates through the Hostinger MCP and pick "Ubuntu 24.04 with CloudPanel" by name before it creates anything.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.
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.
Download the ready-made on-box script and drop it in your project folder so Claude Code can reference it:
⇓ Download provision-pagemotor.shYou 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.
/.well-known/ from disk, which swallows PageMotor's OAuth discovery routes and breaks MCP sign-in. The script rewrites the site's own vhost after the certificate step (installing a certificate re-renders it), keeping acme-challenge served from disk so renewal still works. Already built a site without this? Run bash provision-pagemotor.sh --fix-wellknown mysite.com. Background: troubleshooting section 6d..htaccess directory protection, so the deny rules in the prompt's step 8 are load-bearing, not optional. PageMotor probes for them itself and raises an admin warning if they are missing. Details, and why this bites hardest on migrations: Migrating an existing site onto this VPS? below.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 17 checks green (v1.2.0 added a five-check MCP / Claude connection group, which is exactly what this guide cares about), 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.
A fresh install can skip this section. If you are moving an existing PageMotor site here from another host, two things break silently on the way in. Both come from a real migration reported on the PageMotor developers forum, so this is field experience, not theory.
1. Apache protection does not follow you to nginx. PageMotor guards its sensitive directories (error logs, Skill state, and protected uploads including Brain files) with per-directory .htaccess files, which is automatic on Apache and LiteSpeed. CloudPanel serves your site with nginx, and nginx ignores .htaccess entirely. So the moment nginx starts serving a migrated site those directories are publicly readable over the web, and nothing looks broken. Current PageMotor releases probe for this themselves and raise an admin warning with the exact paths for your install. The fix is three rules. In CloudPanel open Sites → your site → Vhost, add these inside the server { } block, and save:
location ^~ /user-content/logs/ { deny all; }
location ^~ /user-content/skills/ { deny all; }
location ^~ /user-content/uploads/protected/ { deny all; }
Always edit the vhost through the CloudPanel page, not the file on disk: the panel regenerates that file, and panel edits are what survive. To confirm the rules are live, request https://yourdomain.com/user-content/logs/ in a browser. You want a 403, not a log file.
2. Zip extraction can strip the write bits. If you carry the site over as a zip and extract it on the server, directories can come out as 555 (read and execute, no write) depending on what built the zip. Ownership then looks perfect, every file belongs to the site user, but PHP cannot write anywhere, and the first symptom is usually a plugin install failing with “staging directory could not be created”. The scripted provision on this page sets the permission bits explicitly, so a from-scratch build never hits this; a hand-carried zip is the case it cannot see. The fix is one pass in a server terminal:
cd /home/SITEUSER/htdocs/yourdomain.com
chown -R SITEUSER:www-data .
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
This guide assumes Claude Code or Cursor, but the same job has been done end to end from plain browser chat at claude.ai, reported working on the forum. The recipe: connect your PageMotor site’s own MCP connector to the chat (the manual guide shows how), and when a step needs a real shell, open the browser terminal from your hPanel VPS overview, which is a root shell with no SSH keys to set up. You type the commands the AI gives you and paste the output back for it to read. Slower than the MCP setup on this page, where the two tools talk directly, but it reaches the same finish line: run EP Host Check at the end and look for green.
You do. Hostinger sell a self-managed VPS, and say so plainly on their own VPS page: “As our VPS solutions are self-managed, you will get full freedom to configure and manage the virtual server.”
Hostinger looks after the hardware, the network, DDoS filtering at the edge, and whatever backups your plan includes. Everything from Ubuntu upwards is yours: security patches, your control panel, PHP, the database, your TLS certificate, and PageMotor itself.
That is not a catch. It is the same freedom that makes a VPS fix the problems shared hosting gives PageMotor. But nobody emails you when a patch is published, and a server left alone for a year is running a year of known, catalogued, publicly indexed vulnerabilities. Budget about fifteen minutes a month.