Xuda logo Xuda Docs User Guides
/
xuda.io
← All guides Full Stack VPS

Xuda Full Stack VPS API Reference

Source file: xuda-full-stack-vps-api-reference.md

Xuda Full Stack VPS API Reference

This reference covers the programmable surface of a Xuda Full Stack VPS: the method that provisions the box, the hosting and operations methods its auto-issued scoped key can call, and the dashboard-session methods behind its own tabs. It is written for developers pointing their own code, the xuda CLI, codex or an AI agent at a Full Stack VPS over the platform's MCP endpoint, and for anyone who needs to know exactly which calls a box's key is and is not allowed to make. Every method key, parameter name, type and required flag below is taken from the shipped method contract.

How To Call These Methods

Every method here is a CPI method. CPI methods are dispatched by name over the Xuda API and MCP layer, and the normal credential for that layer is the account API key. Each call returns the standard { code, data } envelope, where a negative code is a failure with the reason in data. For the transport-level detail, including how requests are framed and how the MCP layer exposes methods, see /api-mcp-integration.

A Full Stack VPS is a special case worth understanding before you write any code against it, because the box comes with its own credential:

  • The box is issued a scoped CPI API key before it is provisioned. The key is created with scope: 'full_stack_vps' and api_access: 'custom', named <box name> (full stack vps), and its id is stamped on the app document as full_stack_vps.api_key_id. You reveal and copy it from the box's API Keys tab.
  • A scoped key may call only the methods in its allowlist. The allowlist is the expansion of the capability groups you selected on the wizard's Tools step. A key with api_access: 'full' may call any non-private method; a scoped key may call only its api_allow_methods.
  • The whole enabled surface is also exposed over one MCP endpoint. The platform MCP server accepts Authorization: Bearer <api_key> on POST /mcp, looks the key up, and registers one MCP tool per allowlisted method. The endpoint URL is written onto the box's document as full_stack_vps.mcp_url and is shown with a Copy button on the box's Tools tab.
  • The box's installed plugins also become MCP tools, but only for a key whose scope is full_stack_vps. See "Plugin Tools Over MCP" below.

The MCP endpoint of a Full Stack VPS is not the same thing as the separate mcp deploy type. The deploy type provisions an MCP server as its own app; the endpoint described here is the platform's own MCP server answering for your box's key.

What The Availability Labels Mean

Every method below carries one explicit availability line. Read it first, because it tells you whether you can call the method from your own code today. Availability is decided by the private flag in the platform's method contract.

  • Availability: API key means the method has no private flag, so an external developer API key or the MCP layer can call it. A full-access key can call it directly; a Full Stack VPS's scoped key can call it if the method is in the key's allowlist.
  • Availability: Dashboard session means the method is flagged private: true. It is refused for a full-access key and it is skipped by the MCP tool registrar, so it is not callable from your own code with a key. The account identity comes from the signed-in session.
  • Availability: Public endpoint means no authentication at all. No Full Stack VPS method currently carries this label.
  • Availability: Operator only means Xuda staff, listed only for completeness. No Full Stack VPS method currently carries this label.

One nuance worth recording: the custom-key branch of the key check reads only the allowlist and does not re-check private, so a scoped key whose allowlist happened to contain a private method would pass the key check even though MCP would still not surface it as a tool. None of the 81 methods in the shipped Full Stack VPS catalog is private, so this does not arise in practice.

Method Index

Method What It Does
deploy_full_stack_vps Provisions a Full Stack VPS with its scoped CPI key, project database and toolchain.
vps_fs_list Lists a directory on the box over SFTP with typed entries.
vps_fs_read Reads a file on the box, detecting text, image or binary.
vps_fs_write Creates or overwrites a single file on the box.
vps_fs_write_batch Writes many files in one SFTP session, creating parent directories.
vps_fs_delete Deletes a file, or a directory recursively.
vps_fs_mkdir Creates a directory recursively.
vps_fs_rename Renames or moves a file or directory.
vps_fs_search Searches a subtree by filename or by file contents.
vps_fs_tail Returns the tail of a file, with a byte offset for live following.
vps_fs_disk_usage Returns one-level disk usage of a directory, largest children first.
vps_fs_service_action Runs a bounded service action such as an nginx reload or a systemctl verb.
vps_enable_web_url Gives the box a public xuda.app URL that proxies to its web server.
vps_set_web_port Changes the upstream port and scheme the public URL proxies to.
vps_disable_web_url Stops serving the public URL while keeping the subdomain reserved.
vps_enable_ssh Enables SSH and SFTP over WebSocket and returns the connect commands.
vps_rotate_ssh_token Issues a fresh connect token and invalidates the previous one.
vps_disable_ssh Disables SSH over WebSocket while keeping the subdomain.
agent_firewall_list Lists the box's inbound firewall rules for an agent.
agent_firewall_open Opens inbound TCP ports, seeding port 22 on first attach.
agent_firewall_close Closes inbound TCP ports, refusing to close port 22.
get_app_firewall Reads the app's firewall document and its inbound rules.
configure_app_firewall Writes the app's firewall configuration.
agent_domain_list Lists the account's registered domains for an agent to choose from.
agent_domain_connect Points one of the account's domains at this box via DNS.
get_platform_regions Returns the platform's regions.
get_account_vps Returns the standalone servers on the account.
get_deploy_info Returns summary deployment info for an app.
get_app_server_usage Retrieves server usage for an app over a time window.
save_deploy_settings Saves deploy settings, including the five access consents.
assign_vps_to_project Groups the box under a project, or unassigns it.
get_app_api_keys Lists the app's API keys, including the box's scoped key.
create_app_api_key Creates an application-scoped API key.
update_app_api_key Renames, re-scopes or suspends an existing API key.

