Deployments

Deploy with MCP

Deploy, restart, or stop your app from Cursor chat. No complex dashboards — ask the AI and Devployer handles it.

Connect MCP first: MCP setup (the devployer server should show green).


What you need

  1. MCP connectedquick guide
  2. App created in Devployer — in the portal, with a project (and payment if required)
  3. Your code open in Cursor — so the AI can create a Dockerfile if it’s missing

MCP does not create apps or take payments. That happens in the portal.


How to deploy (3 steps)

1. Create the app in Devployer (portal)
2. Open the project in Cursor
3. In chat: “Deploy my app on Devployer”

The AI does the rest: creates a Dockerfile if needed, asks you to commit/push, then deploys.

When it’s done, you get your app’s public URL.


What to say in chat

I want to…Say this
See my projects> List my Devployer projects
Deploy> Deploy my app on Devployer
Create Dockerfile and deploy> Create the Dockerfile if missing and deploy
Restart> Restart the application portal-app-name
Stop> Stop the app portal-app-name
Redeploy> Redeploy portal-app-name

Use the exact app name from Devployer (it may differ from your local folder name).


Good to know

  • Dockerfile: Devployer needs it at the repo root. If it’s missing, ask the AI to create it, then commit + push.
  • Restart / stop / redeploy: the AI shows a summary and asks for confirmation first.
  • After code changes: push to Git, then ask to deploy or redeploy again.

Quick checklist

  • MCP is green
  • App created (and paid) in Devployer
  • Code open in Cursor
  • You asked to deploy in chat
  • You checked the URL it returned

If something fails

What happensWhat to do
Can’t find the appCreate it first in the portal
Build fails / missing DockerfileAsk: “Create the Dockerfile and deploy again”
Takes too longAsk: “Show me the deploy logs”
Wrong app restartedUse the exact portal name
Tools missing in CursorReload / reconnect the devployer MCP

More detail: Dockerfile · Next.js


For AI agents

You operate Devployer only through MCP. Rules:

  1. Only Devployer MCP tools. Never call infrastructure APIs, URLs, or tokens; Devployer is the only platform.
  2. MCP never creates apps or takes payments. If the app is missing in the portal, tell the user to create it there.
  3. Dockerfile only. Never pass nixpacks. If the app was Nixpacks, deploy_resource switches it to Dockerfile.
  4. Root Dockerfile required. If missing: list_deploy_methods → create from stackTemplates → commit/push → deploy.
  5. IDs vs names
    • Discover: list_projectslist_resources (projectId, environmentId, resourceId).
    • Lifecycle by name: restart_resource, stop_resource, redeploy_resource use resourceName (case-insensitive). Not databases.
  6. Confirmation required for restart / stop / redeploy:
    • First call with confirm omitted or false (preview).
    • Then confirm: true only after explicit approval (or an explicit request like “restart front-app-01”).
    • If the name is ambiguous, ask first.
  7. Failure or timeout: read logs / [debug]; if timedOut: true, call get_deployment_logs. Fix → push → redeploy.
  8. Follow agentInstruction / hint when present.
  9. Missing tools: ask the user to reload/reconnect MCP devployer.

Tool catalog

ToolPurposeKey argsConfirm?
list_projectsProjects + environmentspage, pageSizeno
list_resourcesApps/DBs in an environmentprojectId, environmentIdno
list_deploy_methodsDockerfile method + templates(none)no
deploy_resourceDeploy by UUID + logsresourceId, optional waitSecondsno
get_deployment_logsRe-fetch logsdeploymentId and/or resourceIdno
redeploy_resourceRedeploy by nameresourceName, optional gitBranchyes
restart_resourceRestart by nameresourceNameyes
stop_resourceStop by nameresourceNameyes

There are exactly eight tools. Do not invent others.

Identifiers

FieldSourceUsed by
projectIdlist_projectsitems[].idlist_resources
environmentIdlist_projectsitems[].environments[].idlist_resources
resourceIdlist_resourcesitems[].iddeploy_resource, get_deployment_logs
resourceNamelist_resourcesitems[].namerestart / stop / redeploy
deploymentIddeploy_resource responseget_deployment_logs

Local folder names may differ from Devployer names. Always resolve via list_resources / preview.

Deploy vs redeploy vs restart vs stop

