Deploy with your AI coding agent (MCP)
If you build with an AI coding agent such as Claude Code, Codex, Cursor or VS Code, it can deploy and run your apps with The Deployer for you. Ask it to "put this app online" and it can check the code, fix what would stop a deploy, create the project, set the environment variables, propose a hosting plan with its monthly cost, launch it into your own cloud once you say yes, follow the deployment, and fix what fails. After that it can redeploy, add domains, resize servers, attach a database, schedule start and stop, and more. Agents connect to The Deployer through MCP (the Model Context Protocol), the standard way AI coding tools use outside services.
Your agent works in your code on your computer, and The Deployer works in your cloud. Together that closes the loop the app alone can't: when a deployment fails because of the code, your agent reads why, fixes the code, pushes, and tries again.
What your agent can do
With Operate access, the agent can take a repository all the way to a live app and keep it running:
- Check and fix the code. It checks whether the repository will deploy and what each problem's fix is, applies the fixes in your code, and commits them.
- Set up the project. It creates the project from your repository on one of your connected cloud accounts, picks the service to deploy, and sets environment variables. Values go in and never come back: no agent ever sees the values you've saved.
- Choose a plan with you. It shows you the hosting plans The Deployer proposes, with their monthly costs, and recommends one. Nothing is created until you say yes.
- Launch and follow. It launches the deployment, follows it step by step, answers health-check proposals and manual steps with you, and confirms the app answers at its address.
- Fix failures. When a deployment fails, it gets The Deployer's explanation of what went wrong and who fixes it, reads the errors, fixes the code or the configuration, and retries.
- Run it. Redeploy after a push, change environment variables, add or remove domains, resize servers and databases, start, stop and schedule servers, attach databases and other services, set who can open the app, add Dev or UAT environments, and check a live server's containers, logs, memory and disk.
- Work in your team's workspaces with exactly the permissions you have there.
With Look and redeploy access, the agent can check repositories, read your projects, deployments and logs, and redeploy a live project, but change nothing else.
The agent also has The Deployer's own playbooks built in: the order of a first deploy, what code needs to deploy, and how to handle each kind of failure. So it works the way The Deployer expects without you explaining anything.
What stays with you
- Anything that costs money waits for your yes. Before it launches, picks a plan, resizes, creates a database or adds an environment, the agent tells you what it is and what it costs. Your cloud provider bills you directly.
- Changes to a live app wait for your yes, such as a redeploy or switching traffic.
- Credentials never go through the agent. Connecting a cloud account or code host, and replacing credentials, happen in The Deployer, where the agent sends you. Never paste a key or password into an AI chat.
- Some things only you can do, in The Deployer: deleting a project, a database or a server, billing and plans, inviting teammates and changing their access, handing projects over, connecting agents and creating API keys.
Your AI tool also asks before it runs a tool, unless you've told it not to.
Step 1: Connect your agent
- Open Connections from the left sidebar and scroll to Coding agents.
- Click your agent: Claude Code, Cursor, VS Code, Codex, the Claude app, Gemini CLI, Copilot CLI, Windsurf (Devin), Kiro, Cline, Zed, opencode, Goose, Warp, JetBrains, or Another agent for any other MCP client.
- Follow the one or two steps it shows. For most agents that's one click (Open in Cursor, Open in VS Code, Open in Kiro, Open in Goose) or one command to paste in a terminal, such as:
claude mcp add --transport http --scope user thedeployer https://app.thedploy.com/mcp
- Your agent opens The Deployer in your browser. Check the agent's name and where the answer goes back to (usually this computer), choose Operate or Look and redeploy, confirm with your account password and click Allow access.
That's it: there's no key to copy or store. The Connections page shows the agent as connected the moment it finishes, with when it was last used. The Deployer emails you each time an agent is connected to your account.
How it works: https://app.thedploy.com/mcp uses MCP's standard sign-in (OAuth 2.1 with PKCE). Your agent gets a token that lasts an hour and renews it on its own. The Deployer only sends the sign-in back to a port on your own computer or to the agent's own app, never to another website, and you can disconnect an agent at any time on the Connections page. Changing or resetting your password disconnects every agent.
Agents that can't sign in
Some agents (JetBrains AI, or any agent running somewhere without a browser) connect with a key instead. On the agent's card, choose Use a key, pick what it may do and enter your password. The Deployer makes a key just for that agent and shows the setup with the key already filled in. The key is shown only once, and it's listed and disconnected with the agent on the Connections page.
Using a personal API key
For scripts and tools that aren't listed on the Connections page, you can still create a personal key yourself and use the address https://app.thedploy.com/api/v1/mcp.
Create a key on your Profile page
- Open Profile from the left sidebar.
- Under API keys and AI coding tools, type a name you'll recognize, such as
Claude Code on my laptop, and your account password. - Choose what an agent with this key can do: Operate (set up, launch and run projects end to end) or Look and redeploy.
- Click Create key and copy the key. It starts with
dpl_and is shown only once.
The Deployer emails you each time a key is created on your account, so you'll know if someone else makes one. Keys you created before Operate existed are Look and redeploy keys; create a new key to let an agent do more.
A key works only in AI coding tools, through The Deployer's MCP server. It can't sign in to The Deployer or be used anywhere else in it, so it can never see your cloud or git credentials or your environment variable values, change your billing, your team or your account, or create more keys.
Add the key to your tool
Right after you create a key, the Profile page shows the exact setup for Claude Code, Codex, Cursor, VS Code and other tools. Copy it into your tool.
Keep your key out of your project's files. Files like .mcp.json, .cursor/mcp.json and .vscode/mcp.json often get committed to git, and anyone who can read the repository could use a key written there. Each setup below keeps the key in your own settings instead.
Claude Code. Run one command in a terminal, in your project:
claude mcp add --transport http thedeployer https://app.thedploy.com/api/v1/mcp --header "Authorization: Bearer dpl_your_key"
Claude Code saves the key in your own settings on your computer, not in the project. To use The Deployer in all your projects, add --scope user right after thedeployer. Don't use --scope project: it writes the key into the project's .mcp.json, which is meant to be committed.
Codex. Add this to ~/.codex/config.toml in your home folder (Codex's own settings). It needs Node.js 18 or newer:
[mcp_servers.thedeployer]
command = "npx"
args = ["-y", "thedeployer-mcp"]
env = { THEDEPLOYER_API_KEY = "dpl_your_key" }
Cursor. Add this to ~/.cursor/mcp.json in your home folder, which applies to every project:
{
"mcpServers": {
"thedeployer": {
"url": "https://app.thedploy.com/api/v1/mcp",
"headers": { "Authorization": "Bearer dpl_your_key" }
}
}
}
To set it up in one project's .cursor/mcp.json instead, write Bearer ${env:THEDEPLOYER_API_KEY} in place of Bearer dpl_your_key, and set THEDEPLOYER_API_KEY in the environment Cursor runs in.
VS Code. VS Code can ask for your key and store it securely, so the key never sits in a file. Add this to .vscode/mcp.json, or run MCP: Open User Configuration to use it in every project:
{
"inputs": [
{
"type": "promptString",
"id": "thedeployer-key",
"description": "The Deployer API key",
"password": true
}
],
"servers": {
"thedeployer": {
"type": "http",
"url": "https://app.thedploy.com/api/v1/mcp",
"headers": { "Authorization": "Bearer ${input:thedeployer-key}" }
}
}
}
VS Code asks for the key the first time the server starts.
Other tools that connect to a remote MCP server take the same address, https://app.thedploy.com/api/v1/mcp, and the same Authorization header. The Profile page shows both, ready to copy. Put them in the tool's user settings, not in a file inside your project.
Some tools start a local command instead of connecting to an address. For those, use The Deployer's small open-source package, which needs Node.js 18 or newer. Add it to the tool's user settings, not to a file inside your project:
{
"mcpServers": {
"thedeployer": {
"command": "npx",
"args": ["-y", "thedeployer-mcp"],
"env": { "THEDEPLOYER_API_KEY": "dpl_your_key" }
}
}
}
The package passes each request to the same hosted server, so both ways offer the same tools. Its source is on GitHub.
When a deploy fails on your code
By default The Deployer fixes it for you, so you don't go back and forth between your agent and the dashboard:
- A deploy stops on a problem in your code: a build error, a missing dependency, an app that crashes on start (or the check before deploying finds one). The Deployer opens a fix request for it on the project's dashboard instead of retrying the same broken code.
- The Deployer's own fixer takes it. It reads the repository like a coding agent would, changes the files the fix needs, and builds the app the way the deploy will, before anything is pushed. Then it commits only those files and pushes them.
- The Deployer reads the commit from your git host and checks it: no CI workflows, coding agent settings or
.envfiles changed, and no secrets added. Then it deploys the fix, or opens a pull request for you to ship, as you choose on the dashboard under Code fixes. - If the fix didn't work, the fixer gets the new error and what it already tried, a few rounds at most. It stops and hands the problem to you, with what it tried, when the same error comes back twice, or when the fix needs something only you have: a secret, a paid service, a decision.
Prefer your own agent to do the fixing? Choose My coding agent under Code fixes. Then the request goes to
your connected agent: it reads it (the fixes and fix tools), takes it (claim_fix), fixes the code in your
local checkout, runs your build and tests, pushes, and tells The Deployer what it pushed (report_fix). The same
checks apply. With The Deployer's Claude Code plugin installed, Claude Code is told the moment a deploy of the
repository you have open stops on a code problem: the plugin asks you once to approve a listener code, and the
listener can only hear which fix requests changed. If no agent picks a problem up within the time you choose (10
minutes by default), The Deployer's own fixer takes it. Every card also has Copy prompt, a ready-made prompt for
any coding agent.
Step 2: Ask
Talk to your agent as you normally would. For example:
- "Deploy this repository to my DigitalOcean account with The Deployer."
- "Will github.com/me/my-shop deploy? Fix whatever would stop it."
- "My last deployment of my-shop failed. Find out why and fix it."
- "Add shop.example.com to my-shop."
- "Stop the my-shop servers every night at 10pm and start them at 8am."
- "Attach a Postgres database to my-shop."
- "What's the status of my projects on The Deployer?"
In clients that show MCP prompts, you can also pick Deploy this repository with The Deployer, Fix my failed deployment or Make this code deployable.
The tools
You don't need to know these, but here is what your agent uses:
| Tool | What it does |
|---|---|
guide | The Deployer's playbooks: the order of a deploy, what code needs, how to fix failures |
check_repo | Whether a public repository will deploy, what to fix, and what it would cost (no key needed) |
plan_deploy | The same, plus your connected accounts and your next step |
account | Your connected cloud accounts and code hosts, your workspaces, and what the key can do |
status | Your projects at a glance |
project | One project in depth: services, missing environment variables, plans and costs, to-dos, and the next step |
create_project | Creates a project from a repository and reads its code |
set_env | Sets environment variable values, which are never shown back |
launch | Shows the plan and its cost, then launches after you say yes |
deployment | Where a deployment is, what it waits on, and for a failed one what to do |
logs | A deployment's log, with secrets removed |
redeploy | Puts the latest code of a live project's branch online |
diagnose | Read-only checks on a live server: containers, the app's logs, memory and disk |
api_catalog, api_schema, api | Everything else: domains, scaling, schedules, databases, access, environments, blueprints, servers, adopting existing apps |
request_done_for_you | Asks The Deployer's team to do it for you; you order and pay in The Deployer |
Every change goes through the same permission checks as The Deployer's app, so an agent can never do more than you can.
Check code before you deploy
To check the code on your computer, run npx thedeploy-check in the repository (see Check a repository from your terminal or CI). Your agent can run it too: it checks what you've committed, so commit first.
Keeping keys safe
- Use one key per tool or computer, so you can revoke one without touching the others.
- Keep keys out of your repository. Put them in your tool's own settings on your computer, or let the tool ask for them, as shown above.
- A key works only in AI coding tools, through The Deployer's MCP server. It can't sign in to The Deployer.
- Creating a key needs your account password, and The Deployer emails you each time one is created. If you get that email and didn't create the key, revoke it on Profile and change your password.
- Changing or resetting your password revokes all your keys at once. Create new ones for your tools afterwards.
- If a key might have leaked, open Profile and revoke it. It stops working at once. Then create a new one.
- The Deployer keeps only a one-way hash of each key, never the key itself, and shows when each key was last used.
- Give an agent a Look and redeploy key when it only needs to read, and an Operate key when you want it to set up and run projects.
- Credentials, billing, your team, deleting things and creating keys always stay in The Deployer itself.