DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workkloads.

Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • How to Benchmark PostgreSQL for Optimal Performance
  • How Jenkins Can Stay Relevant in the Next Decade
  • Compliance Automated Standard Solution (COMPASS), Part 7: Compliance-to-Policy for IT Operation Policies Using Auditree
  • Oracle CloudWorld 2024: Key Takeaways for Developers, Engineers and Architects

Trending

  • How to Build Scalable Mobile Apps With React Native: A Step-by-Step Guide
  • Chaos Engineering for Microservices
  • Testing SingleStore's MCP Server
  • Simplify Authorization in Ruby on Rails With the Power of Pundit Gem
  1. DZone
  2. Coding
  3. Tools
  4. From Concept to Cloud: Building With Cursor and the Heroku MCP Server

From Concept to Cloud: Building With Cursor and the Heroku MCP Server

In this article, I used Cursor and Heroku’s MCP Server to build and deploy a SvelteKit app entirely through prompts—no CLI, just AI.

By 
Alvin Lee user avatar
Alvin Lee
DZone Core CORE ·
Apr. 22, 25 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
3.1K Views

Join the DZone community and get the full member experience.

Join For Free

I’ve been experimenting with Cursor as a development tool, and it’s been surprisingly helpful in my day-to-day workflow. It’s not just that it writes code — it understands context, offers suggestions in the right moments, and even anticipates what I’m about to do next.

When I saw the announcement about the Heroku MCP Server, I got curious. Could I use Cursor to go beyond just writing code, and actually build and deploy an app to Heroku, primarily via chat prompts and responses? I decided to try it out.

In this post, I’ll walk through how I used Cursor to build a simple SvelteKit app and deploy it to Heroku, powered by the new MCP integration. Would it work? Was it smooth? I thought I would test drive it to see. Come along for the ride.

What Is the Model Context Protocol (MCP)?

MCP is an open standard that lets LLMs interact with external tools in a structured, programmatic way. Instead of just generating code or text based on context, MCP support lets your AI system take real actions — like make API calls or execute commands — based on what you ask.

In practice, this turns Cursor into more than just an AI-enhanced code editor. With MCP support, Cursor becomes a command center. I could potentially spin up cloud infrastructure, query databases, or scaffold new projects — all through prompts in the chat.

The Heroku MCP Server introduces this capability for the Heroku platform. That means I can ask Cursor to do things like create a Heroku app, scale dynos, or attach add-ons — without ever leaving my editor or opening a terminal.

Using Cursor to Build My SvelteKit App

I wanted Cursor to take a shot at building a to-do list as a single-page application using SvelteKit, backed by PostgreSQL. This should be simple enough for Cursor, and it would save me time, since I have little experience with Svelte. These are the steps I took.

Open Cursor to a New Project Folder

I started with an empty folder in ~/project. I had a blank canvas and was ready (for Cursor) to get to work.

Open Cursor to a new project folder

Describe the Task

I explained to Cursor what I wanted to do. To give it a little help with Svelte, I pointed it to Svelte’s LLM-friendly documentation.

I would like to build a "Todo List" single page application using Svelte/SvelteKit. The documentation for Svelte can be found here: https://svelte.dev/llms-full.txt

My application needs to handle listing to-dos, adding to-dos, marking to-dos as complete/incomplete, and deleting to-dos.

It should be backed by a Postgres database.

Eventually, I will deploy this application to Heroku with a Postgres add-on. But I also want to test it locally. I have a local instance of Postgres running. So, I can either give you local db credentials, or you can use the connection string from Heroku once the add-on is running.

 Please create my application in the current folder.

This was the response, so I gave Cursor a little guidance as to my preferences.

Response

Cursor worked through creating the app and adding the necessary dependencies. When it hit speed bumps (like command line options that were outdated), it worked through them.

Installing dependencies

Let It Code!

It was time for Cursor to begin implementing the application. At this point, it had only been about two minutes since I opened Cursor to get started.

Cursor implements the application

In a matter of seconds, Cursor generated the code and saved the files necessary for my application.

Set Up a Local Database

Next, Cursor gave me the next steps related to setting up my database.

Setting up a local database

I told Cursor that I would want some help with this.

Please give me the commands to create that database and run the schema. And also, create the .env file for me. My local postgres database runs on localhost, port 5432. The username is postgres and the password is postgres.

 I probably need source control too. Please initialize a git repo for my project too.

Cursor set up my .env file and gave me the psql commands I needed.

Cursors gives the psql commands

Initialize a Git Repository

Cursor continued on, setting up source control for my project.

Setting up source control

Test Application Locally

Next, Cursor told me it was ready for me to test on a local development server.

Test application locally

Really? All the coding was done, and I was ready to test. I clicked the Run command.

Click the Run command

Then, I opened my browser to http://localhost:5173 to test out the app. It worked. Listing, adding, marking as complete, and deleting.