deploy_full_stack_vps

Deploy Full Stack VPS

Provisions a Full Stack VPS: a standard VPS app preloaded with the xuda CLI and codex and an auto-issued, scoped CPI API key, so the box (developer code, CLI, codex and AI agents) can use the xuda ecosystem over the CPI. It runs as a broadcast job titled "Deploying Full Stack VPS" with eight steps: initiating process, issuing CPI access key, creating vps server, setting vps firewall, setting vps backup plan, connecting to vps server, installing full stack toolchain, activating the server. The call refuses a shared-class server slug before doing anything.

Availability: Dashboard session

Parameters

Name Type Required Description
data.app_name string Yes Denotes the name of the deployment.
data.app_region string No The deployment region, the location where the server will be set up. Declared options: nyc1, nyc2, nyc3, sfo1, sfo2, sfo3, tor1, lon1, ams2, ams3, fra1, syd1, blr1, sgp1.
data.app_server_type string No The server classification that indicates the CPU, memory and disk size. Declared options: shared_vps_05, shared_vps_1, shared_vps_2, shared_vps_4, shared_vps_8, optimized_vps_2, optimized_vps_4, optimized_vps_8, optimized_vps_16, performance_vps_4, performance_vps_16, performance_vps_24, performance_vps_32, large_vps_8, large_vps_16, large_vps_24, large_vps_32. The shared entries are refused server-side for this method.
data.full_stack_tools array of string No The xuda CPI capability groups this box exposes to the developer and AI agents. Each group expands to a set of CPI methods. Omit to take the server defaults.

Notes

  • The method is flagged private: true, so it is not callable with a developer API key. Clearance: user. There is no min_plan gate on it, which is deliberate: thirty other CPI methods do carry min_plan and this one does not.
  • The server class restriction is a hard server-side refusal. Any slug whose type is shared returns {code: -1, data: 'The shared server type is not available for a Full Stack VPS. Choose an optimized type (or a larger plan).'}.
  • The method is a thin wrapper. It stamps req.data.app_type_override = 'full_stack_vps', applies default tool groups and delegates to deploy_vps. The stored document is app_type: 'vps' with is_full_stack: true, never a new app type, so every VPS branch (firewall, resize, power, web route, backups, status) applies to the box unchanged.
  • data.full_stack_tools carries group keys, not method names. The server unions the methods of every selected group, and falls back to the configured default groups, then to every group key, when nothing is selected. See "The Full Granted Method Catalog" below for the 13 groups and the 81 methods they expand to.
  • The scoped key is minted before provisioning, and the key id, the selected tools and the MCP endpoint are stamped on the app document as full_stack_vps.api_key_id, full_stack_vps.tools and full_stack_vps.mcp_url, alongside a top-level full_stack_tools.
  • Unlike a plain VPS, the box is given its own CouchDB project database. The deploy pins db_region to the deploying box's region and then creates the database with the _design/xuda and _design/xuda_indexes runtime indexes and its own admin and user credentials. Both steps are non-fatal, so the machine still boots if the database step fails.
  • On the DigitalOcean path, cloud-init writes /root/xuda.config.js (api_key, hostname, port: 3000) and /etc/profile.d/xuda.sh (XUDA_API_KEY, XUDA_HOSTNAME, XUDA_AGENT_KEY), installs git and curl, calls the platform install webhook, adds NodeSource setup_20.x, installs nodejs and runs npm i -g xuda-cli @openai/codex. On the Global (farm) hosting path the toolchain is not installed today; see "Known Gaps And Caveats".
  • Capabilities cannot be changed after create. The Tools tab is read only and states that changing them re-issues the box's scoped key, which is not shipped yet. There is no update_full_stack_tools method.
  • Billing starts at create. A cost ledger is stamped on the app document with monthly_hosting, hourly_hosting = monthly_hosting / 730.5, an add-ons map, totals, a segment start timestamp and an append-only history[]. An hourly billing cron reads it, and the minimum billable segment is 1 hour. There is no free tier for this product.

vps_fs_list

VPS Files: list directory

Lists a directory on the project's VPS over SFTP and returns typed entries with file or directory kind, size, mtime and mode.

Availability: API key

Parameters

Name Type Required Description
app_id string No Unique identifier of the application this request targets.
path string No Absolute directory path to list. Defaults to /root.

Notes

  • Clearance: user. No min_plan. Granted by the Server files capability group.
  • The whole vps_fs_* family uses the SFTP subsystem rather than shelling out, so paths are protocol arguments and there is no shell and no command injection, transfers are binary safe, and every call first authorizes that the caller owns the project.
  • File access on a Full Stack VPS is gated on the files access consent. The box counts as the customer's own machine, so the consent is enforced rather than assumed.

