MCP Workflows

Real-world examples of AI agents using sota.io through MCP. Each workflow shows the natural language prompt and what happens behind the scenes.

Deploy a New App

Prompt: "Create a new sota.io project called my-api and deploy the current directory"

The AI agent will:

  1. Call create-project with name "my-api"
  2. Call deploy with the new project ID; it waits until the deployment is running or failed (up to 40 s, then one get-status call with wait_for: "finished")
  3. Return the live URL (e.g., https://my-api.sota.io), or the reason of a failure (for a failed health check: the HTTP status the app answered)

Follow-up: "Show me the build logs"

The agent calls get-logs to display build output, helping you diagnose any issues.

Check Deployment Status

Prompt: "What's the status of my sota.io project?"

The agent will:

  1. Call list-projects to find your project
  2. Call get-status with the project ID
  3. Show the live URL, deployment status, and recent history

Manage Environment Variables

Set a variable:

"Set STRIPE_KEY on my project and restart the app with it"

The agent calls set-env with the key and value, then redeploy: the running image starts again with the new value, without a build. The variable is encrypted at rest.

View all variables:

"Which env vars are set on my project?"

The agent calls get-env, which lists the names with masked values. A value comes back in clear only when the agent asks for one key with reveal: true, which it does only when you ask for that value.

Rollback on Failure

Prompt: "My app is broken after the last deploy. Roll back to the previous version."

The agent will:

  1. Call rollback to revert to the previous deployment
  2. Call get-status to verify the rollback succeeded
  3. Confirm the app is running on the previous version

Rollbacks are instant — they swap the container image without rebuilding.

Full Development Cycle

A single conversation with your AI agent can handle the entire workflow:

  1. Create project — "Create a new sota.io project called my-api"
  2. Deploy — "Deploy the current directory"
  3. Check status — "Is the deployment healthy?"
  4. Set env vars — "Set STRIPE_KEY to sk_live_..."
  5. Redeploy — "Restart the app with the new env var" (redeploy, no build)
  6. Check logs — "Show me the latest logs"
  7. Rollback — "Roll back to the previous version"

Each step is a single MCP tool call, executed natively by the AI agent.

Tips

  • Project lookup is automatic — AI agents call list-projects first to find the correct project ID. You just say the project name.
  • Archives exclude junk — deploy automatically excludes node_modules, .git, .env, and .DS_Store from the upload.
  • Images and other binary files — inline files take text as a string and binary files as { "content": "<base64>", "encoding": "base64" } (at most 200 files and 10 MB decoded), also through the hosted connector.
  • No polling loops — deploy and redeploy wait for the result; when a build takes longer, one get-status with wait_for: "finished" waits again on the server.
  • Logs default to latest — get-logs fetches the most recent deployment's logs unless you specify a deployment ID.
  • Framework auto-detection — sota.io detects Next.js, Node.js, and Python automatically. No configuration needed.

See Also