Skip to main content
Glama
wuzihuang

AutoDL MCP Server

by wuzihuang

Version MCP Tools Docs CI License

Lets Codex manage AutoDL GPU resources safely and explainably.

Typed MCP tools · Documentation-aware Skill · Confirmation gates · Credential redaction


What is this?

AutoDL Plugin is a community plugin for Codex that wraps the AutoDL official developer API and full help documentation into two layers of capability:

  1. AutoDL MCP Server: 26 tools with explicit parameters and validation, responsible for querying balances, managing Container Instances Pro, operating Elastic Deployment, querying image/GPU stock, reading duration packages, sending WeChat notifications, and fetching container metrics.

  2. AutoDL Skill: Lets the Agent understand AutoDL billing, data retention, system disk/data disk, images, networking, SSH, CUDA, training environments, and permission boundaries, and follow the correct flow before high-risk operations.

It is not a simple "HTTP interface forwarder." The plugin distinguishes between read-only, state-changing, billing, and destructive operations; before actually creating, powering on, powering off, releasing, scaling, deleting, or sending messages, it must pass through a confirmation gate.

[!IMPORTANT] This is a community integration, not an official AutoDL product. Actual service capabilities, prices, stock, quotas, and rules are subject to the AutoDL website and official documentation.

Related MCP server: AutoDL MCP Server

Highlights

  • 26 typed MCP tools: each interface has its own name, parameter descriptions, and input validation.

  • Safety confirmation gates: state-changing operations only return a request preview when confirm=false, without contacting AutoDL.

  • Credential protection: instance details redact root_password and jupyter_token by default.

  • Token isolation: the developer Token is only read from the local environment, never entering source code, tool output, or test fixtures.

  • Full documentation awareness: indexes 103/103 pages and 463 search entries from the official help site.

  • Documentation drift checking: can re-fetch the official catalog and generate a page status and SHA-256 manifest.

  • Real MCP tests: all tools are invoked through a stdio handshake rather than only testing internal functions.

  • Production read-only verification: balance, Pro instance list, and Pro image list have been verified against the real AutoDL API.

Architecture

flowchart LR
    U["User / Codex"] --> S["AutoDL Skill"]
    S -->|"选择工具与安全流程"| M["Typed MCP Server"]
    M --> G{"Confirmation gate"}
    G -->|"只读"| A["AutoDL Developer API"]
    G -->|"变更且 confirm=true"| A
    G -->|"confirm=false"| P["Request preview only"]
    A --> R["Redaction + structured result"]
    R --> U
    D["103 official docs pages"] --> S

Quick start

1. Clone and install

git clone https://github.com/wuzihuang/AUTODL-PLUGIN.git
cd AUTODL-PLUGIN
npm install

Requirements: Node.js 20 or higher.

2. Configure the AutoDL Token

Get the developer Token in the account settings of the AutoDL console, then create a local environment file:

cp .env.example .env

Edit .env:

AUTODL_TOKEN=你的开发者Token

.env is ignored by Git. Do not write a real Token into the README, config examples, Issues, logs, or commit history.

You can also skip creating .env and instead provide it in the environment where Codex is launched:

export AUTODL_TOKEN='你的开发者Token'

3. Load the plugin in Codex

Select this repository root in a Codex that supports local plugins. Codex will:

  • discover the AutoDL Skill via .codex-plugin/plugin.json;

  • start the local AutoDL MCP Server via .mcp.json.

If your client does not support local plugins yet, you can configure MCP manually:

{
  "mcpServers": {
    "autodl": {
      "command": "bash",
      "args": ["/absolute/path/AUTODL-PLUGIN/scripts/start-mcp.sh"],
      "cwd": "/absolute/path/AUTODL-PLUGIN"
    }
  }
}

The Skill can also be installed on its own:

cp -R skills/autodl ~/.codex/skills/autodl

4. Try asking things like

  • "Check my AutoDL balance and convert the amount to RMB yuan."

  • "List my Pro instances and tell me which ones are still being billed."

  • "Query the RTX 4090 Elastic Deployment stock in westDC2."

  • "I want to create a single-GPU instance; first give me a parameter and cost-risk preview, do not create it directly."

  • "Before saving this instance's environment, which data do I still need to back up separately?"

  • "Why is the CUDA version in nvidia-smi different from the CUDA in the environment?"

