# An MCP server for deploying apps from your AI agent

Your AI agent can write an app. With the right tools, it can also deploy it, read its logs and fix it when it breaks, without you learning the hosting side.

Those tools usually come as an MCP server. This is what an MCP server for deploying looks like, using Toupas as the example, and how to add one to Claude Code, Codex, Cursor, ChatGPT or Claude.

![Coding agents run Toupas's MCP server on your computer, next to your code. ChatGPT and Claude connect to the hosted server at toupas.com/mcp. Both make apps live at a link.](/blog/images/two-mcp-servers.svg)

## What MCP is

MCP, the Model Context Protocol, is a standard way to give an AI agent tools. A host such as Toupas describes what each tool does, and the agent decides when to use one.

So you don't type commands. You say "make this live" or "why is the sign-in broken?", and the agent picks the tools that answer it.

## Two kinds of MCP server

Toupas has two, because the agents work in two different places.

**On your computer, for coding agents.** Claude Code, Codex, Cursor and Windsurf work on files on your computer. Toupas's MCP server runs there too, as `toupas mcp`, so it can read your app, prepare it and send it. It works with the app you already have.

**Hosted, for chat apps.** ChatGPT and Claude, on the web and on your phone, run on their makers' servers and can't reach your computer. They connect to `https://toupas.com/mcp` and sign in to your Toupas account. The chat writes the files and sends them, and Toupas makes them live as a website, or as an app with sign-in and saved data.

## What the tools do

The coding agent server has around 40 tools. Grouped by job:

| Job | Example tools |
|---|---|
| Make the app live, or update it | `toupas_make_live` |
| Find out what's wrong | `toupas_get_deployment`, `toupas_get_logs`, `toupas_doctor` |
| Settings and secrets | `toupas_set_env`, `toupas_list_env` |
| Database | `toupas_get_database`, `toupas_db_query`, `toupas_db_export` |
| Files | `toupas_get_storage`, `toupas_list_files` |
| Links and domains | `toupas_set_subdomain`, `toupas_add_domain` |
| Plan and usage | `toupas_get_usage`, `toupas_get_billing` |

The one that matters most is `toupas_make_live`. It works out how the app runs, prepares it, sends only the changed files and returns the link. Calling it again updates the live app.

## Built so the agent can't surprise you

Giving an agent control of a live app needs some care. Toupas's tools follow a few rules:

- **Some questions are only for you.** Whether the live app starts with a copy of your local data, for example. The tool hands the question back and the agent has to ask you.
- **Nothing goes offline without a second step.** Tools that delete or take things offline only describe what would happen, until they're called again with confirmation.
- **The agent never pays.** It gets a link for you to pay in your browser.
- **Secrets stay secret.** Keys set as secrets aren't shown back, and `.env` files never go live.
- **Errors come with a fix.** Each error has a code and a plain explanation, so the agent knows what to do next instead of guessing.

## Adding it to a coding agent

The easy way is to ask your agent:

```
Make this app live with Toupas. Instructions: https://toupas.com/agents.md
```

After your app is live the first time, the agent asks whether it can add Toupas's tools. If you agree, `toupas init --agents --yes` registers the server with Claude Code, Codex, Cursor and Windsurf, whichever are installed. The tools appear in your next session. There's a step-by-step for [Claude Code](/blog/deploy-claude-code-app), [Cursor](/blog/deploy-cursor-app) and [Codex](/blog/deploy-codex-app).

To add it by hand to an agent that reads `mcpServers` JSON, run the program with the `mcp` argument, using its full path:

```json
{
  "mcpServers": {
    "toupas": { "command": "/Users/you/.toupas/bin/toupas", "args": ["mcp"] }
  }
}
```

The [VS Code extension](https://marketplace.visualstudio.com/items?itemName=Toupas.toupas) also adds the tools for the editor's agent.

## Adding it to ChatGPT or Claude

- **Claude:** connect Toupas from [Claude's connectors directory](https://claude.ai/directory/toupas).
- **ChatGPT:** connect Toupas from [ChatGPT's apps](https://chatgpt.com/plugins/plugin_asdk_app_6ae8cf8f523081918abf2d72b102f175). Or add a custom app with the server address `https://toupas.com/mcp` and OAuth sign-in (that needs a paid plan and developer mode).

The [setup page](/chat) has every step. Do it on a computer once, and it works in the phone apps too.

## Questions

### What is an MCP server for deployment?

A set of tools an AI agent can use to put an app online and look after it: deploying, reading logs, setting secrets and managing domains. The agent calls them when you ask in plain words.

### Which AI agents can deploy apps with Toupas?

Claude Code, Codex, Cursor and Windsurf, through the MCP server on your computer, and ChatGPT and Claude, through the hosted server at toupas.com/mcp.

### Is it safe to let an AI agent deploy my app?

Toupas's tools ask you before anything only you should decide, need a second step before taking anything offline, and never pay for anything. Your agent may also ask your permission before it runs commands.

### Do I need MCP to use Toupas from a coding agent?

No. The agent can run the `toupas` program in the terminal. The MCP tools make it smoother, and the agent offers to add them after the first time.