vps_fs_read

VPS Files: read file

Reads a file on the project's VPS over SFTP, detecting text, image or binary content and capping the inline size.

Availability: API key

Parameters

Name Type Required Description
app_id string No Unique identifier of the application this request targets.
path string Yes Absolute path of the file to read.

Notes

  • Clearance: user. No min_plan. Granted by the Server files capability group.
  • The inline read cap is 5 MB. Above it the file is download only.
  • Gated on the files access consent.

vps_fs_write

VPS Files: write file

Creates or overwrites a file on the project's VPS over SFTP.

Availability: API key

Parameters

Name Type Required Description
app_id string No Unique identifier of the application this request targets.
path string Yes Absolute path of the file to write.
content string No File contents.
encoding string No Content encoding: utf8 (default) or base64.

Notes

  • Clearance: user. No min_plan. Granted by the Server files capability group.
  • Use encoding: 'base64' for binary content. The transport is binary safe.
  • Gated on the files access consent, which is a read-write scope.

vps_fs_write_batch

VPS Files: batch upload

Writes many files to the project's VPS over a single SFTP session, creating parent directories as needed. This is what the Files tab uses for folder uploads.

Availability: API key

Parameters

Name Type Required Description
app_id string No Unique identifier of the application this request targets.
files array Yes Array of { path, content, encoding } objects to write.

Notes

  • Clearance: user. No min_plan. Granted by the Server files capability group.
  • The dashboard batches roughly 24 MB of decoded content per call. Size your own batches similarly rather than sending one enormous array.
  • Gated on the files access consent.

vps_fs_delete

VPS Files: delete

Deletes a file, or a directory recursively, on the project's VPS over SFTP.

Availability: API key

Parameters

Name Type Required Description
app_id string No Unique identifier of the application this request targets.
path string Yes Absolute path of the file or directory to delete.

Notes

  • Clearance: user. No min_plan. Granted by the Server files capability group.
  • Directory deletion is recursive. There is no undo and no trash.
  • Gated on the files access consent.

vps_fs_mkdir

VPS Files: create directory

Creates a directory recursively on the project's VPS over SFTP.

Availability: API key

Parameters

Name Type Required Description
app_id string No Unique identifier of the application this request targets.
path string Yes Absolute directory path to create.

Notes

  • Clearance: user. No min_plan. Granted by the Server files capability group.
  • Creation is recursive, so intermediate directories are made for you.
  • Gated on the files access consent.

vps_fs_rename

VPS Files: rename / move

Renames or moves a file or directory on the project's VPS over SFTP.

Availability: API key

Parameters

Name Type Required Description
app_id string No Unique identifier of the application this request targets.
from string Yes Absolute source path.
to string Yes Absolute destination path.

Notes

  • Clearance: user. No min_plan. Granted by the Server files capability group.
  • Gated on the files access consent.

vps_fs_search

VPS Files: search

Searches a directory subtree on the VPS, either by filename or by file contents.

Availability: API key

Parameters

Name Type Required Description
app_id string No Application identifier.
path string No Directory to search under.
query string Yes Search text.
mode string No name or content.

Notes

  • Clearance: user. No min_plan. Granted by the Server files capability group.
  • Gated on the files access consent.

vps_fs_tail

VPS Files: tail file

Returns the tail of a file on the VPS, with a byte offset for incremental polling, which is how live log following works in the Files tab.

Availability: API key

Parameters

Name Type Required Description
app_id string No Application identifier.
path string Yes File to tail.
from_offset number No Byte offset from a previous poll.

Notes

  • Clearance: user. No min_plan. Granted by the Server files capability group.
  • Carry the offset returned by the previous poll back in from_offset to follow a file without re-reading it. This is the intended polling pattern for a live log.
  • Gated on the files access consent.

vps_fs_disk_usage

VPS Files: disk usage

Returns one-level disk usage (du) of a directory on the VPS, largest children first.

Availability: API key

Parameters

Name Type Required Description
app_id string No Application identifier.
path string No Directory to measure.

Notes

  • Clearance: user. No min_plan. Granted by the Server files capability group.
  • One level only. Walk down by calling it again on the largest child.
  • Gated on the files access consent.

vps_fs_service_action

VPS Files: service action

Runs a bounded service action on the VPS: an nginx test or reload, an apache or caddy action, a systemd daemon-reload, or a systemctl verb against a named unit. The action set is fixed rather than free-form shell.

Availability: API key

Parameters

Name Type Required Description
app_id string No Application identifier.
action string No Fixed action key, for example nginx_reload.
verb string No systemctl verb: status, reload, restart, start or stop.
unit string No systemd unit name.

Notes

  • Clearance: user. No min_plan. Granted by the Server files capability group.
  • This is not a shell. Anything outside the fixed action set is not available through this method. For arbitrary commands, use SSH.
  • Gated on the files access consent.

vps_enable_web_url

VPS: enable web URL