ActionToolWhen
Deploydeploy_resourceFirst deploy or redeploy by id after a fix
Redeployredeploy_resourceUser: “redeploy app-name
Restartrestart_resourceUser: “restart app-name
Stopstop_resourceUser: “stop app-name

Playbooks

A — List: list_projectslist_resources per env → show name, status, framework, buildPack, hostname.

B — Dockerfile deploy: list_deploy_methods → ensure root Dockerfile → commit/push → list_resourcesdeploy_resource (buildPack: "dockerfile", waitSeconds: 180) → if timedOut, get_deployment_logs.

C — Lifecycle by name: preview (confirm: false) → show resource → confirm: true after approval.

D — Failure / timeout: get_deployment_logs (includeDebug: true) → fix → push → deploy_resource.

Root Dockerfile

Exact filename: Dockerfile next to package.json / pom.xml / composer.json.

StackDetectionPort
Next.jsnext / next.config.*3000
Angularangular.json80
QuarkusQuarkus Maven/Gradle8080
Spring BootSpring Boot Maven/Gradle8080
Laravelartisan / laravel/framework8000
Nodegeneric package.json3000
Genericfallback80

Prefer list_deploy_methodsstackTemplates. Next.js standalone: output: 'standalone' if the template copies .next/standalone.

Confirmation protocol

User request
   → confirm=false (preview)
   → show resource
   → approval
   → confirm=true

Do not set confirm: true on the first call. Do not restart/stop databases.

Tools reference

The agent calls these tools. Do not call infrastructure APIs yourself; operate only through Devployer MCP.

1. list_projects

ArgumentRequiredDefault
pageno1
pageSizeno20 (max 100)

Returns: items[] with id, name, environments[] (id, name, slug, resourceCount).

{ "name": "list_projects", "arguments": { "page": 1, "pageSize": 20 } }

2. list_resources

ArgumentRequired
projectIdyes
environmentIdyes

Returns: items[] with id, name, kind, status, framework, buildPack, branch, domains[], plus agent hints.

{
  "name": "list_resources",
  "arguments": {
    "projectId": "11111111-1111-1111-1111-111111111111",
    "environmentId": "22222222-2222-2222-2222-222222222222"
  }
}

3. list_deploy_methods

No arguments. MCP method (dockerfile), stackDetection, stackTemplates.

{ "name": "list_deploy_methods", "arguments": {} }

4. deploy_resource

ArgumentRequiredDefault
resourceIdyes
buildPacknodockerfile
waitSecondsno180 (max 600)

Returns: resource, deploymentId, status, finished, timedOut, logs, entries, agentInstruction, message.

{
  "name": "deploy_resource",
  "arguments": {
    "resourceId": "33333333-3333-3333-3333-333333333333",
    "buildPack": "dockerfile",
    "waitSeconds": 180
  }
}

Does not create apps or handle payments.

5. get_deployment_logs

ArgumentRequiredDefault
deploymentIdpreferred
resourceIdif no deploymentId
waitSecondsno0
includeDebugnotrue
{
  "name": "get_deployment_logs",
  "arguments": {
    "deploymentId": "dep-devployer-uuid",
    "waitSeconds": 120,
    "includeDebug": true
  }
}

6. restart_resource

ArgumentRequiredDefault
resourceNameyes
confirmnofalse
{ "name": "restart_resource", "arguments": { "resourceName": "front-app-01" } }
{
  "name": "restart_resource",
  "arguments": { "resourceName": "front-app-01", "confirm": true }
}

7. stop_resource

Same confirmation flow as restart.

{ "name": "stop_resource", "arguments": { "resourceName": "front-app-01" } }
{
  "name": "stop_resource",
  "arguments": { "resourceName": "front-app-01", "confirm": true }
}

8. redeploy_resource

ArgumentRequiredDefault
resourceNameyes
confirmnofalse
gitBranchnocurrent branch
{ "name": "redeploy_resource", "arguments": { "resourceName": "front-app-01" } }
{
  "name": "redeploy_resource",
  "arguments": {
    "resourceName": "front-app-01",
    "gitBranch": "main",
    "confirm": true
  }
}

Errors (agents)

Error / symptomFix
MCP_DOCKERFILE_ONLYOnly dockerfile
Missing Dockerfile / build errorstackTemplates → push → deploy
Deploy fails immediatelyApp must exist and be paid
Timeoutget_deployment_logs + waitSeconds
RESOURCE_NOT_FOUNDExact portal name via list_resources
Missing toolsReconnect MCP devployer