Deploy with an AI coding agent

Your coding agent has built the app and is asking how to deploy it. Connect it to Salus once, through the Salus MCP server, and it can take the repository live itself: create the project, run the pipeline, add a database, read the logs and roll back. It works through the same platform, roles and pipelines as a person, so whatever your IT team has set up applies to everything the agent does.

This page covers any MCP-capable agent. There are step-by-step pages for Claude Code, OpenAI Codex and Cursor; OpenCode connects the same way, and its configuration is in step 2.

Before you begin

  • A Salus account. Start free; a new account lands on the Free plan.
  • A GitHub or GitLab connection in your organization settings. Salus builds from your repository and can’t create one for you, so the code has to be pushed there first. See Git Management.
  • An app that serves HTTP on a fixed port. Salus sends traffic to the port in the release configuration (8080 when an agent creates it) and doesn’t set a PORT variable, so an app that falls back to a default such as 3000 listens there.

Install the Salus CLI

The MCP server ships inside the salus binary:

curl -fsSL https://download.salus.cloud/install.sh | bash

This installs salus to /usr/local/bin/salus. Per-platform downloads and the Claude Desktop extension are on the MCP overview.

Add Salus to your agent

Every agent runs the same command, salus mcp. Pick yours:

Claude Code

claude mcp add salus -- salus mcp

Or commit it to the repository’s .mcp.json, so everyone who opens the project gets it:

{
  "mcpServers": {
    "salus": {
      "command": "salus",
      "args": ["mcp"]
    }
  }
}

OpenAI Codex

Add the server to ~/.codex/config.toml:

[mcp_servers.salus]
command = "salus"
args = ["mcp"]

Cursor

Add it to .cursor/mcp.json in the project, or ~/.cursor/mcp.json for every project:

{
  "mcpServers": {
    "salus": {
      "command": "salus",
      "args": ["mcp"]
    }
  }
}

OpenCode

Add it to opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "salus": {
      "type": "local",
      "command": ["salus", "mcp"],
      "enabled": true
    }
  }
}

If your agent can’t find salus, use the full path, /usr/local/bin/salus. Restart the agent so it reads the new configuration.

Sign in

There’s no separate login step. The first time the agent uses Salus, the server opens your browser to sign in, and prints a link if the browser can’t open. The session is reused after that.

Ask it to deploy

Push your code, then ask in plain words. Tell it the port if your app doesn’t listen on 8080:

Deploy this repository to Salus, in the Production environment.
The app listens on port 3000. Watch the pipeline and give me the URL
when it's live. If the build fails, show me the failing step's logs.

Not sure which port? Ask the agent to check the code first; it’s usually in the start command or the server’s listen call.

Behind that prompt, the agent:

  1. Finds your organization, workspace, Git connection, repository and environment (list_organizations, list_spaces, list_applications, list_repositories, list_environments).
  2. Creates the project, attaches a release configuration and starts the first pipeline in one call (deploy_repo). It uses buildpacks by default, or your Dockerfile when you ask for a custom Docker build.
  3. Follows the pipeline through build, tests, vulnerability scanning and deploy (get_pipeline), then reads the deployment’s URL (list_deployments).

Later pushes to the branch redeploy on their own. To redeploy without a push, ask the agent to start a new deployment of the existing project (start_deployment).

Add a database

Most apps need one. Ask for it in the same conversation:

Create a PostgreSQL database called orders-db in the same region as
this project's Production environment, link it to the project, and
redeploy so the app picks up the connection details.

Linking injects the connection details as environment variables named after the database, such as SALUS_DATABASE_ORDERS_DB_CONNECTION_STRING. Point your app’s database URL at that variable. See Connect a Database.

What the agent can and can’t do

The agent acts on your behalf, with your access. It can reach whatever you can reach, and nothing you can’t, so your organization’s roles, release rules and pipeline gates apply to every call. Deploys it starts appear in the organization’s audit log as made by Salus MCP acting as you.

You also choose how much it can do on the machine that runs the server, from Read-only through Standard, Operator (the default) and Full. Deleting a project, database or deployment needs Full, and the agent should confirm with you first. See Getting started with MCP.

Tell every agent how this project deploys

Add a short note to the repository so any agent that opens it, including the next one you try, deploys here the same way. Claude Code reads CLAUDE.md; Codex, Cursor and OpenCode read AGENTS.md:

## Deployment

This app deploys to Salus (https://salus.cloud) through the Salus MCP
server (`salus mcp`).

- Salus builds from the Git repository, so push before you deploy.
- First deploy: `deploy_repo`. It always creates a NEW project, so check
  `list_projects` first; if one exists, use `start_deployment`.
- The app listens on port 8080 (set `port` if that changes).
- Poll `get_pipeline` until it settles; `list_deployments` has the URL.
- Ask a person before anything destructive.

Troubleshooting

  • The pipeline passed but the app won’t load. The port Salus routes to doesn’t match the one your app listens on. Tell the agent the real port, or make the app listen on 8080. Also check that the deployment is exposed to the public, if you’re opening it from the internet.
  • The build failed and the agent can’t see why. If get_build_logs comes back empty, open the pipeline in the Salus console: each stage has its own logs.
  • The app keeps restarting. Check its logs. If it’s running out of memory, ask the agent to raise memorySize on the release configuration; new deployments start with 128 MB, the smallest size, which is enough for a small web app.
  • There are two projects for the same repository. deploy_repo always creates a new project. Delete the extra one, and use start_deployment to redeploy an existing project.
  • The agent says the repository doesn’t exist. Salus only sees code that’s pushed to your connected GitHub or GitLab. Push the branch, and check that the Git connection can access that repository.
  • The tools don’t show up. Check the configuration points at the salus binary with the mcp argument, then restart the agent.