Skip to main content
Live. This area is documented as current, user-reliable behavior.

Goal

Integrate the scoped connection API without treating a client credential as owner authority.

Prerequisites

  • A compatible StackShift backend with connection admission enabled for new grants.
  • Owner authorization for governance requests, or the scoped connection credential for execution requests.
  • A client that supports the advertised Streamable HTTP and OAuth mechanisms. Deployed MCP integrations are owner-tested; verify each requested resource operation from its controller evidence.

Workflow

1
Discover the MCP resource metadata and its authorization server using the instance origin.
2
Authenticate with explicit resource and scopes, S256 PKCE and a registered callback. Complete live browser consent.
3
Use the issued bearer credential for connection identity, authorized resources and capabilities.
4
For a missing supported action scope, follow the insufficient_scope challenge through new explicit owner consent.
5
Submit an exact operation with a retained Idempotency-Key, then inspect its approval and controller evidence separately.

Mail workspaces and mode-specific actions (pending API release)

Select the synthetic mail_workspace for your owning account and explicitly consent to each mail.test.* or mail.live.* scope. Workspace selection alone grants no mode or Mail action; resource.read exposes metadata only. Mode is derived from the retained action and cannot be changed by configuration or headers. Account ownership and suspension are rechecked for consent, reads, admission and dispatch. The Mail adapter provides 90 explicit actions for domain setup, templates, brands/audiences/contacts, campaigns, raw/template sending, delivery inspection and billing preparation. Reads use advertised direct inspection tools; mutations use operation_propose and independent owner approval or applicable policy. Domain and billing mutations are Live-only. The complete matrix, schemas and exclusions distinguish Test simulation from real delivery and payment preparation from payment completion.

Direct diagnostics and paginated build logs (pending API release)

inspection_catalog exposes registered read tools, their schemas, required_scope, granted and available. It returns contracts without resource data. available reflects the external-execution switch, not controller readiness. Direct tools remain discoverable when scope is missing; invocation requires explicit consent and follows the insufficient_scope OAuth challenge. Family filtering applies to these tools. Use project_builds_inspect with resource_id and configuration: {offset: 0} to find a build. The paginated response contains builds, total, offset, has_more and next_offset; pass next_offset as configuration.offset while has_more is true. Optional status filters history before pagination. Omitting offset preserves the legacy array response. Then use project_build_logs with the same project resource_id and configuration containing build_id and optional tail (1–200, default 100). They require project.builds.inspect and project.build.logs on that selected project. resource.read does not include diagnostic access. project_logs is runtime output and separately requires logs.read. Build-log responses include status, retained error_message, logs, start_line, end_line, total_lines, has_more, next_before_line and logs_truncated. Line boundaries are zero-based and end_line is exclusive. Pass next_before_line as configuration.before_line until has_more is false. Pages contain at most 200 lines and 48 KiB. An oversized individual line is explicitly omitted with logs_truncated=true; report that limit. Output is retained, not streaming, so reread the latest page for an active build. Other registered reads expose project status, deployment context, environment metadata, runtime, database state and diagnostics through their existing controllers. Direct inspections need no proposal, approval, operation polling or native AI credits. Current grant, resource ownership, expiry, revocation and secret-redaction checks still apply. Existing governed inspection proposals remain compatible. A dependency release-age cutoff in build output does not establish the configured minimum duration. Inspect authorized repository configuration or report it unavailable; never invent the waiting period or disable dependency policy automatically. Deploy the updated API and refresh client discovery. Existing credentials gain no additional scopes: request new owner consent for any missing reads, preserving still-needed scopes. No migration or new environment setting is required. This is local implementation, not a deployed-client verification claim.

Connected skill guidance (next release)

The authenticated MCP connection exposes skill_read in every discovery family, including connections with no mutation permissions. Call it with {} to read the entry skill, which routes each task to a focused skill such as {“skill”:“stackshift-deploy-app”}; read {“document”:“references/interfaces.md”} for connection scopes and the operation lifecycle. The API embeds the canonical skill files, so reading guidance requires no filesystem installation or separate storage service. Initialization instructions direct the client to fetch the skill before beginning StackShift work. The client decides when to invoke it; connecting is not proof of consumption. Only bundled documents can be read. Existing authentication, resource grants and operation approvals remain unchanged. Deploy the API to expose this tool and reconnect clients to refresh discovery; the worker needs no change for skill retrieval.

