DEV Community

Cover image for Deploy your Cursor app to production
Saif Ali
Saif Ali

Posted on Originally published at nexusai.run on

Deploy your Cursor app to production

Deploy your Cursor app to production

Published: September 2, 2026
Category: AI Deployments · MCP
Reading time: 6 minutes
Author: NEXUS AI Team


Point Cursor at NEXUS AI over MCP. Deploy the app sitting in your editor. Get a public HTTPS URL with Postgres, then back up, tail logs, and roll back from chat.

Cursor is strong at generating and editing the app. Production still needs a database, secrets, a URL, and a rollback path. Vercel MCP will host a frontend. NEXUS AI deploys the full stack the agent just wrote: app, Postgres, Redis, storage, workers.

This is the Cursor path. Claude Code users should read Deploy from Claude Code to a live URL.

What you need

  • A NEXUS AI account (start free)
  • Cursor with Agent and MCP enabled
  • The project open in Cursor (a GitHub remote is the easy deploy source)

No API key to paste. Cursor runs an OAuth sign-in the first time it connects to the server, and you approve the access the agent gets.

1. Add NEXUS AI in Cursor

Option A — project file (recommended)

Create .cursor/mcp.json in the repo:

{
  "mcpServers": {
    "nexus-ai": {
      "url": "https://mcp.nexusai.run/mcp"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

No token in the file, so it is safe to commit. When Cursor first uses the server it opens a browser sign-in on mcp.nexusai.run; you approve the scopes and Cursor stores the token itself.

Option B — Cursor Settings

Cursor Settings, MCP, Add server. Same URL. Complete the OAuth sign-in when prompted.

Option C — all projects on this machine

Put the same JSON in ~/.cursor/mcp.json.

Approve only what the agent needs. Start with deployments:read and deployments:logs to inspect. Add deployments:create to deploy, secrets:manage to let it write secrets, db:admin for backups and restores, and buckets:manage if it will create a storage bucket. Leave the delete scopes (deployments:delete, buckets:delete, db:source:delete) off unless you want them.

Reload MCP in Cursor Settings and confirm nexus-ai is green. If the sign-in never completes, the server stays unauthenticated and every tool call fails; re-open the auth screen from the MCP settings row.

2. Send this prompt in Agent

With the project open:

Deploy this Cursor project to NEXUS AI with Postgres and Redis. Use the GitHub remote as the source. Detect the framework and start command from the repo. Wait until it is healthy, then give me the public HTTPS URL and the deployment ID. If there is no Git remote, push the current files to the NEXUS AI Builder for a preview first (nexusai_builder_push), then deploy.

What should happen:

  1. Cursor reads the repo it already has open
  2. nexusai_deploy_source with the Git URL, framework, and services: ["postgresql", "redis"] (or nexusai_builder_push then deploy)
  3. nexusai_deploy_status until healthy
  4. nexusai_deploy_logs on failure

You stay in the editor. No second terminal for Docker, no dashboard click-path unless you want one.

Postgres and Redis run as sidecars on the NEXUS managed container platform, with DATABASE_URL and REDIS_URL injected automatically. On a single-container cloud target (App Runner, Cloud Run, Container Apps), Postgres becomes a managed instance and Redis is not available.

For uploads, add:

Create a bucket named user-uploads, attach it to this deployment, and redeploy so the app gets S3_ENDPOINT, S3_BUCKET, S3_ACCESS_KEY, and S3_SECRET_KEY.

3. After it is live

Save these as follow-ups in the same Agent thread.

Secret the app is missing

The app needs STRIPE_SECRET_KEY. Create it in the NEXUS vault for this deployment and redeploy. Do not print the value.

Backup, then migrate

Snapshot Postgres for this deployment. Then I will run the migration. If the logs show a migration error, restore the snapshot and roll back.

Why is it 500

Tail runtime logs, identify the exception, patch the file in this workspace, and redeploy.

Roll back

Roll this deployment back to the previous release and confirm it is healthy.

Backups and rollback are safe. The tools that overwrite or delete data (nexusai_db_restore, nexusai_deploy_delete, bucket and volume delete) carry a destructive hint, so Cursor asks you to confirm each call. Do not approve deployments:delete on a token you use against production.

4. Builder preview without leaving Cursor

nexusai_builder_push sends the current files into the NEXUS AI Builder and returns a preview URL. Use it when you want a shareable snapshot before production. nexusai_builder_pull brings builder-side edits back into the Cursor workspace.

That is the Cursor loop: generate in the IDE, preview on a URL, deploy the same tree.

Frequently asked questions

Will this replace Vercel for a Cursor frontend?

Use Vercel if you only need the UI. Use NEXUS AI when the Cursor app needs Postgres, Redis, workers, or file uploads in the same deploy.

Do I need the NEXUS CLI?

No. The MCP server is enough. The nexus CLI is optional if you prefer a terminal.

How does authentication work? Is there an API key?

No static key. The MCP server uses OAuth with PKCE, and Cursor runs the sign-in in a browser on first connect. You approve the scopes there and can re-approve a wider set later from the MCP settings row. The personal access tokens at nexusai.run/settings/tokens are for the REST API, not the MCP server.

Can the rest of the team deploy from Cursor too?

Yes. Commit .cursor/mcp.json with just the url. Each person signs in once on their own machine.

How is this different from other Cursor MCP hosts?

Other services focus on hosting the MCP server or the frontend. NEXUS AI's job is the production stack after the URL is up: managed databases, backups, rollback, secrets, and the same tools from the dashboard, CLI, and MCP.

Claude Code instead of Cursor?

Same product, different client. See Deploy from Claude Code to a live URL.

Related reading

Top comments (0)