Gives the VPS a public https://<sub>.xuda.app URL that reverse-proxies to its web server, defaulting to upstream port 80, allocating a subdomain if the box does not have one yet.

Availability: API key

Parameters

Name Type Required Description
app_id string No Application identifier.
port number No Upstream web port on the VPS to proxy to. Default 80.
https boolean No Proxy to https on the upstream instead of http. Default false.

Notes

  • Clearance: user. No min_plan. Granted by the Deploy and hosting capability group.
  • The public URL only reaches your app if the upstream port is actually listening and the firewall allows the traffic. Pair it with agent_firewall_open when you bring a new service up.
  • For a name of your own instead of a xuda.app subdomain, use agent_domain_connect.

vps_set_web_port

VPS: set web port

Changes the upstream port, and optionally the scheme, that the public xuda.app URL proxies to on the VPS.

Availability: API key

Parameters

Name Type Required Description
app_id string No Application identifier.
port number Yes Upstream web port on the VPS, 1 to 65535.
https boolean No Proxy to https on the upstream instead of http.

Notes

  • Clearance: user. No min_plan. Granted by the Deploy and hosting capability group.
  • Set https: true only when the upstream itself terminates TLS. The public edge is https either way.

vps_disable_web_url

VPS: disable web URL

Stops serving the VPS's public xuda.app URL, keeping the subdomain reserved so it can be re-enabled later.

Availability: API key

Parameters

Name Type Required Description
app_id string No Application identifier.

Notes

  • Clearance: user. No min_plan. Granted by the Deploy and hosting capability group.
  • The subdomain stays reserved, so re-enabling gives you the same address back.

vps_enable_ssh

VPS: enable SSH

Enables SSH and SFTP over WebSocket access for the VPS. On first enable it returns the ready-to-paste connect commands with a token.

Availability: API key

Parameters

Name Type Required Description
app_id string No Application identifier.

Notes

  • Clearance: user. No min_plan.
  • The call is idempotent. Enabling an already-enabled box is safe.
  • Not granted by default. This method is listed in the dashboard's shared capability catalog under Deploy and hosting, but it is not in the backend group list, so a Full Stack VPS's scoped key does not receive it. A full-access account API key can still call it. See "Known Gaps And Caveats".

vps_rotate_ssh_token

VPS: rotate SSH token

Issues a fresh one-time SSH and SFTP over WebSocket bearer token for the VPS, invalidating any previous one, and returns the ready-to-paste connect commands.

Availability: API key

Parameters

Name Type Required Description
app_id string No Application identifier.

Notes

  • Clearance: user. No min_plan.
  • Rotating invalidates the previous token immediately. Anything still holding it stops connecting.
  • The token is not a login. The server's own SSH credentials are still required on top of it.
  • Not granted to a box's scoped key by default, same as vps_enable_ssh.

vps_disable_ssh

VPS: disable SSH

Disables SSH-over-WebSocket access for the VPS, so the router stops resolving the tunnel, while keeping the subdomain.

Availability: API key

Parameters

Name Type Required Description
app_id string No Application identifier.

Notes

  • Clearance: user. No min_plan.
  • This turns off the WebSocket tunnel only. Direct SSH to the machine's own address is governed by the firewall.
  • Not granted to a box's scoped key by default, same as vps_enable_ssh.

agent_firewall_list

Firewall: list open ports

Lists the inbound firewall rules (open ports) for the current app, so an agent can check what is reachable from outside before changing anything. It acts only on the app bound to the key.

Availability: API key

Parameters

This method takes no parameters.

Notes

  • Clearance: user. No min_plan. Flagged mcp: true. Granted by the Deploy and hosting capability group.
  • The target app comes from the key, never from an argument, so an agent cannot point it at somebody else's server.
  • If the app has no provisioned droplet it returns the plain message "this project has no VPS provisioned yet, so there is no firewall to manage" instead of a raw error.
  • Every agent action is written to the server log as [agent-action] <action> app=<app_id> uid=<uid>.

agent_firewall_open

Firewall: open ports

Opens inbound TCP ports on the current app's firewall so a service becomes reachable from outside.

Availability: API key

Parameters

Name Type Required Description
ports array of string Yes TCP ports to open, for example ["80","443"]. Ranges like "8000-8100" are allowed.

Notes

  • Clearance: user. No min_plan. Flagged mcp: true. Granted by the Deploy and hosting capability group.
  • Ports are validated against ^\d{1,5}(-\d{1,5})?$, so ranges are allowed and anything else is rejected.
  • On the FIRST firewall attach the method also seeds port 22. A DigitalOcean cloud firewall is default-deny inbound, so attaching one with only the requested port would strand SSH.
  • Repeat-safe: ports that are already open are reported back as {opened: [], note: 'ports already open'} rather than duplicated or errored.

agent_firewall_close

Firewall: close ports

Closes inbound TCP ports on the current app's firewall.

Availability: API key

Parameters

Name Type Required Description
ports array of string Yes TCP ports to close, for example ["9090"].

Notes

  • Clearance: user. No min_plan. Flagged mcp: true. Granted by the Deploy and hosting capability group.
  • Closing port 22 is refused outright with "refusing to close port 22 (SSH) via the agent, that risks locking out remote access to the VPS; close it from the Firewall tab if you really intend to".
  • Repeat-safe: when no rule matches it returns {closed: [], note: 'no matching open ports'}.

