DEV Community

Cover image for I let my AI agent deploy a Next.js app and it actually worked

I let my AI agent deploy a Next.js app and it actually worked

I've been using Claude and Cursor to write code for a while now. The part that always annoyed me was the handoff. The agent writes the app, then I alt-tab to some dashboard, click through a deploy wizard, set up a database in another tab, configure env vars somewhere else. The agent did the interesting work. I got the chores.

So I tried something different: I connected an MCP server to Claude that has actual infrastructure tools — not just "read your logs" tools, but tools that create databases, deploy apps, set up domains. The MCP server is from Open Source Cloud, and the tool I cared about was create-my-app.

The deploy

Here's the literal prompt I used:

Deploy my Next.js app from https://github.com/myuser/my-app
as a Node.js app called "myapp"
Enter fullscreen mode Exit fullscreen mode

The agent called create-my-app. OSC pulled the repo, detected Next.js, built it, deployed it to Kubernetes, and gave me an HTTPS URL at *.apps.osaas.io with TLS already configured. Took about 30 seconds.

No Dockerfile. No build config. No YAML.

The app is private to your account by default.

What happened next was the interesting part

I didn't leave the conversation. I just kept going:

Create a Postgres database called myappdb and set up a parameter
store with the connection string as DATABASE_URL
Enter fullscreen mode Exit fullscreen mode

That turned into three tool calls: create-database, setup-parameter-store, set-parameter. Database created, connection string wired into the app's config.

Then later when something broke:

Show me the last 50 error logs for my app
Enter fullscreen mode Exit fullscreen mode

The agent called get-my-app-logs with level: error and tail: 50. I read the error right there in the chat, fixed the code, and:

Restart my app to pull the latest code
Enter fullscreen mode Exit fullscreen mode

One call to restart-my-app. It pulled the latest commit and restarted the container.

The whole loop — code, deploy, break something, read logs, fix, redeploy — happened without switching windows. That's the part that felt genuinely different.

Other runtimes

Same flow works for Python and WebAssembly:

Deploy my FastAPI app from GitHub as a Python app called "apiserver"
Enter fullscreen mode Exit fullscreen mode

Private repos work too — you pass a GitHub token and it gets stored as a Kubernetes secret.

If you don't have a repo hosted anywhere, there's a setup-git-repo tool that creates a hosted Git repo you can push to and then deploy from.

Custom domains

Map myapp.example.com to my app
Enter fullscreen mode Exit fullscreen mode

One call to create-my-domain. TLS gets provisioned automatically.

On portability

One thing worth mentioning: everything running under the hood is open source. The web runner, the database (actual Postgres), the storage (MinIO-compatible). You can take the whole stack and move it elsewhere if you want to.

That matters more than usual here because the agent is making infrastructure decisions on your behalf inside a conversation. Knowing you can pull everything out and self-host it later is reassuring.

What people have built

Someone built Streaming Tech TV+ — a streaming platform with video transcoding, AI subtitles, analytics, and a CMS — in 36 hours using 6 AI agents across 13 services. That's 15,000 lines of code deployed to production by one person.

There are more examples at osaas.io/examples if you're curious.

Getting started

  1. Sign up at osaas.io (there's a free tier)
  2. Connect the MCP server to Claude Desktop, Cursor, Copilot, Windsurf, or whatever MCP client you use
  3. Tell your agent to deploy something

The My Apps page is where you manage your deployed apps through the web UI, if you want that.


Built on Open Source Cloud. All components are open source. Revenue is shared with the projects that power the platform.

Top comments (0)