MCP tools at a glance

Account and storage

Tool

Purpose

Type

autodl_wallet_balance

Get balance, cumulative spend, and voucher balance

Read-only

autodl_switch_exclusive_nfs

Switch dedicated NFS / normal file storage

Requires confirmation

Container Instances Pro

Tool

Purpose

Type

autodl_pro_create_instance

Create a pay-as-you-go Pro instance

Billing, requires confirmation

autodl_pro_instance_snapshot

Get instance hardware, utilization, and connection info

Read-only, redacted by default

autodl_pro_instance_status

Get instance status

Read-only

autodl_pro_list_instances

List instances with pagination

Read-only

autodl_pro_power_on

Power on in GPU mode

Billing, requires confirmation

autodl_pro_power_off

Power off

Requires confirmation

autodl_pro_release_instance

Permanently release an instance

Destructive, requires confirmation

autodl_pro_save_image

Save the system disk as a private image

Requires confirmation

autodl_pro_list_private_images

Query Pro private images and save status

Read-only

Elastic Deployment

Tool

Purpose

Type

autodl_esd_list_private_images

Get private images available for Elastic Deployment

Read-only

autodl_esd_create_deployment

Create a ReplicaSet, Job, or Container

Billing, requires confirmation

autodl_esd_list_deployments

Query deployments

Read-only

autodl_esd_list_container_events

Poll container lifecycle events

Read-only

autodl_esd_list_containers

Query containers, status, and connection info

Read-only

autodl_esd_stop_container

Stop a specified container

Requires confirmation

autodl_esd_set_replica_num

Adjust the ReplicaSet replica count

Billing/interruption risk, requires confirmation

autodl_esd_stop_deployment

Stop an entire deployment

Requires confirmation

autodl_esd_delete_deployment

Stop and permanently delete a deployment

Destructive, requires confirmation

autodl_esd_set_blacklist

Add the host of an abnormal container to the scheduling blacklist

Requires confirmation

autodl_esd_list_blacklist

Get the active scheduling blacklist

Read-only

autodl_esd_gpu_stock

Query regional GPU total and idle capacity

Read-only

autodl_esd_ddp_overview

Get purchased duration package balance

Read-only

Notifications and monitoring

Tool

Purpose

Type

autodl_send_wechat_message

Send a notification to the WeChat bound to the account

External message, requires confirmation

autodl_local_metrics

Get container CPU, memory, and GPU metrics

Read-only, must be reachable inside the container

For full fields, interface paths, region codes, GPU specs, and base image examples, see API Reference.

Permission matrix

Capability

Regular Token

Individual/Enterprise real-name verification

Enterprise verification with product permissions

Account balance

Container Instances Pro

Elastic Deployment

Elastic Deployment GPU stock

Container performance monitoring

WeChat notifications

WeChat binding required

WeChat binding required

WeChat binding required

If the API returns "no access permission for the current resource," the plugin explains it as an authentication or product permission issue rather than misreporting it as an MCP failure.

Security model

Confirmation gates

All tools that incur costs, change state, stop workloads, delete data, or send external messages have a confirm parameter:

confirm=false  → 返回方法、路径、目标与参数预览,不发送网络请求
confirm=true   → 执行真实 AutoDL API 请求

The Agent should still explain to the user before executing:

  • the exact instance, deployment, or container ID;

  • the number of GPUs, instances, or replicas;

  • the price cap and billing impact;

  • whether training or services will be interrupted;

  • whether the system disk and data disk have been backed up.

Data and credentials

  • root_password and jupyter_token display as [REDACTED] by default.

  • Local metric requests do not carry the AutoDL developer Token.

  • The Token never appears in MCP structured results or error results.

  • Releasing instances and deleting deployments are marked as destructive.

  • The Pro instance release flow requires powering off first.

AutoDL usage boundaries

  • Using resources for cryptocurrency mining is strictly prohibited.

  • The local system disk and data disk have no redundancy reliability guarantee; important data must be backed up.

  • Mapped service addresses should be kept private and comply with the AutoDL custom service agreement.

  • Current prices, promotions, stock, regions, quotas, and policy dates must be verified in real time.