get_app_firewall

Get App Firewall

Retrieves the application's firewall document, including its inbound_rules. This is the read half that agent_firewall_list wraps.

Availability: API key

Parameters

Name Type Required Description
app_id string Yes Unique identifier of the application this request targets.

Notes

  • Clearance: admin. No min_plan.
  • Not in the Full Stack VPS capability catalog. A box's scoped key uses agent_firewall_list instead.

configure_app_firewall

Configure App Firewall

Updates the application's firewall configuration. This is the write half that the Firewall tab and agent_firewall_open and agent_firewall_close call internally.

Availability: Dashboard session

Parameters

Name Type Required Description
app_id string Yes Unique identifier of the application this request targets.

Notes

  • Flagged private: true, security: true and broadcast: true. Clearance: admin. No min_plan.
  • External callers must go through the agent_firewall_* wrappers rather than calling this directly. Those wrappers are where the port validation and the port 22 protections live.

agent_domain_list

Domains: list

Lists the account's registered domains with name, status, connection type and which app each is attached to. It is written for an AI caller: the description instructs the model to call this BEFORE asking the user to type a domain.

Availability: API key

Parameters

This method takes no parameters.

Notes

  • Clearance: user. No min_plan. Flagged mcp: true. Granted by the Deploy and hosting capability group.
  • The account is taken from the API key, never from the caller's arguments.

agent_domain_connect

Domains: connect to this VPS

Points one of the account's own domains at THIS project's VPS via DNS. An optional subdomain label targets, for example, app.example.com instead of the apex.

Availability: API key

Parameters

Name Type Required Description
domain string Yes A domain the account owns, exactly as returned by agent_domain_list, for example example.com.
subdomain string No Optional subdomain label to point instead of the apex, for example app for app.example.com.

Notes

  • Clearance: user. No min_plan. Flagged mcp: true. Granted by the Deploy and hosting capability group.
  • Prefer a subdomain unless the apex is explicitly wanted, because attaching replaces any existing record on that exact hostname.
  • Both the account and the target app come from the API key. The call then delegates to attach_domain_to_project, which re-checks ownership of the domain AND the app.
  • Connecting routes the hostname through Cloudflare with automatic HTTPS, and the result reports the SSL mode: strict, full, flexible or plaintext.
  • Domain PURCHASE is deliberately not exposed to agents. Only domains the account already owns can be connected.

get_platform_regions

Get Platform Regions

Returns the platform's regions.

Availability: API key

Parameters

This method takes no parameters.

Notes

  • Clearance: user. No min_plan. Flagged mcp: true and cache: true. Granted by the Deploy and hosting capability group.
  • The response is cached, so treat it as a slowly changing catalog rather than a live probe.

get_account_vps

Get Account VPS

Returns the standalone virtual servers associated with the account, from the user_vps master view. This is what the agent tool picker calls to list candidate boxes.

Availability: API key

Parameters

This method takes no parameters.

Notes

  • Clearance: user. No min_plan. Flagged mcp: true.
  • The view does not emit the full-stack flag itself. Clients filter for full-stack boxes with is_full_stack || deploy_data.app_type_override === 'full_stack_vps'.

get_deploy_info

Get Deploy Info

Returns summary deployment info for an app: type, status, access URL, deploy data and the replicate app's icon properties.

Availability: API key

Parameters

Name Type Required Description
app_id string Yes Unique identifier of the application this request targets.

Notes

  • This entry declares no clearance value at all, so a key must have it explicitly allowlisted. The Deploy and hosting capability group does exactly that. No min_plan.
  • The app's status is carried on app_status_code: 1 created, 2 provisioning, 3 active, 4 error, with the human reason in app_status_desc.

get_app_server_usage

Get App Server Usage

Retrieves server usage for an application over a time window, which is what the Overview usage charts draw.

Availability: API key

Parameters

Name Type Required Description
app_id string Yes Unique identifier of the application this request targets.
ts_start number Yes Start timestamp.
ts_end number Yes End timestamp.

Notes

  • Clearance: admin. No min_plan. Granted by the Deploy and hosting capability group.
  • For a Full Stack VPS the underlying reads are gated on the metrics access consent. Without it, there is nothing to chart.

save_deploy_settings

Save Deploy Settings

Saves deploy settings for an app. For a Full Stack VPS this is the method behind the per-feature access opt-ins, and it is also the path for the billing-relevant toggles.

Availability: API key

Parameters

Name Type Required Description
app_id string Yes Unique identifier of the application this request targets.

Additional settings keys are accepted by the implementation but are not declared in the method contract. The ones relevant to this product are access_consent, access_consents, enable_backups, enable_auto_diagnose, diagnose_checks and diagnose_custom_prompt.