To do list

So, Cursor had finished building my app. It had been about five minutes since I started. We’re ready to deploy to Heroku. And now, we get to use Cursor with Heroku’s MCP Server.

Deploying to Heroku With Help From Cursor

Getting up and running with Heroku is already pretty easy. I was ready to see how Heroku task automation with Cursor could enhance my productivity even more.

Set Up Cursor to Use Heroku’s MCP Server

To connect Cursor with Heroku’s MCP Server, I needed to go through a few simple steps…

Step 1: Obtain a Heroku Authorization Token

From a terminal, I made sure I was authenticated with the Heroku CLI. Then I ran the following command:

Shell
 
$ heroku authorizations:create

Creating OAuth Authorization... done
Client:      <none>
ID:          03aff7da-87a9-4f9b-9400-5387164390e9
Description: Long-lived user authorization
Scope:       global
Token:       HRKU-1a2b3c4d-5e6f-7890-abcd-abc123def456
Updated at:  Thu Apr 17 2025 12:04:14 GMT-0700 (Mountain Standard Time) (less than a minute ago)


This would be the only time that I needed to do this in a terminal. I could use this authorization token for all future Cursor projects.

Step 2: Create a mcp.json File

In my project folder, I created a subfolder called .cursor. In that folder, I created a file called mcp.json with the following contents:

JSON
 
{
  "mcpServers": {
    "heroku": {
      "command": "npx -y @heroku/mcp-server",
      "env": {
        "HEROKU_API_KEY": "HRKU-1a2b3c4d-5e6f-7890-abcd-abc123def456"
      }
    }
  }
}


Step 3: Enable the New MCP Server

As soon as I saved .cursor/mcp.json, Cursor detected it.

Click Enable

I clicked Enable.

Use Cursor to Build and Deploy App

With Cursor configured, I just needed to tell it to get to work.

Please deploy my app the Heroku. You can call it `my-svelte-todo-list`.

Click Run tool

That’s a promising start. I clicked the Run tool.

Next, Cursor would add the Postgres add-on. There was a bit of a hiccup here. Cursor didn’t have the right name for the lowest-tier add-on plan, but it quickly solved its problem and continued moving forward.

Click Run tool again

With the Postgres add-on up and running, I nudged Cursor to move ahead.

You've created the app and the Postgres database.

Help me initialize the database and then deploy the code.

Cursor used the MCP tool to connect to my Postgres add-on — in the Heroku CLI, that would have been heroku pg:psql — and to create a table.

Create a table

Next, Cursor checked that everything was set up to deploy my app.

Cursor checked that everything was set up to deploy the app

Then, Cursor noticed that there was no Heroku remote set up for my Git repository. So, it helped with that.

Cursor noticed that there was no Heroku remote set up for Git repository

Notice that Cursor needed to run a bash command to set up the remote. It looks like heroku git:remote isn’t one of the available tools in the Heroku MCP Server (yet).

I was almost ready for Cursor to deploy. But if Cursor was going to use an MCP tool (deploy_to_heroku) instead of have me issue a git push heroku main command, then my project would need an app.json file. I reminded Cursor of this:

I think I also need an app.json file so that I can deploy to Heroku (with the Heroku MCP tool).

Cursor created the file.

Cursor creates the file

Now, Cursor was ready to deploy to Heroku with the MCP tool.

Cursor is ready to deploy to Heroku with the MCP tool

After a few seconds, this is what Cursor told me:

Result

Successful deployment? Just like that? I went to my Heroku app URL to be sure.

Heroku app URL

Yes! Successful deployment!

Other Things That Cursor Can Do With the Heroku MCP Server

Cursor said the deployment was successful, but asked if there were other things I wanted it to do.

Deployment is successful

Hmm, check application status or view the logs? Ok, sure.

CUrsor summarizes recent logs

Cursor used the MCP tools to check on my dyno and summarize recent logs. Nice!

Final Thoughts: A New Way to Build

Cursor didn’t just help me scaffold a project or write a frontend for a framework I have little experience with. It carried my entire project from concept to cloud. That was pretty sweet. Heroku already makes deployment straightforward, but using Cursor and the MCP Server made the whole experience feel nearly automated.

This wasn’t just about saving time. It was about shifting how I interact with tools I already know and trust. The idea that I can go from “I want to build…” to “It’s live!” without switching contexts is exciting — and something worth exploring further on more ambitious projects.

Happy coding!

Tool Cloud PostgreSQL

Opinions expressed by DZone contributors are their own.

Related

  • How to Benchmark PostgreSQL for Optimal Performance
  • How Jenkins Can Stay Relevant in the Next Decade
  • Compliance Automated Standard Solution (COMPASS), Part 7: Compliance-to-Policy for IT Operation Policies Using Auditree
  • Oracle CloudWorld 2024: Key Takeaways for Developers, Engineers and Architects

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!