MCP

Control Plane MCP

The remote control plane exposes application operations from the REST API. HTTP and MCP share request validation, resource authorization and public response contracts. Tool discovery describes the tools and inputs available in the deployed version.

Connection

Two ways to connect — use whichever fits your client:

MethodURL / CommandAuthBest for
Remote (HTTP)https://api.oblien.com/v1/mcpOblien OAuth sign-in, or existing API-key headersInteractive clients, CI pipelines, remote agents
Local (stdio)npx --yes --package=oblien@3 oblien-mcpSaved credentials or env varsIDE integrations (VS Code, Cursor)

The local SDK wraps its REST methods and uses saved API credentials. Its tool catalog and parameter names can differ from the remote server; use tools/list on the server you connect to.

Remote — Streamable HTTP

The control plane MCP server is available as a remote HTTP endpoint. Any MCP client that supports Streamable HTTP transport can connect directly — no local install required.

Endpoint: https://api.oblien.com/v1/mcp

Sign in with Oblien

Use an OAuth-capable Streamable HTTP client with the endpoint above. The client discovers the authorization server and opens the existing Oblien login. Review the requested permissions and choose the account, namespace or VM before approving. Reading the consent page does not grant access.

Permissions are explicit: for example, vm.read permits inspection, vm.power permits power actions and vm.network permits network changes. Resource ownership and current sharing permissions are checked again on every call. Choosing one VM never grants access to its siblings. Revoke a connection in Settings → Connected applications.

OAuth consent does not grant billing, account-security, credential-management or invitation-management authority. Backend-only tools can appear in discovery but remain unavailable to OAuth grants. Shared resources also retain their existing restrictions. Public pricing tools need no additional resource permission, while their MCP transport still requires authentication.

For custom client implementations, use authorization code flow with S256 PKCE and resource=https://api.oblien.com/v1/mcp. Protected-resource metadata is at /.well-known/oauth-protected-resource/v1/mcp; authorization-server metadata is at /.well-known/oauth-authorization-server on https://api.oblien.com. Public dynamic registration is supported. Follow the metadata instead of constructing token URLs.

Access tokens expire after 15 minutes. Refresh tokens rotate; serialize refresh requests and save the replacement. Connections expire 30 days after consent. A missing grant produces a 401 challenge; insufficient tool scopes produce a 403 challenge. A resource-ownership denial cannot be fixed by asking for broader OAuth scopes.

MCP OAuth access tokens are audience-bound. They cannot be passed to the general REST SDK or used directly as VM runtime credentials. Use an authorized runtime-access tool to request a scoped runtime ticket.

Existing API credentials

Include your API credentials as HTTP headers on every request:

X-Client-ID: your-client-id
X-Client-Secret: your-client-secret

Or use an existing API bearer token:

Authorization: Bearer <token>

Example — list tools:

curl -X POST https://api.oblien.com/v1/mcp \
  -H "X-Client-ID: your-client-id" \
  -H "X-Client-Secret: your-client-secret" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list",
    "params": {}
  }'

MCP client config (HTTP transport):

{
  "mcpServers": {
    "oblien": {
      "url": "https://api.oblien.com/v1/mcp",
      "headers": {
        "X-Client-ID": "your-client-id",
        "X-Client-Secret": "your-client-secret"
      }
    }
  }
}

Local — Stdio

Run the MCP server as a local subprocess. This is the standard for IDE integrations — the server reads stdin/writes stdout.

Setup credentials (one-time):

npx oblien@3 config set --client-id "your-client-id" --client-secret "your-client-secret"

Credentials are stored in ~/.oblien/credentials.json (mode 0600, private to your user). Once saved, oblien-mcp picks them up automatically.

Run the server:

npx --yes --package=oblien@3 oblien-mcp

Alternatively, pass credentials via environment variables (useful for CI or ephemeral environments):

export OBLIEN_CLIENT_ID="your-client-id"
export OBLIEN_CLIENT_SECRET="your-client-secret"
npx --yes --package=oblien@3 oblien-mcp

Credential priority: environment variables override the saved config file.

IDE configuration

VS Code (Claude / Copilot)

Add to your .vscode/mcp.json:

{
  "servers": {
    "oblien": {
      "command": "npx",
      "args": ["--yes", "--package=oblien@3", "oblien-mcp"]
    }
  }
}

If you've already run npx oblien@3 config set, no env block is needed — credentials are read from ~/.oblien/credentials.json automatically.

Alternatively, pass credentials explicitly:

