{"id":14621,"library":"hostinger-api-mcp","title":"Hostinger API MCP Server","description":"hostinger-api-mcp is an executable server designed to implement the Model Context Protocol (MCP), enabling AI agents and automated systems to interact with Hostinger API functionalities as discoverable tools. It provides a standardized interface for tool discovery and execution, facilitating integrations with AI platforms such as Claude or Cursor. The package is currently in early development at version `0.1.39`, indicating frequent, minor updates primarily for dependency maintenance rather than major feature releases. Its core differentiators include its specific focus on exposing Hostinger services through the MCP standard and its versatile support for both standard I/O and HTTP streaming transports, offering flexible deployment options for AI-driven workflows.","status":"active","version":"0.1.37","language":"javascript","source_language":"en","source_url":"https://github.com/hostinger/api-mcp-server","tags":["javascript","hostinger","mcp","server","rest","api"],"install":[{"cmd":"npm install hostinger-api-mcp","lang":"bash","label":"npm"},{"cmd":"yarn add hostinger-api-mcp","lang":"bash","label":"yarn"},{"cmd":"pnpm add hostinger-api-mcp","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The hostinger-api-mcp package is primarily a global CLI tool and does not export JavaScript symbols directly. These imports are for the companion `@modelcontextprotocol/sdk` client library, used to programmatically interact with the running MCP server.","wrong":"const Client = require('@modelcontextprotocol/sdk/client/index.js');","symbol":"Client","correct":"import { Client } from '@modelcontextprotocol/sdk/client/index.js';"},{"note":"Used to establish an HTTP streaming connection to the hostinger-api-mcp server when it's running in HTTP mode.","wrong":"const StreamableHTTPClientTransport = require('@modelcontextprotocol/sdk/client/streamableHttp.js');","symbol":"StreamableHTTPClientTransport","correct":"import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';"},{"note":"A common pattern in SDKs is to export types for return values. This type would represent the structure of the response from `client.listTools()`.","symbol":"ListToolsResult","correct":"import type { ListToolsResult } from '@modelcontextprotocol/sdk/client/index.js';"}],"quickstart":{"code":"import { Client } from \"@modelcontextprotocol/sdk/client/index.js\";\nimport { StreamableHTTPClientTransport } from \"@modelcontextprotocol/sdk/client/streamableHttp.js\";\n\nconst API_TOKEN = process.env.API_TOKEN ?? 'YOUR_HOSTINGER_API_TOKEN';\nif (API_TOKEN === 'YOUR_HOSTINGER_API_TOKEN') {\n  console.warn('API_TOKEN environment variable not set. Replace with your actual token or set process.env.API_TOKEN.');\n}\n\nasync function runMcpClient() {\n  // Ensure the hostinger-api-mcp server is running, e.g., 'hostinger-api-mcp --http'\n  const transport = new StreamableHTTPClientTransport({\n    url: \"http://localhost:8100/\",\n    headers: {\n      \"Authorization\": `Bearer ${API_TOKEN}`\n    }\n  });\n\n  const client = new Client({\n    name: \"my-hostinger-client\",\n    version: \"1.0.0\"\n  }, {\n    capabilities: {}\n  });\n\n  try {\n    await client.connect(transport);\n    console.log(\"Connected to Hostinger MCP server.\");\n\n    const { tools } = await client.listTools();\n    console.log(\"Available tools:\", tools.map(tool => tool.name));\n\n    // Example: Call a tool if one is available\n    const billingTool = tools.find(t => t.name === 'billing_getCatalogItemListV1');\n    if (billingTool) {\n      const result = await client.callTool({\n        name: \"billing_getCatalogItemListV1\",\n        arguments: { category: \"DOMAIN\" }\n      });\n      console.log(\"Result of billing_getCatalogItemListV1:\", result);\n    } else {\n      console.log(\"Tool 'billing_getCatalogItemListV1' not found.\");\n    }\n  } catch (error) {\n    console.error(\"Error connecting to or interacting with MCP server:\", error);\n  } finally {\n    await client.disconnect();\n    console.log(\"Disconnected from Hostinger MCP server.\");\n  }\n}\n\nrunMcpClient();","lang":"javascript","description":"This quickstart demonstrates how to use the `@modelcontextprotocol/sdk` to connect to a running `hostinger-api-mcp` server, list available tools, and call a specific tool like `billing_getCatalogItemListV1`."},"warnings":[{"fix":"Ensure your Node.js environment is version 24 or newer. Use a Node Version Manager (like NVM) for easy switching (e.g., `nvm install v24 && nvm use v24`).","message":"The `hostinger-api-mcp` server officially recommends Node.js version 24 or higher in its `README`, despite the `package.json` specifying `>=20.0.0`. Running on versions older than 24 may lead to unexpected behavior or missing features.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Set the `API_TOKEN` environment variable before starting the `hostinger-api-mcp` server (e.g., `API_TOKEN=YOUR_SECRET_TOKEN hostinger-api-mcp`). For clients, ensure the `Authorization: Bearer <API_TOKEN>` header is correctly provided.","message":"Authorization is mandatory for interacting with the Hostinger API through the MCP server. The `API_TOKEN` environment variable must be set on the server-side, and client requests must include a valid `Authorization` header.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Consult the GitHub changelog (`https://github.com/hostinger/api-mcp-server/releases`) for specific breaking changes and migration steps with each new minor version.","message":"As a pre-1.0 release, this package follows `0.y.z` versioning, which implies that minor (`y`) version increments might introduce breaking changes. Developers should review changelogs carefully before upgrading.","severity":"gotcha","affected_versions":"<1.0.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Upgrade your Node.js installation to version 24 or higher. We recommend using `nvm` (`nvm install v24 && nvm use v24`).","cause":"Attempting to run `hostinger-api-mcp` with an unsupported or outdated Node.js version (e.g., v20, v22).","error":"Error: The Node.js version is too old. Please update to Node.js v24 or higher."},{"fix":"Verify that the `API_TOKEN` environment variable is correctly set on the server-side and contains a valid, active Hostinger API token. For client applications, ensure the `Authorization` header is properly formatted (`Bearer YOUR_TOKEN`).","cause":"The Hostinger API token (`API_TOKEN`) is missing, incorrect, or expired, preventing authentication with the Hostinger API via the MCP server.","error":"401 Unauthorized"},{"fix":"Either stop the process currently using port 8100, or run the `hostinger-api-mcp` server on a different port using the `--port` option (e.g., `hostinger-api-mcp --http --port 8150`).","cause":"Another application or another instance of `hostinger-api-mcp` is already bound to the default HTTP port 8100.","error":"Error: listen EADDRINUSE: address already in use 127.0.0.1:8100"}],"ecosystem":"npm"}