Heroku Platform MCP Server

Heroku's own server for managing apps, dynos, add-ons, pipelines and Postgres from an MCP client

Official · Heroku TypeScript Local · stdio Cloud platformsDatabasesDevOps and monitoring

62 popularity score ★ 82 ↓ 8.2k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs HEROKU_API_KEY. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add heroku-platform -e HEROKU_API_KEY=<HEROKU_API_KEY> -- npx -y @heroku/mcp-server
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "heroku-platform": {
      "command": "npx",
      "args": [
        "-y",
        "@heroku/mcp-server"
      ],
      "env": {
        "HEROKU_API_KEY": "<HEROKU_API_KEY>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "heroku-platform": {
      "command": "npx",
      "args": [
        "-y",
        "@heroku/mcp-server"
      ],
      "env": {
        "HEROKU_API_KEY": "<HEROKU_API_KEY>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "heroku-platform": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@heroku/mcp-server"
      ],
      "env": {
        "HEROKU_API_KEY": "<HEROKU_API_KEY>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.heroku-platform]
command = "npx"
args = ["-y", "@heroku/mcp-server"]

[mcp_servers.heroku-platform.env]
HEROKU_API_KEY = "<HEROKU_API_KEY>"
Gemini CLITerminal
gemini mcp add --scope user -e HEROKU_API_KEY=<HEROKU_API_KEY> heroku-platform npx -- -y @heroku/mcp-server

Settings 3

HEROKU_API_KEY secret Required: Heroku authorization token; needed when started with npx. Not needed with `heroku mcp:start`, which uses the CLI login.
MCP_SERVER_REQUEST_TIMEOUT Optional: Command timeout in milliseconds. Default 15000.
MCP_SERVER_IDLE_TIMEOUT Optional: Milliseconds without calls before the CLI process is shut down; 0 keeps it running. Default 600000.

What it does

Heroku publishes this server so an MCP client can work with a Heroku account the way the Heroku CLI does. It covers apps (list, inspect, create, rename, deploy), dynos (list, scale, restart), add-ons and their plans, maintenance mode, logs, pipelines, teams and private spaces, and Heroku Postgres: running SQL, looking at locks and slow queries, killing queries, reading credentials and backups, and upgrading versions. Calls go through the Heroku CLI rather than straight to the API, so the CLI must be installed.

It runs on your machine over stdio and can be started two ways. The CLI command `heroku mcp:start` reuses your logged-in CLI session. The npm package `@heroku/mcp-server` needs a Heroku authorization token in `HEROKU_API_KEY`. Heroku says it works on the Common Runtime, Cedar Private and Shield Spaces, and Fir Private Spaces.

The README lists 34 tools, but src/index.ts registers 33 by default, and the two lists don't match. `transfer_app` appears in the README and is never registered. `list_addon_services` and `list_addon_plans` are registered but missing from the README. Three AI tools only show up when the Heroku CLI plugin `@heroku/plugin-ai` is installed. The server also serves Heroku Dev Center's llms.txt as a resource.

The CLI process behind it starts on the first tool call. After a stretch of no calls it is shut down, then started again on the next call. The README puts that idle window at 5 minutes, but the code's default is 600000 ms, so 10 minutes. `MCP_SERVER_IDLE_TIMEOUT` changes it, and 0 keeps the process alive. Each command is cut off after 15 seconds unless `MCP_SERVER_REQUEST_TIMEOUT` says otherwise.

What it needs

RuntimeNode.js 20+
Runs onmacOS, Windows, Linux
HerokuPaid planApps, dynos and add-ons the tools create are billed to the account
Also
  • Heroku CLI 10.8.1 or later on PATH
  • @heroku/plugin-ai CLI plugin for the AI tools

Install the Heroku CLI globally before either way of starting it. For `heroku mcp:start`, log in with the CLI first. For the npx way, make a token with `heroku authorizations:create` or `heroku auth:token` and put it in HEROKU_API_KEY. The AI tools appear only after `heroku plugins:install @heroku/plugin-ai`.

Limits

  • Early release Heroku calls it early in development and says its tools may change
  • Not covered There is no transfer_app tool, although the README lists one
  • Limit The AI tools are not registered unless @heroku/plugin-ai is installed in the Heroku CLI
  • Limit Each CLI command stops after 15 seconds by default, so long log reads or slow queries can fail unless MCP_SERVER_REQUEST_TIMEOUT is raised
  • Not covered Speaks stdio only, with no HTTP mode
  • Limit deploy_to_heroku needs a valid app.json and a Procfile in the project root
  • Cost Scaling dynos, creating apps and provisioning add-ons can add charges to the Heroku account

The README says the CLI process is shut down after 5 minutes without calls, but src/index.ts and src/repl/heroku-cli-repl.ts default to 600000 ms, which is 10 minutes. Set MCP_SERVER_IDLE_TIMEOUT if the exact window matters, or 0 to keep the process running.

Who it suits

A good fit for developers who already use Heroku and the Heroku CLI and want an assistant to check apps, read logs, scale dynos, run pipelines or look into Heroku Postgres. It comes from Heroku itself and reuses your CLI login, so there is no separate key to manage. Many tools change things that cost money or affect production (scaling, add-ons, Postgres upgrades, killing queries), so it suits people who review each tool call. If you do not use Heroku, or cannot install the Heroku CLI, it is no use to you.

Tools 36

20 only read, 13 change things, 3 can delete or overwrite. A ? marks an optional parameter.

list_apps
Lists apps, filtered by personal, collaborator, team or spaceall?: booleanpersonal?: booleanspace?: stringteam?: string
get_app_info
Shows an app's config, dynos and add-onsapp: stringjson?: boolean
create_app changes
Creates an app in a chosen region, team or spaceapp?: stringregion?: enumspace?: stringteam?: string
rename_app changes
Renames an appapp: stringnewName: string
deploy_to_heroku changes
Packs a project with its app.json and Procfile and deploys it to a new or existing appname: stringrootUri: stringtarballUri?: stringteamId?: stringspaceId?: stringinternalRouting?: booleanenv?: object
deploy_one_off_dyno changes
Runs a command, with optional source files, on a temporary one-off dynoname: stringcommand: stringsources?: arraysize?: stringtimeToLive?: numberenv?: object
ps_list
Lists an app's dynosapp: stringjson?: boolean
ps_scale changes
Changes the number or size of dynos, or shows the formation when no dyno is givenapp: stringdyno?: string
ps_restart changes
Restarts one dyno, one process type or all dynosapp: stringdyno-name?: stringprocess-type?: string
list_addons
Lists add-ons for one app or all appsall?: booleanapp?: string
get_addon_info
Shows details of one add-onaddon: stringapp?: string
create_addon changes
Provisions an add-on plan for an appapp: stringserviceAndPlan: stringas?: stringname?: string
list_addon_services
Lists the add-on services on offerjson?: boolean
list_addon_plans
Lists a service's plans with features and pricesservice: stringjson?: boolean
maintenance_on changes
Turns on maintenance mode for an appapp: string
maintenance_off changes
Turns off maintenance mode for an appapp: string
get_app_logs
Reads an app's recent logs, by dyno, process type or sourceapp: stringdynoName?: stringsource?: stringprocessType?: string
pipelines_create changes
Creates a pipeline, optionally with a first appname: stringstage: enumapp?: stringteam?: string
pipelines_promote changes
Promotes an app's release to the next pipeline stageapp: stringto?: string
pipelines_list
Lists pipelinesjson?: boolean
pipelines_info
Shows a pipeline's apps and stagespipeline: stringjson?: boolean
list_teams
Lists the teams you belong tojson?: boolean
list_private_spaces
Lists private spacesjson?: boolean
pg_psql deletes
Runs a SQL command or file against a Heroku Postgres databaseapp: stringcommand?: stringfile?: stringcredential?: stringdatabase?: string
pg_info
Shows database plan, size and statusapp: stringdatabase?: string
pg_ps
Shows running queriesapp: stringverbose?: booleandatabase?: string
pg_locks
Shows locks and blocking transactionsapp: stringtruncate?: booleandatabase?: string
pg_outliers changes
Finds the queries that take the most time, and can reset the statisticsapp: stringnum?: numberreset?: booleantruncate?: booleandatabase?: string
pg_credentials
Shows a database's credentialsapp: stringdatabase?: string
pg_kill deletes
Stops a database process by its pidapp: stringpid: numberforce?: booleandatabase?: string
pg_maintenance
Shows database maintenance statusapp: stringdatabase?: string
pg_backups
Shows backups and backup schedulesapp: string
pg_upgrade deletes
Upgrades a Postgres database to a newer versionapp: stringversion?: stringconfirm?: stringdatabase?: string
list_ai_available_models
Lists Heroku AI models (only with @heroku/plugin-ai)
provision_ai_model changes
Attaches an AI model to an app (only with @heroku/plugin-ai)app: stringmodelName: stringas?: string
make_ai_inference
Sends a chat request to a Heroku AI model (only with @heroku/plugin-ai)app: stringmodelResource: stringopts: objectjson?: booleanoutput?: string

Resources 1

https://devcenter.heroku.com/llms.txt
Heroku Dev Center articles index (heroku_dev_center)

Similar servers