
How to add Heroku MCP Server to Cursor
Manage Heroku apps, dynos, add-ons, pipelines, and Postgres from your AI agent via the official Heroku CLI. Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 14, 2026 · 78★ · stdio · apikey · official
Cursor config for Heroku MCP Server
npx -y @heroku/mcp-server{
"mcpServers": {
"heroku-mcp-server": {
"command": "npx",
"args": [
"-y",
"@heroku/mcp-server"
],
"env": {
"HEROKU_API_KEY": "<your-heroku-auth-token>"
}
}
}
}Setup steps
- 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the Heroku MCP Server config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of Heroku MCP Server's tools to confirm it's connected.
Before you start
- Heroku CLI v10.8.1 or higher installed globally (required for heroku mcp:start; verify with heroku --version)
- A Heroku account; for the npx mode, an auth token from heroku authorizations:create set as HEROKU_API_KEY
- Node.js with npx for the @heroku/mcp-server launch mode
What Heroku MCP Server can do in Cursor
list_appsList Heroku apps, filterable by personal, collaborator, team, or space.
get_app_infoDetailed app info including configuration, dynos, and add-ons.
create_appCreate an app with region, team, and space settings.
rename_appRename an existing app.
transfer_appTransfer app ownership to another user or team.
deploy_to_herokuDeploy projects with app.json configuration, supporting teams, private spaces, and environment setup.
deploy_one_off_dynoRun code or commands in a sandboxed one-off dyno with file creation, network access, env vars, and auto cleanup.
ps_listList all dynos for an app.
Security
Tools can create, scale, transfer, and deploy real apps and run SQL against production Postgres — an agent mistake costs money or data, so review tool calls before approving. Prefer heroku mcp:start (no token in config); if you use HEROKU_API_KEY, scope it via heroku authorizations:create rather than pasting your account's long-lived token.
Heroku MCP Server + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Heroku MCP Server config there under the "mcpServers" key and restart the client.
Is Heroku MCP Server safe to use with Cursor?
Tools can create, scale, transfer, and deploy real apps and run SQL against production Postgres — an agent mistake costs money or data, so review tool calls before approving. Prefer heroku mcp:start (no token in config); if you use HEROKU_API_KEY, scope it via heroku authorizations:create rather than pasting your account's long-lived token.
Is the Heroku MCP server safe to connect to production?
It executes with the full privileges of your CLI session or auth token — including app deletion-adjacent operations like transfers, scaling, and live SQL via pg_psql. Use heroku mcp:start to avoid storing tokens, keep human approval on write operations, and consider a dedicated authorization token you can revoke.
Do I need the Heroku CLI even when using npx?
Yes. The server is built around the Heroku CLI and requires v10.8.1+ installed globally. The npx package handles the MCP wiring, while heroku mcp:start additionally reuses your CLI authentication.
How do I get a HEROKU_API_KEY?
Run heroku authorizations:create (or heroku auth:token for the current session token), or create an authorization under Account Settings → Applications in the dashboard. Put the value in the env block of your MCP config.