Skip to main content
Glama

@apidly/mcp

License: Apache-2.0 CI Node 18+ Docs

Part of Apidly, the AI developer platform from APIDLY LTD: GPU servers, serverless inference and model APIs, billed per second with no subscription.

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 ./apidly-mcp-0.1.41.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_launch prices a plan and template per running hour without creating anything. quote_launch, check_launch and launch_server also take constraints (the hardware the machine must have, the same object as deploy_server). launch_server (from a Quick start goal such as images, or a plan and template) needs maxHourlyUsd and refuses when the quoted price is higher. --max-hourly-usd N (or APIDLY_MCP_MAX_HOURLY_USD) caps every launch of the session, including deploy_server, clone_server and launch_again, whatever the assistant asks. The agreed price travels with every launch: when the price rises in the meantime, the API refuses (price_changed), nothing is started, and the tool tells the assistant both prices so it can ask you again. A copy or a repeated request is agreed at the price of the original unless maxHourlyUsd says otherwise. check_launch asks the API itself (plan id, template id and diskGb, with a key that may launch servers) and also answers wouldLaunch and blockers: use quote_launch while comparing plans and check_launch right before launching. Both are offered without --allow-writes and spend nothing. launch_server also takes volumeId (with volumeMountPath) to mount a free volume and variableSetIds (up to 5) to attach saved variable sets, like apidly deploy with --volume, --mount and --var-set.

  • 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_link only 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, or feature_unavailable when 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.

Related MCP server: Create app hosting

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, cpuFamily, minDiskBandwidthMBps, minPcieBandwidthGBps, staticIp, minDownMbps, minUpMbps, minCudaMajor, directPorts, reliability (high), maxInterruptiblePriceUsd, 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, cursor

list_endpoint_requests

status (all, 2xx, 4xx, 5xx, queued_out), kind (all, proxy, job), before

list_support_tickets

status (open, pending, closed), cursor

list_volumes

cursor

list_ssh_keys

cursor

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, prices, balance, budget, metrics) are sent as plain JSON; quote_launch is marked as data, since it names the template, which can be one the organization wrote.

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.

Protocol revisions

The server speaks the handshake revisions (initialize, versions 2024-11-05 to 2025-11-25) and the stateless revision 2026-07-28: there, a request names its version in _meta, server/discover returns versions, capabilities and identity, and tools/list carries ttlMs and cacheScope. A request naming a version the server does not know gets UnsupportedProtocolVersion (-32022) with the versions it supports. The tool list is one page, so a cursor is refused.

Check that it starts

APIDLY_API_KEY=... apidly-mcp --read-only    # prints "apidly-mcp 0.1.35 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_KEY is wrong, expired or revoked. A server that does not start and asks for APIDLY_API_KEY was not given the client's env entry.

  • HTTP 403 ... this key may not do that (insufficient_scope): the key's scope does not allow the call. A read key changes nothing; check_launch needs a key that may launch servers; saving a template, endpoint settings and listing or testing webhooks need the full scope (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 adds Retry 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 the idempotencyKey the error names is safe.

  • [cut: N more characters; narrow the request]: one answer is limited to 60,000 characters; filter, lower limit or page with cursor.

Full guide: https://apidly.com/docs/mcp

Install from a registry

Once the first release is on the registry: npm install -g @apidly/mcp. Until then use the self-hosted download described above.

Examples

The examples/ folder has client configurations for read-only use and for capped write access. Full documentation: https://apidly.com/docs.

Changelog

See CHANGELOG.md and https://apidly.com/changelog.

Contributing and license

See CONTRIBUTING.md, SECURITY.md and CODE_OF_CONDUCT.md. Licensed under the Apache License 2.0. Copyright 2026 APIDLY LTD.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to inspect and manage OpenStack clouds, including listing instances, checking quotas, and retrieving console logs. It supports opt-in write operations for creating and deleting servers, with a read-only default.
      12
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to create projects, deploy files, container images, or Git repositories, attach domains, set write-only secrets, add Postgres, read logs, metrics, and failure summaries, and roll back.
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Gives AI assistants read access to MDRN's workspaces, projects, products, builds, releases, deployments and logs, plus safe write actions such as deploying a connected repository, rolling back, toggling products and managing service variables and services.
      11 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to inspect, query, and diagnose projects, deployments, releases, runbooks, tasks, tenants, Kubernetes resources, machines, certificates, accounts, and interruptions, with optional write operations and read-only safeguards.
      547 npm
      MIT