All documentation

AI assistants and MCP: uc mcp

Connect UniCloud to Claude Code, Cursor and Claude Desktop through the MCP server in uc: resources, status, logs, folder deploys, rollback, variables and domains.

uc mcp is a Model Context Protocol server built into the uc command line. An AI assistant (Claude Code, Cursor, Claude Desktop and other MCP clients) starts it by itself and gets tools for your resources: list them and check their status, read logs, deploy a folder, roll back a release, restart, change variables and attach a domain. Nothing else to install: the server is the same uc file, with no Node.js and no third-party packages. It talks over standard input and output (JSON-RPC 2.0); the only outside connection uc makes is to the public API of the platform.

Before you start

  1. Install uc and sign in: uc login --url https://<panel address> (see the command line article).
  2. Choose the token scope in the panel. Read-only: the assistant sees resources, status and logs but changes nothing. Full access: deploys, rollback, restarts, variables and domains too.

The server uses the same login as uc: the saved token or the UC_TOKEN and UC_URL variables.

Connect

claude mcp add unicloud -- uc mcp

For all projects at once: claude mcp add --scope user unicloud -- uc mcp. Check with claude mcp list, or /mcp inside a session.

.cursor/mcp.json in the project folder (or ~/.cursor/mcp.json for every project):

{
  "mcpServers": {
    "unicloud": { "command": "uc", "args": ["mcp"] }
  }
}

Cursor lists the server under Settings → MCP.

Settings → Developer → Edit Config opens claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\). Claude Desktop does not read the PATH of your terminal, so give the full path to uc, and set the deploy folder with --root:

{
  "mcpServers": {
    "unicloud": {
      "command": "/Users/you/.local/bin/uc",
      "args": ["mcp", "--root", "/Users/you/projects"]
    }
  }
}

On Windows: "command": "C:\\Users\\you\\AppData\\Local\\Programs\\unicloud\\uc.exe". Restart Claude Desktop after editing.

Tools

ToolWhat it doesScope
list_resourcesall resources: name, id, kind, state, plan, URLread
resource_statusstate, release, last deploys, domains, variable namesread
resource_logslast log lines (tail, up to 2000)read
list_envenvironment variable names, without valuesread
list_domainscustom domains of a resource and their verificationread
source_settingswhere an app is built from: folder, Dockerfile, auto-deploy paths and triggerread
deploy_folderpack a folder (honouring .gitignore and .ucignore), deploy it and wait for the buildwrite
rollbackreturn to the previous working release without a buildwrite
restart_resourcerestartwrite
set_envset and remove variables; values are not echoed backwrite
set_source_settingschange the build folder, Dockerfile, auto-deploy paths or trigger (only the given fields)write
add_domain, verify_domainattach a domain and check its DNSwrite
stop_resource, remove_domain, delete_resourcestop, detach a domain, delete with dataonly with --allow-destructive

Safety

  • Token scope. With a read-only token the assistant does not even see the write tools, and calling one is refused without a request to the server. The platform checks the scope again on its side.
  • Dangerous actions are off. Stopping, detaching a domain and deleting appear only with uc mcp --allow-destructive; deleting also requires repeating the resource name.
  • Secrets. The assistant gets variable names, not values. If it really needs them, start the server with --env-values.
  • Folders. deploy_folder only takes a folder inside the working folder of the server: the project folder in Claude Code and Cursor, otherwise set by --root. Links pointing outside do not help.
  • Audit. Every action goes through the API with your token and shows up in the account events. To revoke access, delete the token under Account → API tokens.

Flags

FlagEffect
--allow-destructivestop, detach domain and delete tools
--env-valueslist_env with show_values: true returns values
--root <folder>where deploys are allowed (the start folder by default)

The server writes only protocol messages to stdout; service lines go to stderr, where the MCP log of your client shows them.