Skip to main content
Glama

AutoDL MCP and CLI

Rent and manage AutoDL GPUs from your terminal, Codex, or Claude Code.

CI Release Python 3.11+ MIT

An Ubuntu-friendly CLI and local stdio MCP server for ordinary AutoDL GPU rentals. Find machines, preview orders, rent instances, start and stop them, and save images. Sign in from Windows, Ubuntu, or an iPad.

This is an independent, unofficial project. It uses AutoDL's web-console endpoints through a pinned community backend; those endpoints can change. Art applications and Pro instances are separate products.

Install on Ubuntu

Requires Python 3.11+. Ubuntu 24.04 includes a suitable Python. Install venv support if needed:

sudo apt-get update
sudo apt-get install -y python3-venv curl

Download and install the versioned release:

curl -fL https://github.com/intqwq/autodl-mcp-cli/releases/download/v0.8.0/autodl-0.8.0.tar.gz -o autodl-0.8.0.tar.gz
tar -xzf autodl-0.8.0.tar.gz
cd autodl-0.8.0
bash install.sh
export PATH="$HOME/.local/bin:$PATH"
autodl --version

Add that export PATH=... line to ~/.bashrc if ~/.local/bin is not already on your PATH. The application runs as your normal user in an isolated venv; do not run install.sh with sudo.

Alternatively, install from source:

git clone https://github.com/intqwq/autodl-mcp-cli.git
cd autodl-mcp-cli
git checkout v0.8.0
bash install.sh

For pipx users, the release also includes a standard Python wheel:

pipx install 'https://github.com/intqwq/autodl-mcp-cli/releases/download/v0.8.0/autodl_classic_agent-0.8.0-py3-none-any.whl'

Use one installation method. The Python distribution retains the name autodl-classic-agent for compatibility; the app commands are autodl and autodl-mcp.

Related MCP server: projtool

Sign in from Windows or Ubuntu

Run autodl-desktop-login on a computer with a desktop. Sign in on AutoDL's own login page. The script saves your session automatically after sign-in. Pass --ssh USER@HOST to verify and save it on the Ubuntu host running Codex. See the desktop login manual for PowerShell, Ubuntu, and manual transfer instructions.

Sign in from an iPad

No DevTools, headers, server browser, or port forwarding is needed.

  1. Follow the iPad login guide to create a two-action Shortcut: Run JavaScript on Web Page → Copy to Clipboard.

  2. Enable Show in Share Sheet and accept Safari Web Pages. The script is printed by autodl auth ipad-script.

  3. Sign in normally at AutoDL in Safari, then run AutoDL Login from Safari's Share menu. The shortcut is in the action list below the row of app icons; scroll down if necessary.

  4. In your server's SSH terminal:

    autodl auth login
    autodl --json account me
    autodl --json instance list

Paste the copied session into the hidden login prompt. Verification has a 20-second deadline and preserves an existing session if it fails. Copy ordinary text afterward to clear the session from your clipboard. The session is a secret: never paste it into an agent conversation, GitHub issue, or log.

Credentials are stored in ~/.autodl-cli/config.toml with mode 0600. Run your agents under the same Unix user. AUTODL_CLI_HOME overrides that directory. A session can expire; repeat this login flow when required.

Connect your agents

Register the bundled MCP server once on the Ubuntu host. It reuses your saved AutoDL login, and each client starts its own process; there is no daemon or port.

Codex CLI:

codex mcp add autodl -- "$HOME/.local/bin/autodl-mcp" --allow-writes
codex mcp list

Claude Code, across all projects:

claude mcp add --transport stdio --scope user autodl -- \
  "$HOME/.local/bin/autodl-mcp" --allow-writes
claude mcp list

Open a new session and check /mcp. Then ask:

Use AutoDL to list my instances and find available RTX 5090 machines. Show me hourly prices before renting anything.

Server option

Effect

No flags

Read-only tools, live usage, clone and disk price previews, and offline plan_rental

--allow-writes

Enables rental, clone, start, stop, rename, reset, timers, disk growth, release, and image saving

--allow-secrets

Allows instance SSH/Jupyter credentials in results

--timeout 180

Sets the command timeout in seconds; maximum 600

Renting, cloning, starting, and expanding disks can incur charges. Stop interrupts work, and release deletes instance data. shutdown-at sets an AutoDL shutdown timer. The tool has no spending cap or background watchdog. Instance credentials are masked by default; the configured web login token is filtered even with --allow-secrets. Agents with shell access under your Unix account can still read that account's files.

See agent operating guidance and configuration examples. When using pipx, replace the executable path above if your pipx binary directory differs from ~/.local/bin.

Terminal workflow