Notes

  • Clearance: admin. No min_plan. Flagged security: true and broadcast: true.
  • Send access_consent: { scope, granted } for a single Grant or Revoke, or access_consents: { <scope>: granted, ... } for a bulk save.
  • The five VPS access consent scopes are files, backup, metrics, ask_ai and diagnose. Each has an explicit user-facing reason string and a read-only or read-write level. They are ENFORCED on a Full Stack VPS, because the box counts as the customer's own machine, and the platform holds no standing SSH control-plane key unless the owner granted at least one scope.
  • Each consent is stamped under deploy_data.access_consents with granted_at, granted_by_uid, revoked_at and the scope's level. The diagnose scope is also mirrored onto the legacy deploy_data.diagnose_access_consent.
  • enable_backups and enable_auto_diagnose change what the account is billed. Automatic backups are $10 per month plus $0.05 per GB of backup storage, and Auto Diagnose is $5 per month per server.

assign_vps_to_project

Assign VPS To Project

Assigns a standalone server (VPS, managed, external or full-stack VPS) to one of the account's projects, or unassigns it.

Availability: Dashboard session

Parameters

Name Type Required Description
app_id string Yes Unique identifier of the VPS or server to assign.
project_id string No Target project app id to group the server under. Omit or leave empty to unassign.

Notes

  • Flagged private: true. Clearance: user. No min_plan.
  • Registered in the dev configuration only, with dev_only: true, so it is not available on production today.
  • Assignment is a grouping TAG. It stamps app_replicate without rerouting the box's own configuration, data database or billing: a document with is_full_stack === true always resolves to itself as its own project.
  • Owner scoped.

get_app_api_keys

Get App Api Keys

Retrieves the application's API keys, filtered by status and sorted by creation date. This is what the API Keys tab renders, and it is where the box's auto-issued full_stack_vps-scoped key appears so you can reveal and copy it.

Availability: Dashboard session

Parameters

Name Type Required Description
app_id string Yes Unique identifier of the application whose API keys are listed.

Notes

  • Flagged private: true. Clearance: admin. No min_plan.
  • The box's own key is the one named <box name> (full stack vps). Its value is the Bearer token for the MCP endpoint.
  • You cannot list a box's key with a key. Reveal it once from the dashboard and store it in your own secret store.

create_app_api_key

Create App Api Key

Creates an application-scoped API key document for the given app. This is the same code path the deploy flow uses server-side to mint the box's scoped key, where it additionally passes scope: 'full_stack_vps' and the expanded allowlist.

Availability: Dashboard session

Parameters

Name Type Required Description
app_id string Yes Unique identifier of the application that owns this API key.

Notes

  • Flagged private: true and broadcast: true. Clearance: admin. No min_plan.
  • Keys are created with status 3 (active) and an api_access of full or custom.
  • Only a key created with scope: 'full_stack_vps' gets the plugin tools over MCP. A key you create by hand from the API Keys tab does not carry that scope.

update_app_api_key

Update App Api Key

Updates an existing application API key: name, status, allowed methods and allowed domains.

Availability: Dashboard session

Parameters

Name Type Required Description
api_key string Yes Identifier of the API key document to update.

Notes

  • Flagged private: true and broadcast: true. Clearance: admin. No min_plan.
  • Status values are 1 draft, 2 suspended, 3 active, 4 delete.
  • This is the method a future "change the box's capabilities" feature would use to re-issue or re-scope the key. Capability editing from the Tools tab is not shipped yet.

The Full Granted Method Catalog

The methods documented above are the ones that provision, operate and credential the box itself. They are not the whole of what the box's key can reach. A Full Stack VPS's scoped key is granted the union of the capability groups selected on the wizard's Tools step, and the shipped catalog is 13 groups covering 81 distinct CPI methods, all 13 on by default.

None of those 81 methods is flagged private, so every one of them is reachable with the box's key and every one registers as an MCP tool. The methods that belong to other products are documented in those products' own references.

Group key UI label Methods granted
vps Server files vps_fs_list, vps_fs_read, vps_fs_write, vps_fs_write_batch, vps_fs_delete, vps_fs_mkdir, vps_fs_rename, vps_fs_search, vps_fs_tail, vps_fs_disk_usage, vps_fs_service_action (11)
data Databases dbs_read, dbs_create, dbs_update, dbs_delete, get_table_counts, get_app_tables, get_studio_docs_by_type (7)
drive Drive get_drive_files_user, get_drive_file_info_user, upload_drive_file_user, update_drive_file_user, delete_drive_files_user, create_drive_folder_user, rename_drive_file_user, rename_drive_folder_user, extract_drive_file_user, update_drive_file_sharing_mode_user (10)
plugins Plugins get_plugins, get_plugins_categories, get_app_plugins, install_plugin, uninstall_plugin (5)
ai AI workspace get_ai_workspace_pending_counts, archive_ai_chat, unarchive_ai_chat, delete_ai_chat (4)
version_control Build and releases build_app, get_app_releases, get_release_note_info, update_npm_dependencies (4)
logs Logs get_logs, get_logs_counts, get_security_logs (3)
ai_agents AI agents archive_ai_agent, pin_ai_agent, unpin_ai_agent (3)
contacts Contacts get_contacts, get_contact_members, add_contact_member, pin_contact, unpin_contact, archive_contact, unarchive_contact, unfriend_contact, delete_contact (9)
email Email get_user_mailboxes, get_user_emails, archive_email, unread_email, test_email, refresh_mailboxes, process_pending_email (7)
deploy_hosting Deploy and hosting get_platform_regions, get_app_server_usage, get_deploy_info, agent_domain_connect, agent_domain_list, agent_firewall_open, agent_firewall_close, agent_firewall_list, vps_enable_web_url, vps_disable_web_url, vps_set_web_port (11)
cpi_methods Platform info get_app_info, get_app_config, get_xuda_servers_info, get_platform_servers_info, get_price_obj, get_notifications, get_system_notifications (7)
mcp MCP server No methods of its own. The group is the switch that exposes the whole enabled surface over MCP.

