The Model Context Protocol (MCP) server for Hostinger API allows AI models to interact with Hostinger's services through a standardized interface. It enables automation of various hosting management tasks including domain registration, DNS management, VPS control, and billing operations.
If you don't have Node.js installed, you can download it from the official website.
We recommend using NVM (Node Version Manager) to install and manage Node.js versions:
nvm install v24
nvm use v24
To install the MCP server, run 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
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
The following environment variables can be configured:
DEBUG: Enable debug logging (true/false) (default: false)API_TOKEN: Your API token, which will be sent in the Authorization header.{
"mcpServers": {
"hostinger-api": {
"command": "hostinger-api-mcp",
"env": {
"DEBUG": "false",
"API_TOKEN": "YOUR API TOKEN"
}
}
}
}
The MCP server supports two transport modes:
The server can use standard input/output (stdio) transport (default). This provides local streaming.
The server can use HTTP streaming transport for bidirectional streaming over HTTP:
# Default HTTP transport on localhost:8100
hostinger-api-mcp --http
# Specify custom host and port
hostinger-api-mcp --http --host 0.0.0.0 --port 8150
Options:
--http Use HTTP streaming transport
--stdio Use Server-Sent Events transport (default)
--host {host} Hostname or IP address to listen on (default: 127.0.0.1)
--port {port} Port to bind to (default: 8100)
--help Show help message
This server implements the Model Context Protocol (MCP) and can be used with any MCP-compatible consumer.
Example of connecting using HTTP streaming transport:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
// Create HTTP transport
const transport = new StreamableHTTPClientTransport({
url: "http://localhost:8100/",
headers: {
"Authorization": `Bearer ${process.env.API_TOKEN}`
}
});
// Connect to the MCP server
const client = new Client({
name: "my-client",
version: "1.0.0"
}, {
capabilities: {}
});
await client.connect(transport);
// List available tools
const { tools } = await client.listTools();
console.log("Available tools:", tools);
// Call a tool
const result = await client.callTool({
name: "billing_getCatalogItemListV1",
arguments: { category: "DOMAIN" }
});
console.log("Tool result:", result);
The MCP server provides numerous tools for managing Hostinger services, including:
Each tool exposes specific functionality with appropriate parameters. Refer to the appropriate tool documentation for detailed parameter information.
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.
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.
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"
}
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. 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