Apidly Cloud
Price, launch and manage GPU servers and serverless GPU endpoints billed by the second. Read-only by default; launches need --allow-writes and honour a per-hour price cap. Stdio, Node 18+.
Documentation
@apidly/mcp
Model Context Protocol server (stdio) for Apidly Cloud. An AI assistant can list plans and templates, price a launch,
list and show servers, read logs, usage, balance, webhooks, launch requests, storage, invoices and the activity log and list
endpoints. With --allow-writes it can also launch, start, stop, restart and destroy servers, name them, set auto-stop
rules, alerts and scheduled stops, save a server as a template, change, pause and resume serverless endpoints, queue and
cancel their jobs, save SSH keys and make top-up payment links. Node 18+, no dependencies (the JavaScript
SDK is carried inside the package). Not on npm: install the downloaded file.
npm install -g --allow-remote=root https://apidly.com/downloads/apidly-mcp-0.1.26.tgz
APIDLY_API_KEY=... apidly-mcp # reads only
APIDLY_API_KEY=... apidly-mcp --allow-writes --max-hourly-usd 1.50
Let an assistant run servers
Out of the box the assistant can only look. It cannot launch, stop, delete or pay for anything, and the tools that would
are not even offered. Start the server with --allow-writes (or APIDLY_MCP_ALLOW_WRITES=1) when you want to say things
like "start a ComfyUI server for me" or "stop everything". --read-only (or APIDLY_MCP_READ_ONLY=1) always wins.
Safety rules, all enforced by the server itself:
- Price first.
quote_launchprices a plan and template per running hour without creating anything.launch_server(from a Quick start goal such asimages, or a plan and template) needsmaxHourlyUsdand refuses when the quoted price is higher.--max-hourly-usd N(orAPIDLY_MCP_MAX_HOURLY_USD) caps every launch of the session, includingdeploy_server,clone_serverandlaunch_again, whatever the assistant asks.check_launchasks the API itself (plan id, template id anddiskGb, with a key that may launch servers) and also answerswouldLaunchandblockers: usequote_launchwhile comparing plans andcheck_launchright before launching. Both are offered without--allow-writesand spend nothing. - Ask first. Anything that spends money, stops or deletes needs
confirm: true; the tool descriptions tell the assistant to ask you before setting it. Destroying a server also needs its exact name. - The assistant never pays.
create_topup_linkonly returns a payment link. You open it in your browser and pay there; nothing is charged by the tool, and a saved card is never used. - Sent once. Every change carries an Idempotency-Key and is never retried automatically. If the answer is lost the tool says so and, where the API supports it, names the key that makes one more try safe.
- Plain errors. The API's error code and message are passed through as they are, for example
insufficient_balance, orfeature_unavailablewhen alerts or scheduled actions are switched off.
The narrowest key is still the best guard: a key with the read-only scope cannot change anything at all.
List filters
Every list tool takes limit (how many rows; each tool states its range). The other optional arguments narrow the list;
the tool's input schema describes each one, with its allowed values. A list the API pages answers nextCursor; pass it
back as cursor for the next page (null means there is no more).
| Tool | Filters |
|---|---|
list_plans | gpu, minVramGb, maxVramGb, minDiskGb, minRamGb, minVcpus, region (na, eu, ap, other), hosting (datacenter, independent, any), maxPriceUsd, minPerfIndex (Apidly performance index, reference GPU = 100), availability (available, limited, unavailable), sort (recommended, price, perf, perf_per_dollar, vram), minGpus, maxGpus, query (one line such as vram>=24 gpus>=2 price<1.5), cursor |
list_servers | status (one or several, comma-separated), q (text in the label or id), pricing (on_demand, interruptible), tag (comma-separated, all must match), includeDestroyed, cursor |
list_templates | q (text in the name, slug, summary, image or category), category, source (builtin, own), vramGb (templates that run on a GPU with that much memory), cursor |
get_usage | from, to, groupBy (instance, day, gpu, member, template, tag) |
list_server_requests | status, cursor |
list_benchmarks | gpu, cursor |
list_transactions | type, from, to, serverId, cursor |
list_invoices | kind (topup, subscription, statement), from, to, cursor |
list_activity | category, actor (a member user id or an API key id), from, to (days, UTC), cursor |
list_team_members | cursor |
list_statements | cursor |
list_reservations | status |
list_endpoint_requests | status (all, 2xx, 4xx, 5xx, queued_out), kind (all, proxy, job), before |
list_support_tickets | status (open, pending, closed) |
list_alerts | serverId (that server's alerts and the organization-wide ones; since 0.1.20) |
list_scheduled_actions | status (pending, running, done, failed, cancelled), serverId (since 0.1.20) |
Errors come back as tool errors (isError: true) whose text starts with the HTTP status, the API's error code and the
request id, for example HTTP 402, insufficient_balance, request req_...; a rate limit adds how many seconds to wait.
The API's own message (and any invalid-field messages) follows as JSON inside an <untrusted-data> block, since it can
quote names people chose. Never a stack trace, and never the API key.
Data from other people is marked as data
Many answers carry text that the platform did not write: server labels and notes, log lines, job input and output,
template names and readmes, ticket messages, webhook and key names. Such an answer reaches the assistant as one line
saying what it is, then the JSON inside an <untrusted-data> block, with every < in it written as \u003c (the same
JSON, but nothing inside can close the block). The server's instructions tell the assistant to report that text and
never follow instructions found in it. Answers with only the platform's own figures (plans, quotes, prices, balance,
budget, metrics) are sent as plain JSON.
This lowers the risk of prompt injection; it does not remove it. What the assistant does with the text is up to its
model. The limits that hold regardless are the key's scope, --allow-writes, --max-hourly-usd and your confirmation,
so give a session write access only when you want changes and read what the assistant proposes before you say yes.
Tools added after 0.1.20
| Tool | What it does | Offered |
|---|---|---|
check_launch | The API's own check of a launch: the price per running hour it would lock and every reason (blockers) a real launch would be refused today. Creates nothing. | always |
save_server_as_template | Saves a server's launch settings as a private template; secret values are never copied (secretsToFill). | --allow-writes |
update_endpoint_settings | Changes an endpoint's workers, idle time, concurrency, spend cap, queue and job limits, rateLimitPerMinute (0 = platform limit) and autoRollback. | --allow-writes, confirm: true |
pause_endpoint | Refuses new requests and releases the workers. | --allow-writes, confirm: true |
resume_endpoint | Takes requests again; workers come back and bill. | --allow-writes, confirm: true |
submit_endpoint_job | Queues an async job with priority (-10 to 10), queueTtlSeconds (60 to 3600) and resultTtlSeconds (60 to 86400); input up to 1 MB. | --allow-writes, confirm: true |
cancel_endpoint_job | Cancels a job that has not finished. | --allow-writes, confirm: true |
retry_endpoint_job | Sends a failed, cancelled or expired job again as a new job (retryOf names the original). | --allow-writes, confirm: true |
purge_endpoint_queue | Cancels every job still waiting (running jobs untouched); dryRun counts them first. | --allow-writes, confirm: true |
cancel_scheduled_action | Cancels a pending scheduled action. | --allow-writes, confirm: true |
cancel_server_request | Cancels a launch request that waits for review. | --allow-writes, confirm: true |
update_alert | Changes an alert's level (thresholdPercent, minutes, amountUsd) or switches it on or off. | --allow-writes |
delete_alert | Deletes an alert. | --allow-writes, confirm: true |
unwatch_plan | Stops watching a plan. | --allow-writes |
test_webhook | Sends one webhook.test event to a webhook now. | --allow-writes |
check_registry_login | Tries a saved private registry login against the registry's own sign-in (nothing is pulled): accepted, refused, or unchecked with the reason. | always |
Left out on purpose, whatever the flags: moving money (credit transfers, promo codes, budgets, auto top-up, reserved
terms, raising a price cap), creating, rotating or revoking API keys, team members, roles and invitations, sub-account
changes and closure, secret values, stored registry and cloud credentials, and running commands on a server. The
reasons are listed per operation in docs/SURFACES.md.
New read-only tools in 0.1.20: list_alerts, get_alert, list_scheduled_actions (each answers with a plain
explanation while the platform has that feature switched off).
New tools in 0.1.14: quote_launch, get_topup_bonus (always offered), launch_server, stop_all_servers,
set_server_label, create_idle_alert, schedule_server_stop, add_ssh_key, create_topup_link (with
--allow-writes). destroy_server now needs serverName. Before 0.1.14 the changing tools were offered by default; add
--allow-writes to keep them.
Check that it starts
APIDLY_API_KEY=... apidly-mcp --read-only # prints "apidly-mcp 0.1.21 ready (read-only)" on stderr, then waits; Ctrl+C
The tool list is read when the client starts the server: restart it (or reload the client's MCP servers) after changing a flag.
Troubleshooting
HTTP 401 ... the API key was refused:APIDLY_API_KEYis wrong, expired or revoked. A server that does not start and asks forAPIDLY_API_KEYwas not given the client'senventry.HTTP 403 ... this key may not do that(insufficient_scope): the key's scope does not allow the call. Areadkey changes nothing;check_launchneeds a key that may launch servers; saving a template, endpoint settings and listing or testing webhooks need thefullscope (webhooks also an owner or admin key). Keys cannot be widened: create a new one.- The assistant cannot launch or stop anything, or a tool is missing: writes are off (no
--allow-writes, or--read-only/APIDLY_MCP_READ_ONLY=1, which always wins). The start line says(read-only)or(writes allowed). Not done. ... call again with confirm=true: intended; the tool costs money or can lose work and needs your yes.HTTP 429: reads are retried by themselves up to two more times when the wait is 30 seconds or less; changes never are. The error addsRetry after N seconds.feature_unavailable: that feature is switched off on the platform; the tool stays listed and changes nothing.No answer arrived, so it is not known whether ... happened: check first; a repeat with theidempotencyKeythe error names is safe.[cut: N more characters; narrow the request]: one answer is limited to 60,000 characters; filter, lowerlimitor page withcursor.
Full guide: https://apidly.com/docs/mcp