Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
DEPRECATED: Replaced by mcp-app-builder. Previously used to build ChatGPT apps with interactive React widgets via mcp-use.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/foundations/deployment.md
1# Deployment23Guide for deploying MCP servers to production.45## ⚠️ FIRST: Ensure the User is Logged In67**Before any deployment command, always verify authentication:**89```bash10mcp-use whoami11```1213If this fails or the user has never logged in, run `mcp-use login` first — it opens a browser for OAuth.1415---1617## Quick Deploy (Manufact Cloud)1819The fastest path to production — one command:2021```bash22mcp-use deploy23```2425Or via the npm script (pre-configured in all templates):2627```bash28npm run deploy29```3031Your server is live at `https://{slug}.run.mcp-use.com/mcp`.3233---3435## Prerequisites3637Before running `mcp-use deploy`:38391. **Logged in** — run `mcp-use whoami` to verify, or `mcp-use login` if needed402. **Git repository** — your project must be a git repo413. **GitHub remote** — the `origin` remote must point to GitHub (SSH or HTTPS)424. **Changes pushed** — deployment pulls from GitHub, not your local files. Commit and push first.435. **GitHub App installed** — the mcp-use GitHub App must have access to the repo. The CLI will prompt you to install it if missing.4445---4647## Deploy Options4849```bash50mcp-use deploy [options]51```5253| Flag | Description | Default |54|------|-------------|---------|55| `--name <name>` | Custom deployment name | `package.json` name or directory name |56| `--port <port>` | Server port | `3000` |57| `--runtime <runtime>` | `"node"` or `"python"` | Auto-detected from project files |58| `--env <KEY=VALUE>` | Set environment variable (repeatable) | — |59| `--env-file <path>` | Load env vars from a file | — |60| `--open` | Open deployment in browser after success | `false` |61| `--new` | Force a fresh deployment (ignore existing link) | `false` |6263### Setting Environment Variables6465```bash66# Inline67mcp-use deploy --env API_KEY=sk-xxx --env DATABASE_URL=postgres://...6869# From file70mcp-use deploy --env-file .env.production71```7273**NEVER commit secrets to git.** Use `--env` or `--env-file` for API keys, database URLs, and other sensitive values.7475---7677## Common Mistakes7879- ❌ Running `mcp-use deploy` without verifying auth first80- ✅ Always run `mcp-use whoami` before deploying — run `mcp-use login` if needed81- ❌ Running `mcp-use deploy` with uncommitted/unpushed changes82- ✅ The cloud builds from GitHub — always `git push` first83- ❌ Hardcoding secrets in code or committing `.env`84- ✅ Use `--env` / `--env-file` flags, or `mcp-use deployments env set`85- ❌ Forgetting to install the mcp-use GitHub App on the repo86- ✅ The CLI will prompt you, but you can also install it at `github.com/apps/mcp-use`87- ❌ Running `mcp-use start` without `mcp-use build` first88- ✅ Always build before starting in production89