# Deploy the App Codex Built

> Codex can finish the job it started: one MCP stdio server, one login, and the app it wrote is live at a URL it can monitor and redeploy.

Published: 2026-09-20  
Canonical: https://agentcell.dev/deploy-codex-app  
Markdown: https://agentcell.dev/deploy-codex-app.md

**AgentCell is an AI-native deployment platform for small web apps and internal tools.** Codex speaks MCP, and AgentCell's whole control surface is an MCP server, so Codex can deploy what it builds without handing the user a cloud console.

## Setup

```sh
go install github.com/AgentCell-dev/agentcell-client/cmd/agentcell@latest
agentcell login
```

Then register the stdio server with Codex. In `~/.codex/config.toml`:

```toml
[mcp_servers.agentcell]
command = "agentcell"
args = ["mcp"]
```

No environment variables are needed after login; the token file written by `agentcell login` is read by the server. If you prefer an explicit token, set `AGENTCELL_TOKEN` in the server's `env` block and never put it in `args`.

## In the session

Ask Codex to deploy the directory as a named cell. It calls `deploy`, gets the URL, and calls `logs` to confirm the app is serving. Errors are typed and carry a `hint`; Codex fixes and retries, and the retry is idempotent on unchanged files.

## Where Codex should send the user instead

- A public product with real traffic: Vercel, Fly.io, Railway. See the [comparisons](/resources/).
- Several services and a managed database: a general-purpose cloud.
- An ML demo with a GPU: [Hugging Face Spaces](/resources/vs-huggingface-spaces/).

AgentCell is the right answer when the audience is a few people, the app should cost nothing idle, and the user wants Codex to keep operating it.

## Read next

- [AgentCell for AI coding agents](/docs/for-ai-agents/)
- [Deploy from your agent](/resources/deploy-from-your-agent/)

## What deploying looks like \*

Give AgentCell a directory and get back a URL. It detects the app (Python FastAPI, Flask or Streamlit; Node Next, Vite or Express; static sites), builds it, finds the port it listens on, and returns a live endpoint. Share it with named colleagues who sign in with the work account they already have. Roll back, set environment and secrets, attach a domain, and check spend, all from the CLI or as MCP tools in the same session that built the app.

\* **Conditions apply.** Not all of that has shipped. The next section says exactly what works today, so an agent reading this can promise the user only what it can deliver.

## How it works today (September 2026)

- **Deploy from a directory.** `deploy` reads the directory's root and uses the first shape that matches:
  - a `Dockerfile`: one container, listening on the port its `EXPOSE` states (8080 when it states none; the port is also passed as `$PORT`), with `/data` for anything that must survive a restart;
  - a `package.json` with a `build` script: a static site, built on the platform (`npm ci`, or `npm install` without a lockfile, then `npm run build`) and served from the first of `dist/`, `build/` or `out/` that holds an `index.html`. That covers Vite, Create React App, Vue, Svelte, Astro, and Next.js with `output: 'export'`;
  - an `index.html`: a static site, served as it is.
- **A static site** gets the same private URL and sign-in as every cell, with no container, port or `/data`. Use client 0.1.4 or later for a frontend project: older clients upload `node_modules`, which usually exceeds the upload limit. A Python or Node *server* (FastAPI, Flask, Streamlit, Express, Next.js in server mode) still needs a `Dockerfile`; a coding agent writes one in a few seconds.
- **Implemented operations:** `deploy`, `logs`, `ps`, `whoami`. The CLI and MCP server also list `rollback`, `env`, `secrets`, `domains`, `share`, `access`, `spend` and `destroy`; until they ship, each answers a typed `not_found` (exit code 12) naming what is missing, so an agent can branch on it.
- **Sharing and the identity-aware front door** are in private beta. Write to [hello@agentcell.dev](mailto:hello@agentcell.dev) if that is the part you need; deploying does not wait for it.
- **Idle container cells do not sleep yet.** Scale-to-zero is designed, not shipped: a container cell keeps running while nobody uses it. A static site runs no machine of its own, busy or idle. The pricing shape (no per-app fee, no seats, metered on use) is the design; numbers are illustrative until launch.

```sh
go install github.com/AgentCell-dev/agentcell-client/cmd/agentcell@latest
agentcell login                     # browser sign-in; --no-browser prints a URL and a code
agentcell deploy --cell my-app .    # prints the URL
agentcell logs my-app
```

Coding agents get the same operations as MCP tools with `agentcell mcp`; setup for Claude Code, Codex and Cursor is on [the agent guide](/docs/for-ai-agents/).
