# Codex + Ample: deploy apps from Codex

Set up OpenAI Codex CLI to deploy apps to Ample: connect the MCP server, sign in, and add the skills.

[Read as Markdown](/content/agents/codex.md)

## the short version
To let Codex deploy to Ample, connect it to Ample's MCP server at https://api.ample.computer/mcp and sign in with your email (a 6-digit code, no password). Then ask it to deploy: Ample builds the app, returns a live HTTPS URL, and explains any failure so Codex can fix it.

## Set up Codex for Ample

1. **Install Codex.**  
   
   ```
   $ curl -fsSL https://chatgpt.com/codex/install.sh | sh
   ```

2. **Connect Codex to Ample's MCP server.** This writes the server to `~/.codex/config.toml`.  
   
   ```
   $ codex mcp add ample --url https://api.ample.computer/mcp
   ```

3. **Sign in.** Codex opens Ample's sign-in page in your browser as soon as you add the server; if you closed it, run this. Ample asks for your email and sends a 6-digit code; a new email gets a Free account. Then approve the connection.  
   
   ```
   $ codex mcp login ample
   ```

4. **Add the Ample skills (optional).** Three skills teach Codex when and how to deploy, connect services and migrate. Remove the directories to uninstall.  
   
   ```
   $ curl -fsSL https://ample.computer/skills.sh | sh -s -- .agents/skills
   ```

5. **Ask it to deploy.** The deploy waits until the app is live or failed and returns the URL. On failure the result says who must act and suggests a fix.  
   
   ```
   Deploy this app to Ample and give me the URL.
   ```

## Example prompts
Say any of these to Codex. Copy one and paste it in.

- “Deploy this app to Ample and give me the URL.”
- “Add a Postgres database to this app on Ample and redeploy.”
- “The Ample deploy failed. Read the logs, fix the cause and deploy again.”
- “Put the uploads in an Ample bucket and serve them from the CDN.”
- “Move this app from Heroku to Ample.”

## Notes
- Codex reads `AGENTS.md` from the project root down to the working directory.

## Sources
- https://learn.chatgpt.com/docs/extend/mcp?surface=cli
- https://learn.chatgpt.com/docs/build-skills
- https://learn.chatgpt.com/docs/codex/cli