Clearance spread across those 81: user on 55, admin on 15, public on 6, user_access on 3, developer on 1 (build_app), and 1 entry with no declared clearance (get_deploy_info).

The box also gets its own CouchDB project database, which a plain VPS does not, and that is what the data group's methods read and write for this box. The database is created on the box's own region with the _design/xuda and _design/xuda_indexes runtime indexes and its own admin and user credentials. One consequence to know: the system-objects step short-circuits unless the app type is master, so a full-stack box's database does not receive the global_<app_id> studio document that a project master gets.

Plugin Tools Over MCP

Beyond the CPI methods, the MCP server advertises the box's installed plugins as tools. This behavior is gated strictly to keys whose scope is full_stack_vps.

  • Each installed plugin's exported methods become tools named <plugin>__<method>, truncated to 60 characters.
  • They execute against the plugin path on the platform rather than against the CPI path, and they carry the platform's own trust header.
  • Install and uninstall plugins with install_plugin and uninstall_plugin from the Plugins capability group, or from the box's Plugins tab.

Plugins are the only developer-authored tools an agent on a Full Stack VPS can call. Custom .xu API units compile to client-side runtime programs with no server-side executor, so they are not exposed as agent tools. Exposing them would need a separate headless-API feature that does not exist today.

Attaching The Box To An AI Agent

There are two ways to point an agent at a Full Stack VPS, and neither of them requires you to hand the key to the agent.

Inside Xuda. In Studio, edit an AI agent and add a tool of type Full Stack VPS, then pick the box from the dropdown. The stored tool is only { type, app_id, name }. At run time the platform resolves the box's key from the app document, falling back to the app's key list and picking the row whose scope is full_stack_vps, and attaches one hosted MCP tool pointed at the box's mcp_url with approval set to never. The key never leaves the server. The picker lists candidate boxes with get_account_vps.

In your own agent client. Copy the MCP endpoint from the box's Tools tab, reveal the box's key on the API Keys tab, and register an MCP server with that URL and the header Authorization: Bearer <key>.

Whenever a Full Stack VPS tool is attached, the platform prepends a dedicated instruction sheet to the agent's system prompt, which is what teaches the model to list domains before asking you to type one and to prefer a subdomain over the apex.

Codex and vibe mode. For a plain VPS the platform mints an ephemeral, firewall-only key carrying just the five agent_* methods and deletes it after the run. For a full-stack box it reuses the box's persistent scoped key instead, so codex gets the whole enabled tool surface and the key is not deleted when the run ends. Codex runs platform-side and connects to the box over SSH, which is why its own MCP URL stays on localhost rather than following the box.

Errors

Every method returns the standard { code, data } envelope. A negative code is a failure with the reason in data. The refusals specific to this product are:

Where What you get
deploy_full_stack_vps with a shared-class slug {code: -1, data: 'The shared server type is not available for a Full Stack VPS. Choose an optimized type (or a larger plan).'}
agent_firewall_list on an app with no droplet The plain message "this project has no VPS provisioned yet, so there is no firewall to manage", instead of a raw error
agent_firewall_open with a malformed port Rejected. Ports must match ^\d{1,5}(-\d{1,5})?$
agent_firewall_open on ports that are already open {opened: [], note: 'ports already open'}
agent_firewall_close on port 22 Refused with "refusing to close port 22 (SSH) via the agent, that risks locking out remote access to the VPS; close it from the Firewall tab if you really intend to"
agent_firewall_close with nothing to close {closed: [], note: 'no matching open ports'}
A scoped key calling a method outside its allowlist Refused by the key check. The method is also absent from the key's MCP tool list, so an agent never sees it in the first place
A private method called with any API key Refused. Use the dashboard, or the agent_* wrapper where one exists

Two failure modes during provisioning are deliberately non-fatal: pinning the database region and creating the project database. If either fails the machine still boots, so a box can exist and be reachable while its project database is not yet usable. Check app_status_code and app_status_desc rather than assuming a created box is fully equipped.

