Hostinger Cloud MCP 2.0 Gateway

Hostinger Cloud MCP 2.0 Gateway

A stateless MCP server for the full Hostinger API, exposing 305 tools with OAuth 2.1 and API-token authentication.

Category
访问服务器

README

Hostinger Cloud MCP 2.0 Gateway

A stateless cloud MCP server for the full Hostinger API, written natively against MCP protocol revision 2026-07-28 — the release that turned MCP from a bidirectional stateful protocol into a plain request/response one (Model Context Protocol).

It replaces the previous hostinger-mcp-gateway, which wrapped the vendor runtime's stateful transport and spoke the pre-2.0 handshake.

  • Endpoint: POST https://mcp.ntxpllc.cloud/mcp
  • Tools: 305 of the vendor's 314 (the 9 filesystem-backed deploy tools are hidden on a headless host)
  • Auth: built-in OAuth 2.1 authorization server with PKCE, Google Sign-In, and an API-token fallback
  • State: none. No sessions, no database, no sticky routing.

What "stateless MCP 2.0" actually means here

2025-era MCP This server (2026-07-28)
initialize / notifications/initialized handshake Removed. Every request self-describes via _meta.
Mcp-Session-Id header pins a client to one instance Removed. Any request can land on any instance.
Capabilities learned during the handshake server/discover RPC (optional for clients, required of servers)
HTTP GET stream for change notifications subscriptions/listen
Gateways parse the body to route Mcp-Method and Mcp-Name headers (SEP-2243)
Results are bare Every result carries resultType; list/read results carry ttlMs + cacheScope
logging/setLevel Per-request _meta["io.modelcontextprotocol/logLevel"]
resources/subscribe / unsubscribe subscriptions/listen

Because there is no protocol session and no in-process tool state, the container can be scaled to N replicas behind plain round-robin with no shared store. The only persisted byte on disk is the HMAC key used to sign OAuth artifacts.

Backward compatibility

Real clients migrate at different speeds, so 2025-06-18 and 2025-03-26 are still accepted. On those revisions the server answers initialize, ping and logging/setLevel, and strips the 2.0-only fields (resultType, ttlMs, cacheScope) so strict older validators do not choke. Version is negotiated per request from _meta["io.modelcontextprotocol/protocolVersion"], then the MCP-Protocol-Version header, then initialize params.

Authorization

The Hostinger API token never leaves the server. Two ways in:

  1. OAuth 2.1 + Google Sign-In — the gateway is its own authorization server, because Hostinger's auth.hostinger.com allowlists redirect URIs for only a few clients and rejects Perplexity's. Implemented: PKCE (S256, mandatory), dynamic client registration (RFC 7591), Client ID Metadata Documents, refresh tokens, iss on the authorization response (RFC 9207), application_type at registration (SEP-837), issuer-bound credentials (SEP-2352), and resource-indicator audience binding (RFC 8707).
  2. API-token bearer — present the Hostinger account token directly, for n8n, cron and scripts.

Every OAuth artifact is a self-contained HMAC-signed JWT: client registrations, authorization codes, access tokens and refresh tokens. There is no database.

Discovery:

  • GET /.well-known/oauth-protected-resource
  • GET /.well-known/oauth-authorization-server

Deploy

CI builds the image on every push to main and publishes it to ghcr.io/ntxptrevor/hostinger-mcp2-gateway:latest. The VPS pulls that image rather than building from source — building on the VPS through the Docker Manager API reports success but silently produces no container.

To ship a change: push to main, wait for the workflow, then re-run docker compose up for the project (the compose file sets pull_policy: always).

Hostinger VPS, Docker Manager, docker-compose.yml in this repo. Required environment:

Variable Purpose
HOSTINGER_API_TOKEN Upstream credential. Required.
PUBLIC_URL OAuth issuer + resource identifier. No trailing slash.
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET Identity layer. Redirect URI: {PUBLIC_URL}/oauth/googlecb
ALLOWED_EMAILS Sign-in allowlist. Empty means any verified Google account.

Optional: READ_ONLY=true hides every write tool, TOOL_ALLOWLIST / TOOL_DENYLIST narrow the catalogue, ALLOW_LOCAL_FS=true exposes the nine filesystem-backed deploy tools if you mount a workspace.

Mount /data so the token-signing key survives restarts — otherwise every client has to re-authorize after a redeploy.

Verify

npm install && npm test        # 49 checks against a stubbed Hostinger API

curl -sS https://mcp.ntxpllc.cloud/health

curl -sS https://mcp.ntxpllc.cloud/mcp \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "MCP-Protocol-Version: 2026-07-28" \
  -H "Mcp-Method: server/discover" \
  -d '{"jsonrpc":"2.0","id":1,"method":"server/discover"}'

Layout

src/config.mjs      environment, protocol versions, signing key
src/auth.mjs        OAuth 2.1 authorization server + request authentication
src/hostinger.mjs   tool catalogue and the stateless HTTP executor
src/protocol.mjs    MCP dispatcher: 2026-07-28 core + legacy compatibility
src/server.mjs      Express surface (MCP endpoint, OAuth endpoints, discovery)
test/smoke.mjs      end-to-end tests against a stub upstream

The tool catalogue is read from the vendor package hostinger-api-mcp (v1.33.0), but the vendor's stateful runtime is bypassed: requests are executed directly so the upstream bearer is supplied per call and concurrent callers cannot interfere.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选