# Inspect inventory and choose actual machine/image IDs from the results.
autodl --json account balance
autodl --json gpu find 5090 -a
autodl --json gpu machines --gpu "EXACT_GPU_NAME" --idle 1 --sort price
autodl --json image list -f pytorch
autodl --json image list-private

# Offline preview: no login or API request.
autodl plan --machine-id MACHINE_ID --image IMAGE_UUID --gpu-num 1

# Rent a machine (billable), then inspect its state.
autodl --json instance create --machine-id MACHINE_ID --image IMAGE_UUID
autodl --json instance list
autodl --json instance detail INSTANCE_UUID

# Lifecycle operations.
autodl --json instance power-on INSTANCE_UUID
autodl --json instance power-off INSTANCE_UUID

# Permanently release an instance and its data.
autodl --json instance release INSTANCE_UUID --yes

Creation accepts --gpu-num, --name, and --data-disk GB. Use --private-image IMAGE_UUID instead of --image for a saved image. For the offline planner, use --image IMAGE_UUID --private-image.

The pinned backend's JSON money fields use thousandths of a yuan. Verify whether a price is per GPU or per instance and account for extra storage. Inventory can change between listing and ordering. If a mutation times out, list instances before trying again. Poll instance list by exact UUID for state changes; instance detail is a configuration snapshot.

Use SSH separately to run jobs and transfer files. This tool creates PAYG rentals; it does not purchase or renew monthly plans.

More ordinary instance operations

Task

CLI command

Boot a stopped PAYG instance without GPUs

autodl instance power-on INSTANCE_UUID --no-gpu

Read current CPU, RAM, GPU count, and disk usage

autodl instance monitor INSTANCE_UUID

Change the display name

autodl instance rename INSTANCE_UUID 'My experiment'

Restore the system disk from the configured image

autodl instance reset INSTANCE_UUID --yes

Schedule shutdown in AutoDL

autodl instance shutdown-at INSTANCE_UUID '2027-01-01T20:30+08:00'

Cancel the shutdown timer

autodl instance cancel-shutdown INSTANCE_UUID

Quote 50 GiB of additional data disk

autodl instance disk-quote INSTANCE_UUID --add-gib 50

Add 50 GiB to the data disk

autodl instance disk-grow INSTANCE_UUID --add-gib 50

No-GPU mode still incurs a charge. The command requests that mode explicitly and reports a provider rejection without retrying with a GPU. Shutdown times need an explicit UTC offset. Pass your own future time in place of the example. Disk expansion can require a restart before the new capacity appears.

Reset an instance

Stop the instance and check its exact UUID and status with autodl instance list. Reset restores the configured image and erases changes on the system disk. AutoDL preserves the separate data disk at /root/autodl-tmp. See AutoDL's reset documentation.

The CLI requires --yes. In MCP, use autodl_instance_reset with yes: true only after the user authorizes resetting that UUID. After the request is accepted, check instance list for completion before starting the instance.

Clone an instance

Stop the source first. Select a compatible machine in the same region from autodl --json gpu machines. Use the same options for preview and submission:

autodl instance clone-plan SOURCE_UUID --machine-id DEST_MACHINE_ID --gpu-num 1 --copy-data-disk
autodl instance clone SOURCE_UUID --machine-id DEST_MACHINE_ID --gpu-num 1 --copy-data-disk

Cloning copies the system disk to a new PAYG instance. --copy-data-disk also copies the data disk. --data-disk sets the destination's extra disk in GiB. When copying the data disk, it defaults to the source's extra capacity. The preview shows the requested order and the provider's destination price estimate. It does not reserve capacity. The clone returns the new UUID when accepted. Poll instance list to follow its progress. If a request times out, check for the destination before repeating it.

These features use the ordinary AutoDL web console and are tested offline against request shapes observed in its frontend. No-GPU mode and same-region cloning are described in AutoDL's guides.

Upgrade an existing installation

Download the new release and run bash install.sh again. Existing 0.2–0.6 installer deployments upgrade in place and reuse the saved session. Fresh deployments use ~/.local/share/autodl/venv; older deployments keep their existing venv path. Existing autodl-classic command aliases remain available.

AUTODL_AGENT_INSTALL_ROOT and AUTODL_AGENT_BIN_DIR override installation paths. Legacy AUTODL_CLASSIC_* overrides are still accepted. Unrelated executables are never overwritten by the installer.

bash uninstall-old.sh removes only the recognized original Art installation; it is unnecessary for ordinary version upgrades. If an MCP entry still uses the old server name, remove that specific duplicate and register autodl.

Development and releases