For more rules, see Operations Guide and Security Policy.

Key technical details

  • API Host: https://api.autodl.com

  • Authentication: Authorization: <raw token>, without Bearer

  • Success check: code === "Success"

  • Amounts: the relevant integer in the API divided by 1000 is the amount in RMB yuan

  • CUDA encoding: e.g. 118 means CUDA 11.8

  • Pro status/details: defined by the official docs as GET + JSON body

  • GPU stock: based on single-GPU scheduling semantics; cannot prove that multiple GPUs are on the same host

  • Dedicated NFS: mountable=1; switch back to normal file storage: mountable=-1

Configuration

Environment variable

Default

Description

AUTODL_TOKEN

None

Required, AutoDL developer Token

AUTODL_BASE_URL

https://api.autodl.com

Developer API root address

AUTODL_WEB_BASE_URL

https://www.autodl.com

WeChat message interface root address

AUTODL_METRICS_URL

http://127.0.0.1:2022/autopanel/v1/api/monitor/current

Container local metrics address

AUTODL_REQUEST_TIMEOUT_MS

20000

Request timeout, in milliseconds

Testing

Full automated tests

npm test

Tests include:

  • Codex plugin manifest and MCP configuration validation;

  • Skill frontmatter, referenced files, and 26/26 tool coverage;

  • 103/103 official documentation page manifest;

  • MCP stdio initialization and tool discovery;

  • 26/26 tools with full mock invocation;

  • HTTP method, path, query, and GET JSON body;

  • no network calls for unconfirmed state changes;

  • AutoDL business error mapping;

  • no Token leakage;

  • instance credentials redacted by default;

  • local metric requests do not carry the Token.

Production read-only tests

npm run test:live

This command only reads information such as balance, instances, images, deployments, and blacklists; it does not create or modify resources. Enterprise interfaces without permission are marked as SKIP/PERMISSION.

Current verification records:

  • Account balance: HTTP 200

  • Pro instance list: HTTP 200

  • Pro private image list: HTTP 200

  • Elastic Deployment: test account has no access permission, safely skipped

  • Pro status/details: test account has no existing instances, conditionally skipped

See full test report for details.

Official documentation coverage

The documentation refresh script reads AutoDL's MkDocs search index, checks the body of each page, and generates:

Current snapshot:

Metric

Count

Search index entries

463

Actual pages

103

Accessible pages

103

Core API operations

24

Help site supplementary APIs

2

Refresh:

npm run docs:refresh
npm test

The repository does not copy the entire AutoDL documentation site; it only stores route indexes, summary rules, and hash metadata. For prices, authentication, stock, quotas, and policies, re-check the official pages.

Project structure

AUTODL-PLUGIN/
├── .codex-plugin/plugin.json      # Codex 插件清单
├── .mcp.json                      # MCP 自动发现配置
├── assets/                        # Logo 与 README Banner
├── mcp/
│   ├── src/                       # MCP Server 与 AutoDL HTTP Client
│   └── test/                      # 全工具契约测试、只读实时测试
├── skills/autodl/
│   ├── SKILL.md                   # Agent 工作流与安全规则
│   ├── references/                # API、运维规则、文档索引
│   └── scripts/                   # 文档刷新与 Skill 校验
├── scripts/
│   ├── start-mcp.sh               # 插件 MCP 启动入口
│   └── validate-plugin.mjs        # 插件与敏感信息校验
├── docs/TEST_REPORT.md
└── .github/workflows/ci.yml

Development and contributions

Contributions of new public interfaces, response samples, permission descriptions, and documentation drift fixes are welcome. Please read CONTRIBUTING.md first.

Basic flow:

npm install
npm test

When adding a new state-changing interface, you must:

  1. use a dedicated typed tool;

  2. add a confirm preview gate;

  3. describe billing, interruption, and data impact;

  4. add mock contract tests;

  5. not run destructive CI tests against a real account.

License

MIT

The AutoDL name, services, and official documentation belong to their respective rights holders. This project only provides a community integration and does not represent an official AutoDL endorsement.


Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wuzihuang/AUTODL-PLUGIN'

If you have feedback or need assistance with the MCP directory API, please join our Discord server