StackShift skill library and workspace skills (next release)

StackShift ships a library of focused skills in the open Agent Skills format: deploying an app, fixing a failed build, databases, domains and DNS, previews and merges, WordPress, mobile releases, Mail, Support setup, moving media into Assets, one skill per framework (Laravel, FastAPI and Django, Express and NestJS, Next.js, Spring Boot, ASP.NET and static sites), and integrations with Paystack, Flutterwave and the WhatsApp Cloud API. stackshift-cloud-operations stays the entry skill and lists the others. Over MCP, call skill_read with {“skill”:“stackshift-laravel”} to read a focused skill, and add “document” for one of its references. Calling skill_read with {} still returns the entry skill, so existing clients keep working. stackshift setup agent —client CLIENT installs the whole library as sibling folders, and the download on the connection page contains the same files. Stackie reads the same skills on demand. Owners can add team runbooks as workspace skills, or install verified public skills, from Settings, Stackie & agents. Every skill pins a version and a SHA-256 checksum, and no agent can use it until the owner reviews the files and approves that exact checksum. Uploading new content needs a new version and a new approval. Approved workspace skills are available to Stackie and, as skill_read {“skill”:“workspace:NAME”}, to connected agents. A skill is guidance only. It never adds scopes, approvals or tools; autonomy limits, owner approvals and the destructive-action guard still apply to every action. Agents treat workspace and third-party skill text as untrusted, and run skill scripts only inside a sandbox.

Executable MCP contracts and action discovery (pending API release)

Call action_catalog with {} to discover canonical action descriptors, including actions not yet granted. Results follow the MCP URL family filter and contain required_scope, granted, execution_route, proposal_supported and mcp_tools, plus configuration_schema and availability. This reveals contracts, not resource data or permissions. capabilities remains granted-only and includes runtime choices such as active database sizes. execution_route is operation_propose, direct_inspection or dedicated_tool. Use the listed mcp_tools and proposal_supported to select the supported entrypoint. Journey actions require their dedicated tools; never infer that every consent action can be proposed generically. Dedicated preview and journey tools remain discoverable without scope and return the exact insufficient_scope challenge when invoked without consent. operation_propose advertises discriminated request schemas for every registered generic-adapter action, including those not yet granted. Invocation still requires independent owner consent and current authority. Existing-target operations require resource_id; unbound creation and account-level inspection omit it. Examples use synthetic IDs: replace them with IDs from resource or catalog discovery. The connected database-create contract uses engine and size_id, matching its controller adapter. Recipe and preview POST tools derive request shapes from their existing controller DTOs. Required workflow constraints, current permissions, quote checks and independent approval still run through the same REST/service controllers. Schemas and read-only annotations are discovery aids, not authority. Keep the existing MCP URL for the complete consented surface. For focused discovery, append ?family=databases (or another advertised family). capabilities accepts a family argument and advertises allowed values; core contains shared identity/resource/recovery tools, recipes adds setup tools, and previews adds preview tools. Filtering does not add scopes. An unknown family returns invalid_request. Choose another family or the original URL when switching tasks. Use the advertised prerequisite IDs and current resource_context revision. On uncertain responses, replay the same idempotency key and identical body, then inspect the relevant operation, recipe setup or preview. target_changed, revision_conflict and plan_stale require fresh context and review. idempotency_conflict requires restoring the original request; capability_unavailable requires resolving the reported prerequisite. insufficient_scope requires explicit new owner consent. The release record distinguishes local schema/SDK tests from deployed client behavior. The controlled comparison measures contract payload tokens and schema defect detection; it is not a live model success-rate or latency claim.

Infrastructure quote and recorded usage

New direct database creation and scaling proposals retain a server-generated NGN quote with kobo-per-hour components, price fingerprint, exclusions and a 15-minute expiry. The quote is included in the approval and checked again before execution. Changed prices, placement or an expired quote require a new proposal; idempotent retries retain the original quote. Deployments and scaling on an owner server add no StackShift workload hosting charge. Server rental and separately purchased services retain their own billing. Other unpriced infrastructure stays explicitly unavailable or excluded. AI budgets and existing service limits remain separate; no aggregate infrastructure cap is introduced. Operation details show the retained estimate alongside recorded infrastructure usage where resource usage exists. Recorded usage includes signed ledger corrections posted since the operation, uses the current NGN settlement contract, and does not claim to be a paid invoice or cost caused exclusively by that operation. No usage rows means unavailable, not zero. These quote and usage projection changes are local next-release work; existing deployed MCP support remains available.

