Heroku MCP Server
Official Heroku Platform MCP server. Manage apps, dynos, add-ons, pipelines, and Postgres databases through the Heroku CLI from AI agents.
The Heroku Platform MCP Server is the official Model Context Protocol implementation maintained by Heroku. It exposes a set of tools that let LLMs read, manage, and operate Heroku Platform resources by wrapping the Heroku CLI. The server runs locally in STDIO mode and authenticates either through the existing Heroku CLI session or via a HEROKU_API_KEY token.
The server covers the core developer workflows on Heroku: app lifecycle management (create, rename, deploy, transfer), process and dyno control (list, scale, restart), add-on provisioning, maintenance mode toggles, log retrieval, pipeline management (create, list, info, promote), team and Private Space listing, and a comprehensive set of Heroku Postgres tools (psql, info, ps, locks, outliers, credentials, kill, maintenance, backups, upgrade).
Heroku notes this server is in early development and that available tools may evolve. It works against Common Runtime, Cedar Private Spaces, Shield Private Spaces, and Fir Private Spaces, and is compatible with Claude Desktop, Cursor, VS Code, Zed, Windsurf, Cline, and Trae.
Tools
| Tool | Description |
|---|---|
list_apps |
List Heroku apps the authenticated user has access to. |
get_app_info |
Get details about a specific Heroku app. |
create_app |
Create a new Heroku app. |
rename_app |
Rename an existing Heroku app. |
transfer_app |
Transfer ownership of an app to another user or team. |
deploy_to_heroku |
Deploy an application to Heroku. |
deploy_one_off_dyno |
Run a one-off dyno for a deployment task. |
ps_list |
List running dynos for an app. |
ps_scale |
Scale dyno formations up or down. |
ps_restart |
Restart dynos for an app. |
list_addons |
List add-ons for an app or account. |
get_addon_info |
Get details about a specific add-on. |
create_addon |
Provision a new add-on for an app. |
maintenance_on |
Enable maintenance mode for an app. |
maintenance_off |
Disable maintenance mode for an app. |
get_app_logs |
Retrieve application logs. |
pipelines_create |
Create a new pipeline. |
pipelines_promote |
Promote an app to the next pipeline stage. |
pipelines_list |
List pipelines. |
pipelines_info |
Get details about a pipeline. |
list_teams |
List Heroku teams the user belongs to. |
list_private_spaces |
List Heroku Private Spaces. |
pg_psql |
Run a SQL query against a Heroku Postgres database. |
pg_info |
Get information about a Postgres database. |
pg_ps |
Show active queries on a Postgres database. |
pg_locks |
Show locks on a Postgres database. |
pg_outliers |
Show queries that have spent the most execution time. |
pg_credentials |
Show Postgres credentials. |
pg_kill |
Terminate a Postgres process. |
pg_maintenance |
Show or manage Postgres maintenance windows. |
pg_backups |
List or manage Postgres backups. |
pg_upgrade |
Upgrade the Postgres version of a database. |
Prerequisites
- Heroku CLI version 10.8.1 or higher installed globally. See the Heroku CLI install docs.
- A Heroku account and (optionally) an authorization token from
heroku authorizations:createorheroku auth:token.
Option 1: Use the Heroku CLI (recommended)
This uses your existing CLI session so no API key is exposed.
{
"mcpServers": {
"heroku": {
"command": "heroku",
"args": ["mcp:start"]
}
}
}
Option 2: Run via npx with an API key
npx -y @heroku/mcp-server
Claude Desktop / Cursor config:
{
"mcpServers": {
"heroku": {
"command": "npx",
"args": ["-y", "@heroku/mcp-server"],
"env": {
"HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>"
}
}
}
}
VS Code config
{
"mcp": {
"servers": {
"heroku": {
"type": "stdio",
"command": "heroku",
"args": ["mcp:start"]
}
}
}
}
Environment variables
HEROKU_API_KEY: Heroku authorization token (required for the npx method).MCP_SERVER_REQUEST_TIMEOUT: Command execution timeout in milliseconds (default15000).
- Deploy, restart, and scale Heroku apps from a chat-driven workflow without leaving the IDE.
- Diagnose production issues by tailing logs, listing running dynos, and checking add-on status through an AI agent.
- Troubleshoot Heroku Postgres performance: inspect long-running queries with
pg_ps, find slow queries withpg_outliers, and kill stuck processes withpg_kill. - Manage release pipelines: create pipelines, list current stages, and promote apps from staging to production via natural language.
- Provision add-ons (Postgres, Redis, etc.) and enable maintenance mode during cutovers, automated by an agent.
- "List my Heroku apps and show the dyno formation for
my-api-prod." - "Tail the last 200 log lines from
checkout-serviceand tell me what is throwing 500s." - "Scale the web dyno on
marketing-siteto 3 standard-2X dynos." - "Run
SELECT count(*) FROM users WHERE created_at > now() - interval '1 day'on the Postgres add-on foranalytics-app." - "Promote
staging-appto production in thegrowthpipeline."
- Official server maintained by Heroku, published as
@heroku/mcp-serveron npm. - Broad coverage of platform operations: apps, dynos, add-ons, pipelines, logs, and Postgres.
- Can reuse the existing Heroku CLI session, so no API token has to be stored in client config.
- Compatible with Claude Desktop, Cursor, VS Code, Zed, Windsurf, Cline, and Trae out of the box.