{
  "servers": {
    "oblien": {
      "command": "npx",
      "args": ["--yes", "--package=oblien@3", "oblien-mcp"],
      "env": {
        "OBLIEN_CLIENT_ID": "your-client-id",
        "OBLIEN_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Cursor

Add to your Cursor MCP settings:

{
  "mcpServers": {
    "oblien": {
      "command": "npx",
      "args": ["--yes", "--package=oblien@3", "oblien-mcp"]
    }
  }
}

Or with explicit env vars:

{
  "mcpServers": {
    "oblien": {
      "command": "npx",
      "args": ["--yes", "--package=oblien@3", "oblien-mcp"],
      "env": {
        "OBLIEN_CLIENT_ID": "your-client-id",
        "OBLIEN_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Tool reference

The tables below cover common VM tools and the SDK stdio surface. The remote server also exposes namespace, disk, analytics, routing, CDN, pricing and owner-authorized billing/credit/affiliate operations. Use tools/list for the exact catalog and JSON input schemas; listing a tool does not authorize calling it. HTTP streaming and personal login/security flows are not ordinary MCP tools.

Tools

Core

VM CRUD, quota, and usage overview.

ToolDescriptionREST equivalent
vm_createCreate a new VMPOST /vms
vm_listList VMs (with filters)GET /vms
vm_getGet a single VMGET /vms/:id
vm_updateUpdate VM settingsPUT /vms/:id
vm_deleteDelete a VMDELETE /vms/:id
vm_imagesList available base imagesGET /vms/images
vm_usage_globalGlobal usage across all VMsGET /vms/usage
vm_activityRecent activity logGET /vms/activity
vm_quotaAccount quota and limitsGET /vms/quota
vm_estimateEstimate cost before creatingGET /vms/estimate

Overlay / Filesystem

Manage the VM overlay filesystem.

ToolDescriptionREST equivalent
vm_disk_listList files in overlayGET /vms/:id/overlay
vm_disk_usageOverlay disk usageGET /vms/:id/overlay/usage
vm_disk_resizeResize overlay partitionPUT /vms/:id/overlay/resize
vm_disk_syncSync overlay to persistent storagePOST /vms/:id/overlay/sync

Power

Start, stop, pause, resume, and restart VMs.

ToolDescriptionREST equivalent
vm_startStart a stopped VMPOST /vms/:id/start
vm_stopStop a running VMPOST /vms/:id/stop
vm_restartRestart a VMPOST /vms/:id/restart
vm_pausePause (suspend) a VMPOST /vms/:id/pause
vm_resumeResume a paused VMPOST /vms/:id/resume

Lifecycle

Control VM lifetime, TTL, and permanent/temporary status.

ToolDescriptionREST equivalent
vm_lifecycle_getGet lifecycle stateGET /vms/:id/lifecycle
vm_lifecycle_permanentMake VM permanentPOST /vms/:id/lifecycle/permanent
vm_lifecycle_temporaryMake VM temporaryPOST /vms/:id/lifecycle/temporary
vm_lifecycle_ttlSet TTL durationPUT /vms/:id/lifecycle/ttl
vm_pingRenew TTL (keep alive)POST /vms/:id/ping
vm_lifecycle_destroyDestroy and clean upDELETE /vms/:id/lifecycle

Logs

Retrieve and manage VM logs.

ToolDescriptionREST equivalent
vm_logsGet recent logsGET /vms/:id/logs
vm_logs_clearClear log bufferDELETE /vms/:id/logs
vm_logs_listList log filesGET /vms/:id/logs/list
vm_logs_fileGet a specific log fileGET /vms/:id/logs/file/:name
vm_logs_bootGet boot logs (SSE stream)GET /vms/:id/logs/stream/boot

Metrics

System info, config, and real-time stats.

ToolDescriptionREST equivalent
vm_statsCPU, memory, disk statsGET /vms/:id/stats
vm_infoSystem informationGET /vms/:id/info
vm_configRunning configurationGET /vms/:id/config

Network

Network policy and outbound IP configuration.

ToolDescriptionREST equivalent
vm_network_getGet network settingsGET /vms/:id/network
vm_network_updateUpdate network policyPATCH /vms/:id/network
vm_network_ipAssign outbound IPPOST /vms/:id/network/ip
vm_firewall_getRead the port rules, available Edge settings and revisionGET /vms/:id/network/firewall
vm_firewall_rule_addAdd a port or range at the observed revision. Defaults to Private and Oblien Edge in v2 and SDK 4.POST /vms/:id/network/firewall/rules
vm_firewall_updateReplace port lists at the observed revision. Edge and public changes require the owner.PUT /vms/:id/network/firewall
vm_public_ipv6_getRead public IPv6 state and current revisionGET /vms/:id/network/ipv6
vm_public_ipv6_setOwner-only opt-in and optional TCP port replacement; requires the current revisionPUT /vms/:id/network/ipv6
vm_public_ipv6_rotateOwner-only address rotation within provider limits; retain the request ID and revision on retries (SDK 3.3.0)POST /vms/:id/network/ipv6/rotate

The SDK MCP server includes the IPv6 tools from version 3.2.0. Public IPv6 is off by default; inspect the returned state after failures and never blindly retry a stale enable. See Public IPv6.

For these tools, the remote server takes vmId; the local SDK server takes vm_id. IPv6 updates require enabled and expected_revision; omitting tcp_ports preserves the central public port list. Firewall updates require private_ports, public_tcp_ports and expected_revision. The two updates share one revision. Read the revision with the matching GET tool before updating. For example, local SDK arguments are:

{ "vm_id": "your-vm-id", "enabled": true, "tcp_ports": [5432], "expected_revision": 0 }

Replace the example revision with the returned value. An empty port list opens nothing. Direct SSH requires explicitly including port 22 and configuring guest credentials; managed SSH remains independent.

Snapshots & Archives

Point-in-time snapshots and long-term archives.

ToolDescriptionREST equivalent
vm_snapshot_createCreate a snapshotPOST /vms/:id/snapshot
vm_snapshot_restoreRestore from snapshotPOST /vms/:id/restore
vm_archive_createCreate an archivePOST /vms/:id/archives
vm_archive_listList archivesGET /vms/:id/archives
vm_archive_getGet archive detailsGET /vms/:id/archives/:archiveId
vm_archive_deleteDelete an archiveDELETE /vms/:id/archives/:archiveId
vm_archive_delete_allDelete all archivesDELETE /vms/:id/archives

SSH

SSH access management.

ToolDescriptionREST equivalent
vm_ssh_statusGet SSH statusGET /vms/:id/ssh
vm_ssh_enableEnable SSHPOST /vms/:id/ssh/enable
vm_ssh_disableDisable SSHPOST /vms/:id/ssh/disable
vm_ssh_passwordSet SSH passwordPOST /vms/:id/ssh/password
vm_ssh_keySet authorized keyPOST /vms/:id/ssh/key

Workloads

Manage long-running processes inside VMs.

ToolDescriptionREST equivalent
vm_workload_createCreate a workloadPOST /vms/:id/workloads
vm_workload_listList workloadsGET /vms/:id/workloads
vm_workload_getGet workload detailsGET /vms/:id/workloads/:wid
vm_workload_updateUpdate a workloadPATCH /vms/:id/workloads/:wid
vm_workload_deleteDelete a workloadDELETE /vms/:id/workloads/:wid
vm_workload_delete_allDelete all workloadsDELETE /vms/:id/workloads
vm_workload_startStart a workloadPOST /vms/:id/workloads/:wid/start
vm_workload_stopStop a workloadPOST /vms/:id/workloads/:wid/stop
vm_workload_statusGet workload statusGET /vms/:id/workloads/:wid/status
vm_workload_logsGet workload logsGET /vms/:id/workloads/:wid/logs
vm_workload_statsGet workload resource statsGET /vms/:id/workloads/:wid/stats

Metadata

Custom key-value metadata on VMs.

ToolDescriptionREST equivalent
vm_metadata_getGet all metadataGET /vms/:id/metadata
vm_metadata_updateSet/update metadataPATCH /vms/:id/metadata

Resources

CPU, memory, and disk resource allocation.

ToolDescriptionREST equivalent
vm_resources_getGet resource allocationGET /vms/:id/resources
vm_resources_updateUpdate resources (hot resize)PATCH /vms/:id/resources

Usage

Per-VM billing, usage tracking, and credits.

ToolDescriptionREST equivalent
vm_usageGet usage breakdownGET /vms/:id/usage
vm_usage_totalsGet usage totalsGET /vms/:id/usage/totals
vm_usage_tracking_startStart usage trackingPOST /vms/:id/usage/tracking/start
vm_usage_tracking_stopStop usage trackingPOST /vms/:id/usage/tracking/stop
vm_credits_chartCredits usage chart dataGET /vms/:id/usage/credits/chart
vm_usage_wipeWipe usage dataDELETE /vms/:id/usage

Public Access

Expose VM ports to the internet.

ToolDescriptionREST equivalent
vm_public_access_listList exposed portsGET /vms/:id/public-access
vm_public_access_exposeExpose a port publiclyPOST /vms/:id/public-access
vm_public_access_revokeRevoke public accessDELETE /vms/:id/public-access/:port

Runtime API Access

Enable and manage the HTTP API running inside VMs.

ToolDescriptionREST equivalent
vm_api_access_statusGet API access statusGET /vms/:id/runtime-api-access
vm_api_access_enableEnable Runtime APIPOST /vms/:id/runtime-api-access/enable
vm_api_access_disableDisable Runtime APIPOST /vms/:id/runtime-api-access/disable
vm_api_access_tokenGet gateway connection tokenGET /vms/:id/runtime-api-access/token
vm_api_access_token_rotateRotate connection tokenPOST /vms/:id/runtime-api-access/token
vm_api_access_token_rawGet raw connection tokenGET /vms/:id/runtime-api-access/token/raw

Details

ToolDescriptionREST equivalent
vm_detailsFull VM details (combined info)GET /vms/:id/details

VM Domains

Custom domain management for VMs.

ToolDescriptionREST equivalent
vm_domain_getGet custom domain infoGET /vms/:id/domain
vm_domain_connectConnect a custom domainPOST /vms/:id/domain
vm_domain_disconnectDisconnect custom domainDELETE /vms/:id/domain
vm_domain_check_dnsCheck DNS before connectingPOST /vms/:id/domain/check
vm_domain_ssl_renewRenew SSL certificatePOST /vms/:id/domain/ssl/renew

Pages

Static page deployments from VM filesystem.

ToolDescriptionREST equivalent
page_listList all deployed pagesGET /pages
page_getGet a page by slugGET /pages/:slug
page_createCreate a page from a VM folderPOST /pages
page_deployRe-deploy files to an existing pagePOST /pages/:slug/deploy
page_updateUpdate page name or slugPUT /pages/:slug
page_enableEnable a disabled pagePOST /pages/:slug/enable
page_disableDisable a page (keeps files)POST /pages/:slug/disable
page_deletePermanently delete a pageDELETE /pages/:slug
page_domain_getGet custom domain info for a pageGET /pages/:slug/domain
page_domain_connectConnect a custom domainPOST /pages/:slug/domain
page_domain_disconnectDisconnect custom domainDELETE /pages/:slug/domain
page_domain_check_dnsCheck DNS before connectingPOST /pages/:slug/domain/check
page_domain_ssl_renewRenew SSL certificatePOST /pages/:slug/domain/ssl/renew

Domain Checks

Slug availability and custom domain DNS verification — pre-flight checks before claiming subdomains or connecting custom domains.

ToolDescriptionREST equivalent
domain_check_slugCheck if a slug is available on a wildcard domainPOST /domain/check-slug
domain_verifyVerify DNS configuration for a custom domainPOST /domain/verify

Edge Proxy

Reverse proxy routes through subdomains (enterprise only).

ToolDescriptionREST equivalent
edge_proxy_listList all edge proxiesGET /edge-proxy
edge_proxy_getGet an edge proxy by IDGET /edge-proxy/:id
edge_proxy_createCreate a new edge proxyPOST /edge-proxy
edge_proxy_updateUpdate an edge proxyPUT /edge-proxy/:id
edge_proxy_enableEnable a disabled proxyPOST /edge-proxy/:id/enable
edge_proxy_disableDisable a proxyPOST /edge-proxy/:id/disable
edge_proxy_deletePermanently delete a proxyDELETE /edge-proxy/:id

Namespaces

Operations use the authenticated account and any namespace or VM restriction attached to the credential. On collection tools that accept a namespace filter, select it explicitly:

{
  "name": "vm_list",
  "arguments": {
    "namespace": "team-backend"
  }
}

The credential must authorize that namespace. An API key or OAuth connection bound to one namespace cannot switch namespaces through tool arguments.

Error handling

Tool calls that fail return a standard MCP error object:

{
  "isError": true,
  "content": [
    {
      "type": "text",
      "text": "{\"error\":\"vm_not_found\",\"message\":\"VM ws_abc123 not found\"}"
    }
  ]
}

HTTP status codes from the underlying API are mapped to descriptive error messages. Common errors:

ErrorCause
auth_failedMissing or invalid credentials
vm_not_foundInvalid VM ID or no access
forbiddenKey lacks required scope
quota_exceededAccount resource limit reached

IPv6 rotation is destructive to existing connections and idempotent for an identical request. Read rotation.available, limits and next allowed time first. A pending response is accepted work; poll state or replay the same ID and original revision. Never generate another ID to resolve an uncertain outcome. The provider owns address allocation and recovery.

Per-route wake (API v2)

vm_route_wake_get reads one VM hostname's wake permission, revision and VM idle status. vm_route_wake_set changes it with hostname, auto_wake and expected_revision. Set the SDK MCP server’s API base to https://api.oblien.com/v2 for these tools. They use the same owner/namespace authorization and conflict handling as HTTP. Automatic sleep remains a separate VM setting.

vm_firewall_update on v2 accepts edge_port_ranges for gateway TCP, plus inclusive private_port_ranges and public_tcp_port_ranges, plus public_tcp_allow_all. Allow-all exposes every listening TCP service when IPv6 is enabled, except reserved runtime ports. Read and review the current policy before changing it; do not retry a stale revision automatically.