Hostinger API MCP server

Integrates with Hostinger's hosting platform to enable domain registration and DNS management, VPS creation and configuration, firewall setup, backup operations, and billing subscription handling through over 100 specialized tools organized by service category.
Back to servers
Setup instructions
Provider
Hostinger
Release date
Apr 11, 2025
Stats
20 stars

The Hostinger API MCP server allows you to interact with Hostinger's services programmatically through the Model Context Protocol (MCP). This server provides access to various Hostinger APIs including domains, VPS, DNS, and billing functionalities.

Prerequisites

  • Node.js version 20 or higher

If you don't have Node.js installed, you can download it from the official website. Alternatively, you can use NVM to manage Node.js versions:

nvm install v20
nvm use v20

Installation

Install the MCP server using one of the following commands:

# Install globally from npm
npm install -g hostinger-api-mcp

# Or with yarn
yarn global add hostinger-api-mcp

# Or with pnpm
pnpm add -g hostinger-api-mcp

Update

To update to the latest version:

# Update globally from npm
npm update -g hostinger-api-mcp

# Or with yarn
yarn global upgrade hostinger-api-mcp

# Or with pnpm
pnpm update -g hostinger-api-mcp

Configuration

The following environment variables can be configured:

  • DEBUG: Enable debug logging (true/false) (default: false)
  • APITOKEN: Your API token, which will be sent in the Authorization header

Usage

JSON Configuration for Claude, Cursor, etc.

You can configure the MCP server in your application using this JSON configuration:

{
    "mcpServers": {
        "hostinger-api": {
            "command": "hostinger-api-mcp",
            "env": {
                "DEBUG": "false",
                "APITOKEN": "YOUR API TOKEN"
            }
        }
    }
}

Using SSE Transport

To use the MCP server with Server-Sent Events:

hostinger-api-mcp --sse --host 127.0.0.1 --port 8100

Using as an MCP Tool Provider

This server implements the Model Context Protocol and can be used with any MCP-compatible consumer:

import { MCP } from "claude-js";
import { createStdio } from "claude-js/mcp";

// Create stdin/stdout transport
const transport = createStdio({ command: "hostinger-api-mcp" });

// Connect to the MCP server
const mcp = new MCP({ transport });
await mcp.connect();

// List available tools
const { tools } = await mcp.listTools();
console.log("Available tools:", tools);

// Call a tool
const result = await mcp.callTool({
    id: "TOOL-ID",
    arguments: { param1: "value1" }
});
console.log("Tool result:", result);

Available Tools

The MCP server provides many tools for interacting with different Hostinger services. Here are some examples:

Domains Management

  • Check domain availability
  • Purchase new domains
  • Manage domain forwarding
  • Enable/disable domain lock
  • Manage privacy protection
  • Update nameservers
  • Manage WHOIS profiles

VPS Management

  • Purchase and setup new virtual machines
  • Start, stop, restart virtual machines
  • Create and restore snapshots and backups
  • Manage firewalls and rules
  • Install/uninstall Monarx malware scanner
  • Set root and panel passwords
  • Monitor metrics

DNS Management

  • Get and update DNS records
  • Manage DNS snapshots
  • Reset zone records
  • Validate zone records

Billing Operations

  • Get catalog items
  • Create service orders
  • Manage payment methods
  • Handle subscriptions

Each tool corresponds to a specific API endpoint and accepts various parameters to perform operations on your Hostinger account.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "hostinger-api" '{"command":"hostinger-api-mcp","env":{"DEBUG":"false","APITOKEN":"YOUR API TOKEN"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "hostinger-api": {
            "command": "hostinger-api-mcp",
            "env": {
                "DEBUG": "false",
                "APITOKEN": "YOUR API TOKEN"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "hostinger-api": {
            "command": "hostinger-api-mcp",
            "env": {
                "DEBUG": "false",
                "APITOKEN": "YOUR API TOKEN"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later