Limits, Quotas And Plan Gates

  • No membership plan gate. deploy_full_stack_vps carries clearance user and no min_plan. Thirty other CPI methods do carry min_plan, so its absence here is deliberate.
  • No free tier. A Full Stack VPS is a paid server from the first hour.
  • No surcharge for the platform stack itself. There is no per-capability, per-method or per-MCP-call fee. The capabilities come with the box.
  • No AI credit cost. The Full Stack VPS path does not consume AI credits. Credits are consumed only by AI features the box can reach, such as the Auto Diagnose add-on's checks.
  • No quota on the number of boxes, tool groups or MCP tools. The only cap-shaped rule is the 13-group catalog itself. No product-specific rate limit appears in the shipped code.
  • Server class is enforced. Any slug whose type is shared is refused server-side, before anything is provisioned.
  • Billing is hourly off a stamped ledger. hourly_hosting = monthly_hosting / 730.5, with a 1 hour minimum billable segment so burst-and-shrink cannot game it, and an append-only history[] of spec changes.
  • Add-ons that change the bill: automatic backups $10 per month plus $0.05 per GB of backup storage; a dedicated public IPv4 $2.50 per month recurring plus a one-time $10 setup fee invoiced separately; Auto Diagnose $5 per month per server.
  • One adjacent plan gate. Selling a captured farm VPS image as a marketplace listing needs the marketplace Grow or Scale plan. Free and Starter do not include that listing type. Note the naming overlap: the listing type captures any Xuda farm VPS, not specifically a full-stack box.
  • Inline file read cap: 5 MB. Larger files are download only.
  • Batch upload: the dashboard sends roughly 24 MB of decoded content per vps_fs_write_batch call. Size your own batches similarly.

Webhooks And Endpoints

  • MCP endpoint. POST /mcp on the platform origin, authenticated with Authorization: Bearer <api_key>. Your box's exact URL is written onto its document as full_stack_vps.mcp_url and shown with a Copy button on the Tools tab. Do not hardcode it, read it from the box.
  • Install webhook. On first boot the DigitalOcean cloud-init calls https://<xuda origin>/cpi/digitalocean_webhook?id=<app_id>. This fires for both plain and full-stack boxes and is inbound to Xuda, not something you subscribe to.
  • No product webhooks. A Full Stack VPS publishes no outbound webhooks of its own, and there is no cron specific to it. The recurring work that touches it belongs to other systems: the hourly billing cron reading the cost ledger, the daily Auto Diagnose run for servers with that add-on enabled and the diagnose consent granted, and the daily server-health sweep and farm capacity poll for farm-hosted boxes.
  • Deploy jobs are not in the database. The deploy job document, with its steps, total_steps, current_step, current_step_name, stat and method, lives in memcached with a 600 second TTL. Do not expect to query job history after the fact.

Idempotency And Key Lifecycle

  • The box's key is minted once, before provisioning, and its id is stamped on the app document. It is persistent: nothing in the normal lifecycle deletes or rotates it.
  • Restore to a new VM issues a NEW key. A restored full-stack box never inherits the source box's credential. It also gets a new project database, into which the source project's data is replicated once, and its /root/xuda.config.js and /etc/profile.d/xuda.sh are rewritten on the restored disk. Anything holding the old box's key must be repointed.
  • Firewall changes are repeat-safe. Opening already-open ports and closing ports that are not open both return an empty result with an explanatory note rather than an error.
  • vps_enable_ssh is idempotent. vps_rotate_ssh_token is not: it invalidates the previous token immediately.
  • vps_disable_web_url keeps the subdomain reserved, so enabling again returns the same address.
  • Capability changes are not possible after create. Re-issuing a key with a different allowlist is not a shipped operation.

Known Gaps And Caveats

Stated plainly so you do not build against something that is not there yet.

  • On Global (farm) hosting the on-box toolchain is not installed. The cloud-init that writes /root/xuda.config.js and /etc/profile.d/xuda.sh and installs Node, the xuda CLI and codex runs on the DigitalOcean path only. A farm-hosted Full Stack VPS still gets its scoped key, its project database and its MCP surface, but not the on-box CLI and codex. Only the restore path rewrites those files.
  • vps_enable_ssh, vps_disable_ssh and vps_rotate_ssh_token are not in the backend capability catalog, although the dashboard's Tools tab lists them under Deploy and hosting. The backend list is authoritative, so the Tools tab overstates what a box's key can call by three methods. Use the dashboard's SSH connect modal, or a full-access account key, for those three.
  • The wizard offers server slugs the backend will refuse. The Full Stack flow is fed the managed server group minus the two smallest shared boxes, which still leaves two shared-type slugs that the server-side gate rejects. The method's own declared app_server_type option list is a different set again. If a create fails on server class, pick an optimized, performance or large type.
  • Capabilities are chosen at create and cannot be edited. The Tools tab is read only and says so. There is no update_full_stack_tools method in any configuration.
  • assign_vps_to_project is registered in the dev configuration only, with dev_only: true.
  • Custom .xu API units are not agent tools. Only installed plugins are, executed over the plugin path. See "Plugin Tools Over MCP".

A Note On What Is Not Listed Here

A Full Stack VPS is stored as a normal VPS with a full-stack flag rather than as a new app type, which is why every standard VPS feature works on it unchanged: power, resize, backups, restore, team, ownership transfer, the universal action log and the standard project tabs. Those methods belong to the platform's general VPS and app surface and are documented with it. What this reference covers is the part that is specific to the Full Stack VPS: the deploy method, the scoped key, the operations surface a key or an agent can drive, and the catalog that decides which of the 81 ecosystem methods the box is allowed to reach.