Transport and response conventions

Connection REST paths below are relative to /api/v1/agents/connections. MCP remains at /api/v1/agents/mcp. Send credentials in the Authorization bearer header, never in the URL. Successful connection REST responses wrap their payload in data. OAuth metadata and token responses follow their protocol shape without that wrapper. REST failures use the platform error envelope and a machine-readable code. New grant admission and direct execution have separate enablement controls. Authorized inspection does not require native Stackie inference, AI credits or an AI subscription. Current resource permissions still apply.

Owner governance routes

A connection execution credential cannot call these governance routes, decide approvals or edit policy. Broader owner credentials are not interchangeable with the scoped execution credential.
  • GET /catalog and GET /catalog/{client}/setup?scope=… return the canonical client catalog and resolved setup. Public setup uses /api/v1/agent-client-catalog and /api/v1/agent-client-catalog/{client}/setup; these issue no authority.
  • GET /action-catalog returns explicit action descriptors, input/output schemas, resource kinds, approval, effects, funding and configuration availability. GET /action-inventory records canonical registrations and adapters; use capabilities to check availability for the selected resource.
  • GET / and GET /{connectionID} inspect owner connections; POST / creates a restricted headless grant with Idempotency-Key.
  • GET /available-resources and GET /available-policies return selectable owner-authorized choices.
  • GET /consents/{consentID} and POST /consents/{consentID} require a live owner browser session. Decisions also require existing CSRF protection.
  • POST /{connectionID}/revoke revokes authority. POST /{connectionID}/replace-credential uses a retained Idempotency-Key, revokes old credentials and issues a headless bearer credential without expanding the grant. It is not OAuth reauthentication. For OAuth clients, restart client sign-in and complete browser consent.
  • GET /{connectionID}/operations reads that connection’s operation history through owner governance.

Scoped execution routes

Discover exact supported action names from the catalog and capabilities endpoints, including typed product inspections and mutations. New operations require explicit consent; existing grants do not expand automatically. Database bindings support private_read only when a qualified reader endpoint exists; they never fall back to the writer. Read the current capability schema before constructing configuration; unsupported fields and binding permission modes are rejected. Keep the exact request and key together. Reusing a key for different content conflicts. An accepted operation exposes its stable identity, affected targets, approval, safe result and controller_operations; inspect controller outcomes before reporting success.
  • GET /identity returns the retained connection identity and grant.
  • GET /resources and GET /resources/{kind}/{resourceID}/context require resource.read and current resource access.
  • GET /capabilities returns granted typed actions and configuration schemas. Discover active database size choices here. For ungranted contract discovery, use the MCP action_catalog tool (pending API release).
  • GET /resources/project/{resourceID}/logs requires logs.read and current project authority. Output is bounded and redacted; source unavailability is an error, not empty successful output.
  • POST /operations accepts action, optional resource_id, configuration, optional expected_resource_version and native_ai only for declared native-AI actions, with Idempotency-Key.
  • GET /operations and GET /operations/{operationID} require operation.read and remain connection-scoped.

Product creation and workspace continuity

grant.creation_allowances defaults to an empty array. Each kind appears at most once and permits exactly one resource: project with hosted or exact connected_node placement (also used by Ghost site creation); database restore target with an independently selected source_database_id; hosted wordpress_site; compute_instance with selected plan_id; storage_bucket with explicit region; http_cron_job; sandbox; stack (also used by template deploys); import_job; sandbox_template; ai_project; mobile_app; or node (a server in your own cloud account). Resource grants alone confer no creation capacity. WordPress site creation, site/archive import and staging share the same hosted one-site allowance. Staging additionally requires a separately selected hosted source. No operation replenishes the slot or grants unrelated actions on the retained target. wordpress.archive.import verifies a bounded archive SHA from a ready workspace with same-connection source provenance and an independently selected source project. wordpress.import.resume uses the original import_execution_id, package, settings and target, with new exact approval and current source authority; it never creates a second slot. Allowance responses expose reserved and resource_id as server-owned fields. A new key does not replenish a reservation after rejection or failure. Lost-response recovery uses the original execution and key; replacement retains or reduces constraints and copies reservation state. Engineering materialize, inspect, execute, write, tests and source export continue only workspaces proven by a successful creation receipt from the same connection and selected project. Every follow-up has its own idempotency key, admission and approval. Another connection or replacement credential cannot adopt that workspace. Direct controller actions do not invoke Stackie or consume native inference credits. Native-AI actions declare native_ai_schema and require native_ai: {funding: account_ai, budget_cents: positive integer} within the configured maximum. Existing account funding, BYO and credit gates still apply; a connected client subscription never pays for native calls.

