---
title: Quickstart & testing
description: Three ways to test the Hostino API and MCP — browser, terminal (curl) and Claude Code
sidebar:
  order: 2
  badge:
    text: Alpha
    variant: success
---

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:

```text
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:**

```bash
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:

```json
{
  "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`:

```bash
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
```

```json
{ "access_token": "…", "refresh_token": "…", "expires_in": 3600, "token_type": "Bearer", "scope": "services:read domains:read" }
```

**Step 4 — call the API:**

```bash
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"
```

:::tip
Because `offline_access` is in the scope, you also get a `refresh_token` and can mint new access tokens for 14 days without signing in again. See [Authentication](/en/api/authentication/).
:::

## Option 3 — Claude Code (MCP)

```bash
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](/en/ai-mcp/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

| Check | Expected |
|---|---|
| `curl -s https://auth.hostino.ai/.well-known/oauth-authorization-server` | JSON with `"issuer":"https://auth.hostino.ai"` |
| `curl -s https://mcp.hostino.ai/.well-known/oauth-protected-resource` | JSON 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](/en/api/errors/) and [MCP troubleshooting](/en/ai-mcp/troubleshooting/).