See CONTRIBUTING.md, the changelog, and release instructions. Tests cover mocked API contracts, session handling, actual stdio MCP discovery, and the iPad JavaScript fixture. They do not rent GPUs or use a real account. The Safari login flow has been confirmed by the original user; CI does not exercise live account operations.

MIT licensed. Backend attribution and pinned versions are documented in THIRD_PARTY_NOTICES.md. AutoDL is a third-party service; this project is not affiliated with or endorsed by its operator.

Available Tools

13 tools
autodl_account_balanceC

Show the account balance.

CLI: autodl account balance [ARGS] [OPTIONS]

Inputs: json, charge_type. Returns: result

autodl_account_meC

Show the authenticated account profile.

CLI: autodl account me [ARGS] [OPTIONS]

Inputs: json. Returns: result

autodl_gpu_findC

Search GPU models across regions.

CLI: autodl gpu find [ARGS] [OPTIONS]

Inputs: model (required), json, region, available. Returns: result

autodl_gpu_listC

Show GPU availability in one or more regions.

CLI: autodl gpu list [ARGS] [OPTIONS]

Inputs: json, region, available. Returns: result

autodl_gpu_machinesC

List individual GPU machines with idle capacity.

CLI: autodl gpu machines [ARGS] [OPTIONS]

Inputs: all, gpu, chip, idle, +14 more. Returns: result

autodl_image_listC

Show the base images available for new instances.

CLI: autodl image list [ARGS] [OPTIONS]

Inputs: chip, cuda, json, python, +3 more. Returns: result

autodl_image_list_privateC

List the private images saved from your instances.

CLI: autodl image list-private [ARGS] [OPTIONS]

Inputs: json, page_size. Returns: result

autodl_instance_clone_planB

Preview a clone request and destination PAYG pricing without placing an order.

CLI: autodl instance clone-plan [ARGS] [OPTIONS]

Inputs: machine_id (required), instance_uuid (required), json, gpu_num, +2 more. Returns: result

autodl_instance_detailC

Show one instance's configuration and machine details.

CLI: autodl instance detail [ARGS] [OPTIONS]

Inputs: instance_uuid (required), json. Returns: result

autodl_instance_disk_quoteC

Read pricing and the expansion limit for adding space to a data disk.

CLI: autodl instance disk-quote [ARGS] [OPTIONS]

Inputs: add_gib (required), instance_uuid (required), json. Returns: result

autodl_instance_listC

List every instance on the account.

CLI: autodl instance list [ARGS] [OPTIONS]

Inputs: json, query, status, sub_name, +3 more. Returns: result

autodl_instance_monitorB

Read a live instance snapshot with CPU, RAM, GPU count, and disk usage.

CLI: autodl instance monitor [ARGS] [OPTIONS]

Inputs: instance_uuid (required), json. Returns: result

plan_rentalB
Read-only

Preview and validate the exact classic PAYG order body offline, without credentials or HTTP.

Get machine_id from gpu_machines and image_uuid from image_list/list_private. This previews creation; it does not check availability, price or account quota.

Inputs: image_uuid (required), machine_id (required), name, gpu_amount, +2 more. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 13 tools

    Disambiguation4/5

    Most tools map to distinct resources and actions, with clear separation between account, image, instance, and GPU operations. The main ambiguity is among the GPU tools (find vs. list vs. machines), which all involve discovering available GPUs and could be confused without careful reading.

    Naming Consistency4/5

    Nearly all tools follow a consistent autodl_<resource>_<action> snake_case pattern, making them predictable. The single outlier, plan_rental, lacks the autodl_ prefix and uses a different naming style, but the rest of the set is coherent.

    Tool Count5/5

    13 tools is a well-scoped size for this server's apparent focus on inspecting and planning AutoDL resources. Each tool covers a distinct query or preview operation without excessive surface area.

    Completeness2/5

    The tool surface is almost entirely read-only and preview-oriented: it can inspect instances, GPUs, images, account data, and preview rental plans, but it cannot actually create, start, stop, delete, clone, or expand anything. These are significant lifecycle gaps for a server named AutoDL MCP, and an agent would hit dead ends when trying to perform real management actions.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Enables management of Verda Cloud GPU instances through Claude, allowing users to deploy spot instances, attach volumes, and monitor status. It supports automated workflows for checking availability and configuring instances with startup scripts.
      20
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables ML researchers to manage experiments across local and remote AutoDL GPU instances, including experiment creation, training launch, run polling, and report writing via Claude Code.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to work with a GPU cloud: check live GPU prices, launch GPUs on ready images, run commands as jobs that stop billing when the command exits, schedule runs, move files, and check spend. Access is scoped to one signed-in environment and capped by its monthly budget.
      MIT