Skip to content

API Reference

Quickstart & testing

Copy page

Three ways to test the Hostino API and MCP — browser, terminal (curl) and Claude Code

All you need is your own Hostino account. No keys or separate sign-up.

Option 1 — Browser (easiest)

In any browser, on any machine, open:

https://auth.hostino.ai/app
  1. Click Sign in with Hostino.
  2. Sign in with your Hostino email and password (and your 2FA code if enabled).
  3. Approve the requested permissions on the consent page.
  4. You’ll see a table of your services (with due dates) and domains (with status and expiry).

This page runs the full OAuth (PKCE) flow in the browser against the same public API.

Option 2 — Terminal with curl (Device Flow)

Best for servers, scripts, or when your terminal and browser are on two different machines. No callback or localhost is involved.

Step 1 — request a code:

Terminal window
curl -s -X POST https://auth.hostino.ai/device/auth \
-d client_id=hostino-cli \
--data-urlencode "scope=services:read domains:read offline_access" \
-d resource=https://mcp.hostino.ai

Response:

{
"device_code": "…",
"user_code": "ABCD-EFGH",
"verification_uri": "https://auth.hostino.ai/device",
"verification_uri_complete": "https://auth.hostino.ai/device?user_code=ABCD-EFGH",
"expires_in": 600
}

Step 2 — approve in a browser: open verification_uri_complete in a browser on any machine, confirm the code, sign in and approve. The code is valid for 10 minutes.

Step 3 — get the token. Repeat this request every 5 seconds. Until you approve, the response is authorization_pending:

Terminal window
curl -s -X POST https://auth.hostino.ai/token \
-d grant_type=urn:ietf:params:oauth:grant-type:device_code \
-d device_code=DEVICE_CODE \
-d client_id=hostino-cli \
-d resource=https://mcp.hostino.ai
{ "access_token": "…", "refresh_token": "…", "expires_in": 3600, "token_type": "Bearer", "scope": "services:read domains:read" }

Step 4 — call the API:

Terminal window
TOKEN=ACCESS_TOKEN
curl -s https://api.hostino.ai/v1/services -H "Authorization: Bearer $TOKEN"
curl -s https://api.hostino.ai/v1/domains -H "Authorization: Bearer $TOKEN"

Option 3 — Claude Code (MCP)

Terminal window
claude mcp add --transport http hostino https://mcp.hostino.ai/mcp

Then run /mcp in Claude Code, select hostino and choose Authenticate. Full guide, including headless servers: Connect Claude Code.

Once connected, ask:

  • “List my services with their due dates.”
  • “Which of my domains expire in the next 60 days?”
  • “What’s the status of example.com?”

Health checklist

CheckExpected
curl -s https://auth.hostino.ai/.well-known/oauth-authorization-serverJSON with "issuer":"https://auth.hostino.ai"
curl -s https://mcp.hostino.ai/.well-known/oauth-protected-resourceJSON with "resource":"https://mcp.hostino.ai"
curl -si https://api.hostino.ai/v1/services (no token)401 with a WWW-Authenticate: Bearer … header

If something doesn’t work: Errors and MCP troubleshooting.