AI assistants (MCP)
Connect an AI assistant to your hosting with the Model Context Protocol: the endpoint, the token it needs, a client configuration, the tools and their limits.
An AI assistant that speaks the Model Context Protocol (MCP) can manage your hosting through the token API: list your websites, read and change DNS records, make mailboxes and forwarders, check SSL certificates, take a backup, update WordPress, look after storage buckets or read a site's error log. It works for customers, resellers and administrators alike.
The assistant does exactly what its API token may do, nothing more. Every tool is one ordinary token API request, with the same permission checks, request limit and activity log.
The endpoint
| Address | Transport |
|---|---|
https://api.yourdomain.com/v1/mcp |
Streamable HTTP, protocol versions 2025-11-25, 2025-06-18 and 2025-03-26 |
Send the token in the Authorization header, as for any API request:
Authorization: Bearer hf_…
The endpoint answers each POST with one JSON answer. It keeps no sessions and opens no event streams: GET and
DELETE answer 405 Method Not Allowed, which MCP clients understand.
1. Make a token for the assistant
Under Password & security › API tokens, make a new token and tick AI assistants (MCP). Tokens without it
are refused by the MCP endpoint (403), so a token you made for a billing system or a script is never used by an
assistant by accident. The box is off by default.
Choose what the assistant may do with the token itself:
- Read only: the assistant can look but change nothing. It is offered only the read tools. Start with this.
- Read & change: it can also add, change and delete. Destructive tools are marked as such (see below).
- Allowed IPs and Expires work as for any token. A token for an assistant you try out for a week should expire in a week.
An administrator's or reseller's token reaches the accounts that login manages; a customer's token reaches only that customer's own account.
2. Add the server to your assistant
Most MCP clients take a remote server as a JSON entry with its address and headers. The exact file and key names depend on the client: look for remote MCP server, Streamable HTTP or HTTP transport, and custom headers.
{
"mcpServers": {
"hosting": {
"type": "http",
"url": "https://api.yourdomain.com/v1/mcp",
"headers": {
"Authorization": "Bearer hf_0123456789abcdef0123456789abcdef0123456789abcdef"
}
}
}
}
Keep the token out of shared files: many clients can read it from an environment variable instead
("Authorization": "Bearer ${HOSTING_TOKEN}").
To check the connection without an assistant, send the handshake yourself:
curl -s https://api.yourdomain.com/v1/mcp \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'
curl -s https://api.yourdomain.com/v1/mcp \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
The tools
Each tool is a token API endpoint, named by its operation name in the OpenAPI description,
with the same fields. tools/list shows only the tools the token can use: staff tools to administrator and
reseller tokens, change tools to Read & change tokens, and a team role's own areas to a team role's token.
| Area | Tools |
|---|---|
| You | getMe |
| Accounts (staff) | listAccounts, getAccount, getAccountUsage |
| Websites | listDomains, getSiteCheck |
| DNS | listDnsZones, getDnsZone, addDnsRecord, updateDnsRecord, deleteDnsRecord |
listMailboxes, getMailbox, createMailbox, setMailboxQuota, deleteMailbox, listForwarders, addForwarder, deleteForwarder |
|
| Databases | listDatabases, getDatabase, createDatabase, deleteDatabase, listDatabaseUsers |
| SSL | listCertificates, getCertificate, issueCertificate, renewCertificate |
| Backups | listBackups, getBackup, createBackup, restoreBackup, deleteBackup |
| WordPress | listWordPressSites, updateWordPressSite |
| Storage buckets | getBuckets, createBucket, setBucketVisibility, deleteBucket, revokeBucketKey |
| Logs | getLogs |
There is no tool that makes a bucket's access key: make new keys in the panel, so that a key's secret never passes through an assistant.
The per-account tools take the account's username. With a customer's token it is optional and always that
customer's own account; naming another account is refused like any API request for it (No such account.).
Every tool carries MCP annotations, which clients use to decide what to confirm with you first:
| Annotation | Set on |
|---|---|
readOnlyHint: true |
the tools that only read (list…, get…) |
destructiveHint: true |
the tools that delete or overwrite: every delete… tool and restoreBackup |
idempotentHint: true |
reads, changes with PUT/PATCH, and deletes |
Destructive tools can't be undone, and their descriptions say so. Most assistants ask before running a tool marked destructive; leave that confirmation switched on.
Answers and errors
A tool's result is the API's answer as JSON text ({"ok": true, "data": …}). When the API refuses or fails, the
result has isError: true and says why, for example
The API refused this (HTTP 403): This token is read-only. Make a "Read & change" token to do this.; the assistant
reads it and can tell you or try again differently.
The endpoint itself answers JSON-RPC errors for messages that aren't right:
| HTTP | JSON-RPC code | When |
|---|---|---|
| 400 | -32700 |
the body is not JSON |
| 400 | -32600 |
not one JSON-RPC 2.0 message (a batch, no method, an id that is null or not a string or number) |
| 200 | -32601 |
an unknown method (only initialize, ping, tools/list and tools/call are answered) |
| 200 | -32602 |
an unknown tool, or params or arguments that are not objects |
| 401, 402, 403, 429 | -32001 |
the token API refused the token: missing or unknown, wrong address, expired, the licence, MCP not ticked, or the request limit |
| 400 | -32600 |
an MCP-Protocol-Version header this server doesn't speak |
| 403 | -32600 |
an Origin header other than the API's own address |
Limits and the activity log
- Request limit: every MCP message counts against the token's requests a minute like any API request, and a
tool call counts twice (the token check and the call). The
X-RateLimit-*headers come back on each answer; over the limit the answer is429withRetry-After. - Sign-in lock-out: a missing or wrong token counts as a failed sign-in from that address, as on the API.
- Activity log: each tool call writes an
api.mcpline with the tool, the request and its status, for exampleaddDnsRecord: POST /v1/accounts/sarah/dns-zones/example.com/records (201), next to the lines the change itself writes. Refused calls are logged too.
To stop an assistant, delete its token under Password & security › API tokens. It stops working at once.