Native AI and finite controller operations

autonomous.launch uses an already selected project; configure source and environment through separate approved actions first. autonomous.continue retains the same connection, objective, plan, resource caps and original total budget. Revocation, changed approval, expired authority or exhausted budget blocks deferred effects. project.repair_policy.configure requires explicit policy expiry, daily repair cap, resource caps and native funding. Its budget is one total across all episodes, not a fresh budget per repair. Expiry is bounded by connection expiry and 30 days. project.repair_policy.disable is a separate direct action. project.environment.value.save requires an exact inspected variable/version and accepts only non-secret values. project.secret.rotate uses server-side entropy for an application secret and includes the approved pinned rollout. Provider credentials must use their provider rotation flow; returned pending work is not a completed rotation. engineering.pull_request.create accepts at most ten exact files with expected_blob_sha and the approved base SHA. It creates a reviewable PR through the existing repository controller; optional auto_rebuild is verification only. It does not merge the PR. database.row.mutate retains primary-key, backup and runtime controls. Database start/stop reports current requested state; it does not invent a unique worker receipt. Asset webhook notification confirms the retained event, not external delivery; creative review confirms proof submission, not approval or publication. account.usage.inspect, billing.summary.inspect, billing.transactions.list and domains.registered.list are explicitly account-wide and can include billing totals, payments and domains outside selected resources. They share the Billing and account line on the consent screen, left unticked by default. Resource discovery and other inspections remain scoped and redact credentials. grant.can_read_secrets defaults to false, and a Change access request that leaves it out keeps the current value. DNS record changes, SSH access and key resets, database user changes, secret rotation and saved store or Shopify login checks need it, the same as the secrets tick on a full-access token; without it they fail with 403 token_cannot_read_secrets. Their action_catalog entries carry consent: secrets. Opening or closing database public access, changing nameservers and removing control panel webhooks always wait for the owner, signed in to the dashboard. Protected-resource discovery is available at /.well-known/oauth-protected-resource and /.well-known/oauth-protected-resource/api/v1/agents/mcp. Authorization-server discovery is /.well-known/oauth-authorization-server. Use the advertised configured issuer and endpoints. OAuth endpoints are /api/v1/agents/connections/oauth/register, /authorize, /token and /revoke. The server supports client ID metadata documents and dynamic registration compatibility, authorization-code S256 PKCE, explicit resource audience and rotating refresh credentials. Consent is bound to the live owner session. A repeated identical decision recovers the recorded outcome without returning another callback code. If the callback was lost, restart client authorization. Conflicting decisions are rejected. Access credentials last up to 15 minutes and are bounded by connection expiry. Connection grants default to 30 days. A refresh token is not guaranteed; request offline_access where supported and follow advertised metadata. Refresh replay within an active family revokes retained authority. In the pending API update, owner credential replacement retires all old families: replay from a retired family is rejected without revoking its replacement. OAuth revocation with a consumed, replaced or expired credential returns nondisclosing success without revoking current credentials. Replacement also invalidates approved but unexchanged authorization codes for that connection; fresh explicit consent still works. Active-token revocation is unchanged.

Register a public client with an exact callback

When the client setup requires prior registration, choose an available local callback port. Read the selected instance authorization-server metadata and POST public registration metadata to its advertised registration_endpoint. Do not substitute an unrelated registration service. Send client_name, redirect_uris containing http://localhost:PORT/callback, grant_types containing authorization_code and refresh_token, response_types containing code, and token_endpoint_auth_method set to none. Replace PORT with the chosen numeric port before registering. Use the returned public client_id and that exact port in the official client setup controls. A public client ID is configuration metadata, not a secret or execution credential. Registration grants no resource access and needs no owner token or client secret. Use the client’s supported scope controls to request resource.read and operation.read, plus offline_access if refresh is needed. Complete client login and owner browser consent separately. Keep authorization codes, callback URLs and issued tokens private. This server requires an exact registered port for localhost redirects. Its variable-port exception applies only to numeric loopback IP redirects. Consult the catalog for version-specific compatibility and any default metadata-document mismatch.

