# Deploy from an AI agent

Any agent that can run a shell command or call an MCP tool can publish to Drop2Run. Nothing here is
tied to one model or one vendor: the CLI is a command, the MCP server is a standard MCP server — run
locally over stdio or reached by URL — and the skill file is the open `SKILL.md` format. Which one you
want depends on where the agent runs:

| Where the agent runs | Use | Why that one |
|---|---|---|
| **A coding agent with a shell** — Claude Code, Codex, Gemini CLI, Cursor's agent, Copilot in VS Code | the [CLI](/docs/cli) | It already runs commands, so a deploy is a command rather than a tool to configure |
| **A chat app with no shell** — Claude Desktop, or any client that only speaks MCP | the [MCP server](/docs/mcp) | It needs a tool, because it cannot run one |
| **A chat on the web or a phone** — claude.ai, Claude's mobile apps, ChatGPT | the [MCP server](/docs/mcp) by URL, `https://mcp.dropto.run/mcp` | It cannot run a program on your machine, so it connects to one that is already running |
| **Your own agent** | the CLI with `--json`, or the [API](/api) | Every command answers in JSON, so nothing has to parse prose |

Coding agents can take either route. The CLI does more than publish — `init`, `rm`, `token list` — and
works the same in every shell; the MCP server needs nothing installed globally and signs you in from
inside the chat. Both read the same credential from the same file, so signing in once covers both.

## The CLI, for any agent with a shell

```bash
npm i -g drop2run
drop2run login
```

That is the whole integration, in every agent. Asking for a deploy is asking for a command:

> Publish `dist` to Drop2Run and tell me the URL.

The agent runs `drop2run deploy dist`, reads the URL out of the output, and hands it back.
[The CLI page](/docs/cli) has the rest of the commands and the `--json` contract.

## The MCP server, client by client

The server is the npm package `@drop2run/mcp`, started with `npx`, so there is nothing to install
first. Every client below runs the same command; what differs is where each one keeps its list of
servers. Add it, then ask for a publish — with no token stored, the agent calls the server's `login`
tool, a browser tab opens, and the publish carries on after you approve it.

A client that takes a URL can skip `npx` altogether: the same tools are hosted at
`https://mcp.dropto.run/mcp`, and the [MCP server page](/docs/mcp) has the setup for claude.ai, Claude
Code, Cursor and ChatGPT. The hosted server publishes text files only, so a folder on disk or a PDF still
goes through the local one.

**Claude Code.**

```bash
claude mcp add drop2run -s user -- npx -y @drop2run/mcp
```

**Claude Desktop.** Download [`drop2run.mcpb`](https://dropto.run/drop2run.mcpb) and open it — see
[Deploy from Claude](/docs/claude).

**Cursor.** Add this to `~/.cursor/mcp.json` for every project, or `.cursor/mcp.json` for one:

```json
{
  "mcpServers": {
    "drop2run": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@drop2run/mcp"]
    }
  }
}
```

**VS Code** (GitHub Copilot's agent mode). One command adds it to your user profile:

```bash
code --add-mcp '{"name":"drop2run","command":"npx","args":["-y","@drop2run/mcp"]}'
```

Or for one workspace, in `.vscode/mcp.json` — note the top-level key is `servers`, not `mcpServers`:

```json
{
  "servers": {
    "drop2run": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@drop2run/mcp"]
    }
  }
}
```

**Codex.**

```bash
codex mcp add drop2run -- npx -y @drop2run/mcp
```

That writes the same thing you could add to `~/.codex/config.toml` yourself:

```toml
[mcp_servers.drop2run]
command = "npx"
args = ["-y", "@drop2run/mcp"]
```

**Gemini CLI.** Add it to `~/.gemini/settings.json` for every project, or `.gemini/settings.json` for
one:

```json
{
  "mcpServers": {
    "drop2run": {
      "command": "npx",
      "args": ["-y", "@drop2run/mcp"]
    }
  }
}
```

**Zed.** In `settings.json`, under `context_servers`:

```json
{
  "context_servers": {
    "drop2run": {
      "command": "npx",
      "args": ["-y", "@drop2run/mcp"],
      "env": {}
    }
  }
}
```

**Anything else** — Cline, Goose, Windsurf, your own client — takes a server as a command and its
arguments, under whatever name that client gives its server list. The command is `npx` and the
arguments are `-y @drop2run/mcp`. The [MCP server page](/docs/mcp) covers signing in without a browser
and bringing your own token.

## The skill file, client by client

A skill is optional. What it adds is the one rule an agent does not work out from `--help` — that a
deploy with no site named creates a *new* site — and [Agent skill](/docs/for-agents) has what is in it.

It is one file in the `SKILL.md` format, which Codex, Cursor, Gemini CLI and Copilot in VS Code all read
from `.agents/skills/`:

```bash
mkdir -p .agents/skills/drop2run
curl -fsSL https://dropto.run/SKILL.md -o .agents/skills/drop2run/SKILL.md
```

Claude Code reads the same file from `.claude/skills/` instead:

```bash
mkdir -p .claude/skills/drop2run
curl -fsSL https://dropto.run/SKILL.md -o .claude/skills/drop2run/SKILL.md
```

Use `~/.agents/skills/` or `~/.claude/skills/` to have it in every project on the machine.

## Chats that cannot add a server

**Claude on the web and on a phone** add the hosted server as a connector, and **ChatGPT** does the same
where your plan offers developer mode — [MCP server](/docs/mcp) has the steps. A chat that cannot add a
server at all, Gemini and most others among them, has nothing to call: paste what it wrote into
[dropto.run/publish](https://dropto.run/publish), which needs no setup at all.

## What to expect it to get wrong, and what stops it

The same whichever agent is driving. Two of these are deliberate refusals rather than gaps, and both
exist because an agent acting on a vague instruction is exactly the case they are for.

**It will create a new site unless told otherwise.** No site named means a new site — never the most
recent one, because silently replacing whatever you published last is the worst possible reading of
"publish this". Run `drop2run init dist` once to write `drop2run.json`, or name the site each time with
`--site`; the MCP tools take the same `site` argument. Without it, "update the site" three times leaves
three sites and a stale URL in the conversation.

**It will let the address be generated unless you say one.** A new site is `brave-otter-4f2a` until you
ask for something else: say "publish this as release-notes" and it passes `--subdomain release-notes`, or
`subdomain` to the MCP tools. Worth saying up front: a site can change its name only twice
(`drop2run set subdomain`, or `change_subdomain` in MCP), and every old name stays with the site as a
redirect — so a guessed name costs one of those two changes.

**It cannot delete anything by accident.** `drop2run rm` prints what it would delete and stops; only
`--yes` proceeds. A terminal has no confirmation dialog, so the flag is the dialog — and an agent that has
not been told to pass it will report the refusal rather than route around it.

**It cannot mint itself a credential.** A token cannot create or revoke tokens; both need a browser
session. So the worst an agent can do with your token is what you can do with your own sites, and
`drop2run token list` shows every machine still holding one. See
[Authentication](/docs/auth#what-a-token-cannot-do).

**It cannot publish your repository by mistake, mostly.** `.git`, `node_modules`, `.claude`, `.vscode`,
`.idea` and the usual macOS and Windows debris are filtered before the manifest is built. Everything else
in the folder you point at goes up, so point at a build output directory rather than a project root.

House rules of your own — always `init` first, never `rm`, always report the URL — belong in your
project's own instruction file (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md`), where they apply to your
repository rather than to everybody's.
