xhost-mcp
v1.0.1
Published
XHOST MCP server: deploy to cPanel, manage domains, nameservers and DNS, and read hosting plans and invoices from Cursor, VS Code, Claude, Google Antigravity and other MCP clients. One-click OAuth remote server at https://xhost.pk/api/mcp, or run locally
Maintainers
Readme
XHOST MCP
Deploy to XHOST hosting and manage your domains, nameservers and DNS from AI coding agents: Cursor, Claude Code, Claude Desktop, Google Antigravity, VS Code, Windsurf and any other Model Context Protocol client.
"Build this project and deploy it to my XHOST site." "Point shop.example.pk to my Vercel project." "Switch example.pk to XHOST nameservers." "Add the TXT record Google Search Console asked for."
Fastest: connect in one click (no API key)
XHOST also runs this server for you at https://xhost.pk/api/mcp with OAuth sign-in:
- Open https://xhost.pk/mcp and click Add to Cursor or Add to VS Code (or add the URL below in your client).
- Your browser opens XHOST: sign in and press Approve (choose read / write / deploy).
- You are back in your editor, connected. Disconnect any time in Dashboard → Developers.
| Client | How |
|---|---|
| Cursor | One-click button on xhost.pk/mcp, or {"mcpServers":{"xhost":{"url":"https://xhost.pk/api/mcp"}}} |
| VS Code | One-click button on xhost.pk/mcp, or .vscode/mcp.json: {"servers":{"xhost":{"type":"http","url":"https://xhost.pk/api/mcp"}}} |
| Claude Code | claude mcp add --transport http xhost https://xhost.pk/api/mcp, then /mcp → xhost → Authenticate |
| Claude (claude.ai & Desktop) | Settings → Connectors → Add custom connector → https://xhost.pk/api/mcp |
| Google Antigravity, Windsurf | {"mcpServers":{"xhost":{"serverUrl":"https://xhost.pk/api/mcp"}}} in mcp_config.json |
With the remote server, deploy returns a one-time upload link and the exact command; the agent zips your
build folder and uploads it with curl.
Use this npm package instead when your client has no remote MCP support, or for CI and scripts with an API key:
1. Create an API key
Log in at https://xhost.pk/dashboard/developers → Create API key. Choose permissions:
| Permission | Allows |
|---|---|
| read | Plans, services, usage, deployments, domains, nameservers, DNS, invoices, activity |
| write | Change nameservers and DNS records, point domains to Vercel / Netlify / XHOST |
| deploy | Upload builds to your cPanel hosting |
The key (xhost_…) is shown once. Keys never allow payments or purchases.
2. Add XHOST to your AI tool
The server runs with Node.js 18.17 or newer:
npx -y xhost-mcpCursor
~/.cursor/mcp.json (or .cursor/mcp.json in a project):
{
"mcpServers": {
"xhost": {
"command": "npx",
"args": ["-y", "xhost-mcp"],
"env": { "XHOST_API_KEY": "xhost_your_key" }
}
}
}Claude Code
claude mcp add xhost --env XHOST_API_KEY=xhost_your_key -- npx -y xhost-mcpClaude Desktop
Settings → Developer → Edit Config (claude_desktop_config.json), same block as Cursor under "mcpServers".
Google Antigravity
Agent panel → … → MCP Servers → Manage → View raw config (mcp_config.json), same block as Cursor under "mcpServers".
VS Code
.vscode/mcp.json:
{
"servers": {
"xhost": {
"type": "stdio",
"command": "npx",
"args": ["-y", "xhost-mcp"],
"env": { "XHOST_API_KEY": "xhost_your_key" }
}
}
}Tools
| Tool | What it does |
|---|---|
| xhost_whoami | Account, key permissions, counts |
| list_hosting_plans | Plans and PKR prices |
| list_services / get_service | Hosting accounts, usage, server nameservers and IP |
| deploy | Zip a local build folder and deploy it to public_html (or a folder inside it) |
| list_deployments | Deployment history |
| list_domains / get_domain | Domains, expiry, status |
| get_nameservers / set_nameservers | Read or change nameservers (custom, XHOST default or registrar DNS) |
| list_dns_records / add_dns_record / delete_dns_record / set_dns_records | DNS management |
| connect_domain | Point a domain to Vercel, Netlify or XHOST hosting in one call (keeps email records) |
| list_invoices | Invoices (read only) |
| recent_activity | Changes made with API keys |
Prompts: migrate_from_vercel, deploy_this_project.
Deploy notes
- Deploy the build output (
dist/,out/,build/), not the project root.node_modules,.gitand.envfiles are never uploaded. - Files with the same name are overwritten; other files on the server are kept.
- Limits per deployment: 50 MB packed, 20,000 files.
- For single-page apps pass
spa_fallback: trueto add an.htaccessroute fallback. - Next.js: set
output: 'export'. Apps that need a Node.js server run on an XHOST VPS.
Environment
| Variable | Default |
|---|---|
| XHOST_API_KEY | required |
| XHOST_API_URL | https://xhost.pk/api/mcp/v1 |
Support: [email protected] · WhatsApp +92 313 4595313 · https://xhost.pk/mcp