Request additional action scope

Initial discovery requests resource.read and operation.read. The proposal tool is discoverable, but missing action authority produces HTTP 403 with a WWW-Authenticate insufficient_scope challenge naming the exact action and baseline reads before admission. For a first account with no selectable resources, a default read-only request cannot authorize creation. Deny that request and restart client sign-in with the exact creation scope, then explicitly choose its allowance in browser consent. For one Application in Codex CLI, use codex mcp login stackshift —scopes resource.read,operation.read,application.create, retaining any other still-needed scopes. Clients without scope controls can use the restricted scoped-credential CLI workflow; do not substitute a broad owner token. Start a new OAuth request for the needed scopes and retain other still-needed scopes where the client supports it. The owner explicitly selects resources and actions again. This creates a new connection; it does not silently broaden the old connection or its scope-preserving replacement. Clients without transport step-up need their supported explicit reauthentication controls or an owner-issued restricted credential. Consult the shared catalog for the precise tested client/version and remaining gaps. Granting action scope still does not approve the eventual proposal.

History, source availability and recovery

Operation listing separates current from history.items. Use history.next_cursor for the next terminal-history page; limit bounds that history page. Keep cursors within their original owner/connection query. source_status and errors describe independently unavailable current/history sources. Retain last successful data as stale rather than interpreting an unavailable source as empty. Both sources unavailable returns a read_unavailable failure. For database.create and release.create, operation_get adds dispatch_state for the retained execution state and controller_status for the exact current nested controller (pending API release). Without a retained controller reference, controller_status is not_started only while queued or waiting; it is unknown after dispatch or failure. It is unavailable when authority is lost. Historical state is unchanged. Neither field establishes application-level success: a succeeded dispatch is not proof that database provisioning or application release has completed. Inspect the controller status and verify the resulting service. operation_wait (GET /operations/{id}/wait?timeout_seconds=N, at most 50) holds the call until the operation has an outcome, then returns settled true with the operation: it ran (for database.create and release.create that means dispatched, so keep checking controller_status), failed, was declined, ran out of time, was replaced by a newer proposal, or needs reconciliation. Its state and error say which. On timeout it returns settled false, either still waiting for the owner or approved and still running, and the agent calls it again. A pending approval carries review_url, the dashboard link that opens that exact request. Proposing the same request again while it waits returns the waiting operation instead of a second approval. Proposing again replaces the waiting proposal only for the same action on the same resource when the change is to the configuration of a creation (application.create or an action that uses a creation allowance), to precondition fields (expected_version, expected_updated_at, expected_revision, expected_plan_revision, expected_head_sha, expected_sha256, expected_resource_version), to env_value for project.environment.value.save, to the record fields for domains.registered.dns.record.update, or to nameservers for domains.registered.nameservers.update. Any other change is a separate proposal. OAuth-origin connections should reconnect through client sign-in. Keep the previous connection until the new grant works, then revoke it. Browser replacement can only keep or reduce retained access; additional scopes require a separate connection. A repeated successful headless credential issuance returns credential=null with its recorded issuance state. It never reveals the prior secret. Deliberate replacement is necessary if the secret was lost. Handle idempotency_conflict and target_changed as conflicts requiring inspection. authority_revoked and operation_not_permitted deny execution; capability_unavailable and read_unavailable are availability failures. Do not convert a retry, approval or missing response into deployment success.

Expected result

Requests remain bound to the owner-consented resource/action grant. Operation acceptance does not establish successful execution.

Agent feature availability

Find the actions available to your agent and resolve access or configuration requirements.

Connect your coding agent

Connect an external client, choose its access and inspect its work in StackShift.

Connection access and approvals

Understand selected resources, permitted actions, owner decisions and revocation.

What agents can do

Every action Stackie and connected agents can take, and when each one waits for you.

Application and PostgreSQL with an external agent

Follow governed resource creation, private database binding and evidence-based deployment verification.