MCP Directory

Heroku MCP Server

Official

Manage Heroku apps, dynos, add-ons, pipelines, and Postgres from your AI agent via the official Heroku CLI.

Unverified
stdio (local)
API key
TypeScript

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
npx -y @heroku/mcp-server

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "heroku-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@heroku/mcp-server"
      ],
      "env": {
        "HEROKU_API_KEY": "<your-heroku-auth-token>"
      }
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

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

About Heroku MCP Server

Heroku's MCP server is built and maintained by Heroku itself (repo under the heroku GitHub org, Apache-2.0) and leans on the Heroku CLI rather than reimplementing platform APIs. That is why the CLI v10.8.1+ is a hard prerequisite: the recommended launch command is literally heroku mcp:start, which inherits your current CLI login so no API key ever lands in a config file.

The tool surface maps closely to day-2 operations. Application management covers list/info/create/rename/transfer plus deploy_to_heroku (app.json-driven, team and private-space aware) and deploy_one_off_dyno, which executes code or commands in a sandboxed one-off dyno with file creation, network access, and automatic cleanup. Process tools handle dyno listing, scaling, resizing, and restarts; separate groups cover add-ons, maintenance mode, logs, pipelines (create/promote/list/info), teams, and private spaces.

The Postgres group is the differentiator versus generic cloud MCP servers: pg_psql for arbitrary SQL, pg_locks for blocking transactions, pg_outliers for resource-hungry queries, plus credentials, backups, kill, maintenance, and upgrade tools. For an agent doing incident triage — 'why is the app slow, show me blocking queries, restart the worker dynos' — the whole loop happens over MCP.

Heroku labels the project early-development, and the tool list may evolve. A MCP_SERVER_REQUEST_TIMEOUT env var (default 15s) guards long commands. The practical trade-off: everything executes with your full CLI identity, so permissioning is all-or-nothing per token.

Tools & capabilities (32)

list_apps

List Heroku apps, filterable by personal, collaborator, team, or space.

get_app_info

Detailed app info including configuration, dynos, and add-ons.

create_app

Create an app with region, team, and space settings.

rename_app

Rename an existing app.

transfer_app

Transfer app ownership to another user or team.

deploy_to_heroku

Deploy projects with app.json configuration, supporting teams, private spaces, and environment setup.

deploy_one_off_dyno

Run code or commands in a sandboxed one-off dyno with file creation, network access, env vars, and auto cleanup.

ps_list

List all dynos for an app.

ps_scale

Scale dyno counts up/down or resize dynos.

ps_restart

Restart specific dynos, process types, or all dynos.

list_addons

List add-ons across apps or for one app.

get_addon_info

Detailed information 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

View application logs.

pipelines_create

Create a new pipeline.

pipelines_promote

Promote apps to the next pipeline stage.

pipelines_list

List available pipelines.

pipelines_info

Detailed pipeline information.

list_teams

List teams you belong to.

list_private_spaces

List available private spaces.

pg_psql

Execute SQL queries against Heroku PostgreSQL.

pg_info

Detailed database information.

pg_ps

View active queries and execution details.

pg_locks

View locks and identify blocking transactions.

pg_outliers

Identify resource-intensive queries.

pg_credentials

Manage database credentials and access.

pg_kill

Terminate specific database processes.

pg_maintenance

Show database maintenance information.

pg_backups

Manage database backups and schedules.

pg_upgrade

Upgrade PostgreSQL to a newer version.

What this server can do

Heroku MCP Server provides tools for these capabilities — tap one to see every MCP server that does the same:

When to use it

  • Incident triage in chat: check logs, find blocking Postgres queries, restart dynos
  • Deploy a project to Heroku from an agent using app.json configuration
  • Run one-off scripts or tests in a disposable dyno sandbox
  • Scale dynos and provision add-ons as part of an agent-driven release workflow

Quick setup

  1. 1Install or upgrade the Heroku CLI to v10.8.1+ and run heroku login
  2. 2Recommended: add {"command": "heroku mcp:start"} under mcpServers — no API key needed
  3. 3Alternative: generate a token with heroku authorizations:create
  4. 4Add {"command": "npx", "args": ["-y", "@heroku/mcp-server"], "env": {"HEROKU_API_KEY": "<token>"}} to your MCP config
  5. 5Optionally set MCP_SERVER_REQUEST_TIMEOUT (ms, default 15000) for slow commands

Security notes

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 FAQ

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.

Alternatives to Heroku MCP Server

Compare all alternatives →

GitHub's official server for repos, issues, PRs, and Actions — local Docker or hosted remote.

Featured
Verified
stdio (local)
API key
Go
7 tools
Updated 20 days agoRepo

Official AWS Labs server that lets agents call any AWS API via the AWS CLI surface.

Verified
stdio (local)
API key
Python
3 tools
Updated 22 days agoRepo

Bulk Kubernetes port forwarding with an MCP server that lets AI assistants forward services, inspect pods, and monitor traffic.

Unverified
stdio (local)
No auth
Go
28 tools
Updated 14 days agoRepo