Serveur MCP YorkHost
Le serveur MCP expose vos services à un assistant IA : Claude (web, desktop, Claude Code), ChatGPT, Cursor, VS Code… Chaque outil correspond à une route de l'API : mêmes permissions, mêmes restrictions de services, même journal (visible dans Clés API de votre espace client, source « MCP »).
- URL du serveur :
https://api.yorkhost.fr/client/mcp - Transport : Streamable HTTP, sans état
- Authentification : connexion à votre compte YorkHost (OAuth), ou en-tête
Authorization: Bearer <clé API>
La double authentification doit être active sur votre compte YorkHost, dans les deux cas.
Connexion par votre compte (Claude.ai, ChatGPT…)
Aucune clé à copier : l'application vous envoie sur votre espace client YorkHost, vous choisissez ce qu'elle pourra faire, et c'est tout.
Claude (claude.ai et Claude Desktop) : Paramètres → Connecteurs → Ajouter un connecteur personnalisé, nommez-le « YorkHost » et collez l'URL https://api.yorkhost.fr/client/mcp. Laissez les champs OAuth avancés vides, puis cliquez sur Se connecter.
ChatGPT : dans les paramètres des connecteurs (mode développeur), créez un connecteur avec l'URL https://api.yorkhost.fr/client/mcp et l'authentification OAuth.
Claude Code :
claude mcp add --transport http yorkhost https://api.yorkhost.fr/client/mcp
puis tapez /mcp dans Claude Code et choisissez Authenticate.
Sur la page d'autorisation YorkHost :
- Connectez-vous si besoin (mot de passe, Google, Discord, double authentification).
- Vérifiez l'adresse de retour affichée (par exemple
claude.ai) : c'est elle qui identifie l'application, pas son nom. - Cochez les permissions et, si vous voulez, limitez l'accès à certains services. Les permissions sensibles ne sont jamais cochées d'office.
- Cliquez sur Autoriser. Vous recevez un e-mail de confirmation.
L'application apparaît ensuite dans Clés API → Applications connectées, où vous pouvez la déconnecter à tout moment. Son accès est aussi coupé si vous changez de mot de passe ou désactivez la double authentification. Les jetons d'accès durent une heure et sont renouvelés automatiquement par l'application.
Connexion par clé API
Pour les clients qui ne gèrent pas OAuth, ou pour un usage scripté, créez une clé dans Clés API et passez-la dans l'en-tête Authorization.
Claude Code
claude mcp add --transport http yorkhost https://api.yorkhost.fr/client/mcp \
--header "Authorization: Bearer yhk_client_v1_..."
Cursor / VS Code / autre client MCP : ajoutez un serveur de type HTTP avec l'URL ci-dessus et l'en-tête Authorization.
Créez une clé dédiée à votre assistant, avec le modèle « Agent IA (sans action destructive) ». Vous pourrez la révoquer à tout moment sans toucher à vos autres intégrations. L'assistant ne voit que les outils autorisés par les permissions de la clé.
Cette page est générée automatiquement depuis le catalogue d'outils du serveur MCP. Ne la modifiez pas à la main.
Outils
| Outil | Description | Permission | Effet |
|---|---|---|---|
get_account | Profile of the authenticated YorkHost account (name, email, credit balance). | account:read | lecture |
list_services | List the account's services (VPS, game servers, domains…) with their IDs, type and status. Call this first to find a service ID. | services:read | lecture |
get_service | Details of one service. | services:read | lecture |
list_invoices | List invoices (status, amount, due date). | billing:read | lecture |
get_invoice | One invoice with its line items. | billing:read | lecture |
get_payment_link | Status of an invoice and, if unpaid, the secure YorkHost page where the user pays it (card with 3-D Secure, PayPal, account credit). Share the link with the user; never ask for card details in the chat. | billing:read | lecture |
list_products | Products that can be ordered through the API, with prices per billing cycle (m, q, s, a), plus the agent sandbox offers. | services:read | lecture |
create_order | Order a product (creates a real invoice). Two steps: call WITHOUT confirmation_token to get the price and a token (nothing is ordered), show the price to the user and get explicit approval, then call again WITH confirmation_token. Returns the invoice and its payment_url. | orders:write | action |
list_tickets | List support tickets. | tickets:read | lecture |
get_ticket | One support ticket with its messages. | tickets:read | lecture |
create_ticket | Open a support ticket. Ask the user to confirm the content before calling. | tickets:write | action |
reply_ticket | Reply to a support ticket. | tickets:write | action |
get_vps | Status, resources and IPs of a VPS. | vps:read | lecture |
get_vps_metrics | CPU, RAM and network usage of a VPS over the last hour. | vps:read | lecture |
vps_power | Start, stop or restart a VPS. Stopping interrupts the customer's services: confirm with the user first. | vps:power | action |
get_game_server | Status, address and live resources of a game server (FiveM, Minecraft, bots…). | game:read | lecture |
get_game_server_metrics | CPU and RAM history of a game server. | game:read | lecture |
game_server_power | Start, stop, restart or kill a game server. Stopping disconnects players: confirm with the user first. | game:power | action |
get_ddos_attacks | DDoS attacks detected and mitigated on the account's IPs and game servers. | antiddos:read | lecture |
list_sandboxes | Agent sandboxes (free trial VMs for AI agents: Linux, Linux desktop, Windows desktop) of the account, with SSH command, preview URL, expiry and, when being turned into a VPS, the transfer progress. | sandbox:read | lecture |
create_sandbox | Create a free trial VM for an AI agent. It runs for its run window (2 hours by default when created from an account; see free_minutes in list_products and run_until in the result), then is stopped, and deleted with its files unless turned into a VPS with keep_sandbox. No public IP: SSH through the YorkHost gateway, web apps on the HTTPS preview URL. kind: linux (SSH, coding agents preinstalled), desktop (Linux desktop in the browser via noVNC, for computer use) or windows (Windows desktop). Requires the SSH public key the agent will connect with; SSH keys registered with add_sandbox_key are authorized too. Account secrets (set_sandbox_secret) are exported as environment variables in Linux sandboxes unless inject_secrets is false. | sandbox:write | action |
sandbox_links | New desktop link for a sandbox (the previous link stops working). | sandbox:write | action |
keep_sandbox | Turn a trial sandbox into a regular YorkHost VPS (order + invoice; public IP; its /home/agent folder is copied into the new VPS once paid). Two steps like create_order: preflight without confirmation_token, user approval, then confirm. | orders:write | action |
claim_sandbox | Attach an anonymous trial sandbox created with ssh yorkhost.sh to this account and turn it into a regular YorkHost VPS (order + invoice; its /home/agent folder is copied into the VPS once paid). Takes the claim link or token printed at creation. Only claim a sandbox the user created: its files come from its creator (SSH keys found in it are not copied; the account's registered SSH keys are installed for the agent user on the VPS). Two steps: preflight without confirmation_token, user approval, then confirm. | orders:write | action |
delete_sandbox | Delete a trial sandbox and all its files. Irreversible: confirm with the user first. | sandbox:write | action |
sandbox_exec | Run a shell command inside one of the account's running sandboxes (kinds linux and desktop, not windows), without SSH. The command runs as bash -lc <command> as the Linux user agent in the trial VM (home /home/agent, passwordless sudo for root tasks such as apt-get), in /home/agent or cwd. Returns exit_code, stdout and stderr (each truncated beyond 256 KiB, see stdout_truncated/stderr_truncated), timed_out and duration_ms. timeout_seconds defaults to 60 (max 300): the command and its children are killed at the timeout. For servers and long jobs, start them in the background with their output redirected (e.g. nohup npm run dev > /tmp/dev.log 2>&1 &), then poll the log. The sandbox has no public IP: to test a web app, listen on 0.0.0.0:8080 and open the sandbox's preview_url from list_sandboxes (https://<sandbox_id>-8080.yorkhost.sh; for another port, change 8080 in the hostname), or curl localhost:<port> here.Outbound traffic is limited to web, git, SSH and DNS. At most 4 commands run at once per sandbox. | sandbox:write | action |
sandbox_list_files | List a directory inside a running sandbox (kinds linux and desktop), read as the Linux user agent: name (relative to path), type (file, dir, symlink, other), size, mode and mtime. path must be under /home/agent or /tmp (relative paths start from /home/agent; default /home/agent). depth 1 to 3 lists subdirectories recursively (default 1). At most 1000 entries (truncated flag); symlinks are not followed. | sandbox:read | lecture |
sandbox_read_file | Read a file inside a running sandbox (kinds linux and desktop), as the Linux user agent (its permissions apply). path must be under /home/agent or /tmp (relative paths start from /home/agent). Returns the first 1 MiB: encoding utf-8 (content is the text) or base64 for binary files, plus size and truncated. | sandbox:read | lecture |
sandbox_write_file | Create or overwrite a file inside a running sandbox (kinds linux and desktop), as the Linux user agent; missing parent directories are created and the file is replaced atomically. path must be under /home/agent or /tmp (relative paths start from /home/agent). content is text (encoding utf-8, default) or base64 (encoding base64) for binary data, at most 1 MiB. mode is an optional octal permission such as 755 (default: kept when overwriting an existing file). | sandbox:write | action |
list_sandbox_keys | SSH public keys registered on the account for agent sandboxes (fingerprint, name). Each of them can connect to every sandbox of the account (ssh <sandbox id>@yorkhost.sh) and is added to sandboxes created later. | sandbox:read | lecture |
add_sandbox_key | Register an SSH PUBLIC key on the account (max 10): it can then connect to all the account's sandboxes, current and future. Never send a private key. | sandbox:write | action |
remove_sandbox_key | Remove an SSH key from the account: it can no longer connect to the account's sandboxes through the gateway. | sandbox:write | action |
list_sandbox_secrets | Names of the account's sandbox secrets (environment variables such as ANTHROPIC_API_KEY, OPENAI_API_KEY, GITHUB_TOKEN exported in new Linux sandboxes). Values are never returned. | sandbox:read | lecture |
set_sandbox_secret | Create or replace an account secret exported as an environment variable in the account's new Linux sandboxes (max 20, value up to 4 KiB). Stored encrypted and never shown again: only use a value the user explicitly gave for this purpose, and do not repeat it back. | sandbox:write | action |
delete_sandbox_secret | Delete an account secret (sandboxes created later no longer get it; existing ones keep their environment until deleted). | sandbox:write | action |
Détail des outils
get_account
Profile of the authenticated YorkHost account (name, email, credit balance).
- Permission :
account:read - Route équivalente :
GET /client/v1/account - Arguments : aucun
list_services
List the account's services (VPS, game servers, domains…) with their IDs, type and status. Call this first to find a service ID.
- Permission :
services:read - Route équivalente :
GET /client/v1/services - Arguments : aucun
get_service
Details of one service.
- Permission :
services:read - Route équivalente :
GET /client/v1/services/:id
Arguments :
| Argument | Type | Description |
|---|---|---|
service_id (requis) | integer | YorkHost service ID (from list_services) |
list_invoices
List invoices (status, amount, due date).
- Permission :
billing:read - Route équivalente :
GET /client/v1/invoices - Arguments : aucun
get_invoice
One invoice with its line items.
- Permission :
billing:read - Route équivalente :
GET /client/v1/invoices/:id
Arguments :
| Argument | Type | Description |
|---|---|---|
invoice_id (requis) | integer |
get_payment_link
Status of an invoice and, if unpaid, the secure YorkHost page where the user pays it (card with 3-D Secure, PayPal, account credit). Share the link with the user; never ask for card details in the chat.
- Permission :
billing:read - Route équivalente :
GET /client/v1/invoices/:id/payment-link
Arguments :
| Argument | Type | Description |
|---|---|---|
invoice_id (requis) | integer |
list_products
Products that can be ordered through the API, with prices per billing cycle (m, q, s, a), plus the agent sandbox offers.
- Permission :
services:read - Route équivalente :
GET /client/v1/catalog - Arguments : aucun
create_order
Order a product (creates a real invoice). Two steps: call WITHOUT confirmation_token to get the price and a token (nothing is ordered), show the price to the user and get explicit approval, then call again WITH confirmation_token. Returns the invoice and its payment_url.
- Permission :
orders:write - Route équivalente :
POST /client/v1/orders
Arguments :
| Argument | Type | Description |
|---|---|---|
confirmation_token | string | From the preflight call, only after the user approved the price |
cycle | string | Billing cycle (default m = monthly) |
product_id (requis) | integer | From list_products |
list_tickets
List support tickets.
- Permission :
tickets:read - Route équivalente :
GET /client/v1/tickets - Arguments : aucun
get_ticket
One support ticket with its messages.
- Permission :
tickets:read - Route équivalente :
GET /client/v1/tickets/:id
Arguments :
| Argument | Type | Description |
|---|---|---|
ticket_id (requis) | string | Ticket number or ID |
create_ticket
Open a support ticket. Ask the user to confirm the content before calling.
- Permission :
tickets:write - Route équivalente :
POST /client/v1/tickets
Arguments :
| Argument | Type | Description |
|---|---|---|
body (requis) | string | |
request_type | string | |
service_id | integer | YorkHost service ID (from list_services) |
subject (requis) | string |
reply_ticket
Reply to a support ticket.
- Permission :
tickets:write - Route équivalente :
POST /client/v1/tickets/:id/reply
Arguments :
| Argument | Type | Description |
|---|---|---|
body (requis) | string | |
ticket_id (requis) | string |
get_vps
Status, resources and IPs of a VPS.
- Permission :
vps:read - Route équivalente :
GET /client/v1/vps/:id
Arguments :
| Argument | Type | Description |
|---|---|---|
service_id (requis) | integer | YorkHost service ID (from list_services) |
get_vps_metrics
CPU, RAM and network usage of a VPS over the last hour.
- Permission :
vps:read - Route équivalente :
GET /client/v1/vps/:id/metrics
Arguments :
| Argument | Type | Description |
|---|---|---|
service_id (requis) | integer | YorkHost service ID (from list_services) |
vps_power
Start, stop or restart a VPS. Stopping interrupts the customer's services: confirm with the user first.
- Permission :
vps:power - Route équivalente :
POST /client/v1/vps/:id/power
Arguments :
| Argument | Type | Description |
|---|---|---|
action (requis) | string | |
service_id (requis) | integer | YorkHost service ID (from list_services) |
get_game_server
Status, address and live resources of a game server (FiveM, Minecraft, bots…).
- Permission :
game:read - Route équivalente :
GET /client/v1/game-servers/:id
Arguments :
| Argument | Type | Description |
|---|---|---|
service_id (requis) | integer | YorkHost service ID (from list_services) |
get_game_server_metrics
CPU and RAM history of a game server.
- Permission :
game:read - Route équivalente :
GET /client/v1/game-servers/:id/metrics
Arguments :
| Argument | Type | Description |
|---|---|---|
service_id (requis) | integer | YorkHost service ID (from list_services) |
game_server_power
Start, stop, restart or kill a game server. Stopping disconnects players: confirm with the user first.
- Permission :
game:power - Route équivalente :
POST /client/v1/game-servers/:id/power
Arguments :
| Argument | Type | Description |
|---|---|---|
action (requis) | string | |
service_id (requis) | integer | YorkHost service ID (from list_services) |
get_ddos_attacks
DDoS attacks detected and mitigated on the account's IPs and game servers.
- Permission :
antiddos:read - Route équivalente :
GET /client/v1/antiddos
Arguments :
| Argument | Type | Description |
|---|---|---|
days | integer | History depth in days (default 90) |
list_sandboxes
Agent sandboxes (free trial VMs for AI agents: Linux, Linux desktop, Windows desktop) of the account, with SSH command, preview URL, expiry and, when being turned into a VPS, the transfer progress.
- Permission :
sandbox:read - Route équivalente :
GET /client/v1/sandboxes - Arguments : aucun
create_sandbox
Create a free trial VM for an AI agent. It runs for its run window (2 hours by default when created from an account; see free_minutes in list_products and run_until in the result), then is stopped, and deleted with its files unless turned into a VPS with keep_sandbox. No public IP: SSH through the YorkHost gateway, web apps on the HTTPS preview URL. kind: linux (SSH, coding agents preinstalled), desktop (Linux desktop in the browser via noVNC, for computer use) or windows (Windows desktop). Requires the SSH public key the agent will connect with; SSH keys registered with add_sandbox_key are authorized too. Account secrets (set_sandbox_secret) are exported as environment variables in Linux sandboxes unless inject_secrets is false.
- Permission :
sandbox:write - Route équivalente :
POST /client/v1/sandboxes
Arguments :
| Argument | Type | Description |
|---|---|---|
inject_secrets | boolean | Export the account's sandbox secrets (API keys, tokens) in this sandbox. Default true; set false for untrusted code. |
kind | string | |
ssh_public_key (requis) | string | One OpenSSH public key line (ssh-ed25519 …) |
sandbox_links
New desktop link for a sandbox (the previous link stops working).
- Permission :
sandbox:write - Route équivalente :
POST /client/v1/sandboxes/:id/links
Arguments :
| Argument | Type | Description |
|---|---|---|
sandbox_id (requis) | string | Sandbox ID (sbx…, from list_sandboxes) |
keep_sandbox
Turn a trial sandbox into a regular YorkHost VPS (order + invoice; public IP; its /home/agent folder is copied into the new VPS once paid). Two steps like create_order: preflight without confirmation_token, user approval, then confirm.
- Permission :
orders:write - Route équivalente :
POST /client/v1/sandboxes/:id/keep
Arguments :
| Argument | Type | Description |
|---|---|---|
confirmation_token | string | |
sandbox_id (requis) | string | Sandbox ID (sbx…, from list_sandboxes) |
claim_sandbox
Attach an anonymous trial sandbox created with ssh yorkhost.sh to this account and turn it into a regular YorkHost VPS (order + invoice; its /home/agent folder is copied into the VPS once paid). Takes the claim link or token printed at creation. Only claim a sandbox the user created: its files come from its creator (SSH keys found in it are not copied; the account's registered SSH keys are installed for the agent user on the VPS). Two steps: preflight without confirmation_token, user approval, then confirm.
- Permission :
orders:write - Route équivalente :
POST /client/v1/sandboxes/claim
Arguments :
| Argument | Type | Description |
|---|---|---|
claim_token (requis) | string | yhsc_… token or the full claim link |
confirmation_token | string |
delete_sandbox
Delete a trial sandbox and all its files. Irreversible: confirm with the user first.
- Permission :
sandbox:write - Route équivalente :
DELETE /client/v1/sandboxes/:id
Arguments :
| Argument | Type | Description |
|---|---|---|
sandbox_id (requis) | string | Sandbox ID (sbx…, from list_sandboxes) |
sandbox_exec
Run a shell command inside one of the account's running sandboxes (kinds linux and desktop, not windows), without SSH. The command runs as bash -lc <command> as the Linux user agent in the trial VM (home /home/agent, passwordless sudo for root tasks such as apt-get), in /home/agent or cwd. Returns exit_code, stdout and stderr (each truncated beyond 256 KiB, see stdout_truncated/stderr_truncated), timed_out and duration_ms. timeout_seconds defaults to 60 (max 300): the command and its children are killed at the timeout. For servers and long jobs, start them in the background with their output redirected (e.g. nohup npm run dev > /tmp/dev.log 2>&1 &), then poll the log. The sandbox has no public IP: to test a web app, listen on 0.0.0.0:8080 and open the sandbox's preview_url from list_sandboxes (https://<sandbox_id>-8080.yorkhost.sh; for another port, change 8080 in the hostname), or curl localhost:<port> here.Outbound traffic is limited to web, git, SSH and DNS. At most 4 commands run at once per sandbox.
- Permission :
sandbox:write - Route équivalente :
POST /client/v1/sandboxes/:id/exec
Arguments :
| Argument | Type | Description |
|---|---|---|
command (requis) | string | Shell command (bash syntax, pipes and && allowed), at most 32 KiB |
cwd | string | Working directory under /home/agent (default /home/agent) |
sandbox_id (requis) | string | Sandbox ID (sbx…, from list_sandboxes) |
stdin | string | Optional text sent to the command's standard input (at most 32 KiB) |
timeout_seconds | integer | Default 60 |
sandbox_list_files
List a directory inside a running sandbox (kinds linux and desktop), read as the Linux user agent: name (relative to path), type (file, dir, symlink, other), size, mode and mtime. path must be under /home/agent or /tmp (relative paths start from /home/agent; default /home/agent). depth 1 to 3 lists subdirectories recursively (default 1). At most 1000 entries (truncated flag); symlinks are not followed.
- Permission :
sandbox:read - Route équivalente :
GET /client/v1/sandboxes/:id/files
Arguments :
| Argument | Type | Description |
|---|---|---|
depth | integer | Recursion depth (default 1) |
path | string | Directory under /home/agent or /tmp (default /home/agent) |
sandbox_id (requis) | string | Sandbox ID (sbx…, from list_sandboxes) |
sandbox_read_file
Read a file inside a running sandbox (kinds linux and desktop), as the Linux user agent (its permissions apply). path must be under /home/agent or /tmp (relative paths start from /home/agent). Returns the first 1 MiB: encoding utf-8 (content is the text) or base64 for binary files, plus size and truncated.
- Permission :
sandbox:read - Route équivalente :
GET /client/v1/sandboxes/:id/files/content
Arguments :
| Argument | Type | Description |
|---|---|---|
path (requis) | string | File under /home/agent or /tmp |
sandbox_id (requis) | string | Sandbox ID (sbx…, from list_sandboxes) |
sandbox_write_file
Create or overwrite a file inside a running sandbox (kinds linux and desktop), as the Linux user agent; missing parent directories are created and the file is replaced atomically. path must be under /home/agent or /tmp (relative paths start from /home/agent). content is text (encoding utf-8, default) or base64 (encoding base64) for binary data, at most 1 MiB. mode is an optional octal permission such as 755 (default: kept when overwriting an existing file).
- Permission :
sandbox:write - Route équivalente :
PUT /client/v1/sandboxes/:id/files/content
Arguments :
| Argument | Type | Description |
|---|---|---|
content (requis) | string | File content (text, or base64 with encoding=base64) |
encoding | string | Default utf-8 |
mode | string | Octal permission, e.g. 644 or 755 |
path (requis) | string | File under /home/agent or /tmp |
sandbox_id (requis) | string | Sandbox ID (sbx…, from list_sandboxes) |
list_sandbox_keys
SSH public keys registered on the account for agent sandboxes (fingerprint, name). Each of them can connect to every sandbox of the account (ssh <sandbox id>@yorkhost.sh) and is added to sandboxes created later.
- Permission :
sandbox:read - Route équivalente :
GET /client/v1/sandbox-keys - Arguments : aucun
add_sandbox_key
Register an SSH PUBLIC key on the account (max 10): it can then connect to all the account's sandboxes, current and future. Never send a private key.
- Permission :
sandbox:write - Route équivalente :
POST /client/v1/sandbox-keys
Arguments :
| Argument | Type | Description |
|---|---|---|
name | string | Label (default: the key comment) |
public_key (requis) | string | One OpenSSH public key line (ssh-ed25519 …, ecdsa-sha2-… or ssh-rsa ≥ 2048 bits) |
remove_sandbox_key
Remove an SSH key from the account: it can no longer connect to the account's sandboxes through the gateway.
- Permission :
sandbox:write - Route équivalente :
DELETE /client/v1/sandbox-keys
Arguments :
| Argument | Type | Description |
|---|---|---|
fingerprint (requis) | string | SHA256:… fingerprint from list_sandbox_keys |
list_sandbox_secrets
Names of the account's sandbox secrets (environment variables such as ANTHROPIC_API_KEY, OPENAI_API_KEY, GITHUB_TOKEN exported in new Linux sandboxes). Values are never returned.
- Permission :
sandbox:read - Route équivalente :
GET /client/v1/sandbox-secrets - Arguments : aucun
set_sandbox_secret
Create or replace an account secret exported as an environment variable in the account's new Linux sandboxes (max 20, value up to 4 KiB). Stored encrypted and never shown again: only use a value the user explicitly gave for this purpose, and do not repeat it back.
- Permission :
sandbox:write - Route équivalente :
PUT /client/v1/sandbox-secrets/:name
Arguments :
| Argument | Type | Description |
|---|---|---|
name (requis) | string | Variable name, e.g. ANTHROPIC_API_KEY |
value (requis) | string | Secret value (up to 4096 bytes) |
delete_sandbox_secret
Delete an account secret (sandboxes created later no longer get it; existing ones keep their environment until deleted).
- Permission :
sandbox:write - Route équivalente :
DELETE /client/v1/sandbox-secrets/:name
Arguments :
| Argument | Type | Description |
|---|---|---|
name (requis) | string | Variable name from list_sandbox_secrets |