Heroku MCP server tools: what can change or expose your apps, and how to make your agent ask

The 33 tools of Heroku's MCP server (@heroku/mcp-server 1.2.15) without the Heroku AI plugin, checked by running it with Heroku CLI 11.14.0, a made-up API key, every API call sent to a local stand-in and a real Postgres in Docker: how pg_psql read a local .env file into an error, how the deploy tool uploaded an SSH key from the folder it was given, what a one-off dyno runs, and the Claude Code settings that make the risky tools ask.

Checked on by running @heroku/mcp-server 1.2.15 (npm, the latest on 27 November 2026, run with Heroku CLI 11.14.0 on macOS and no Heroku account) from heroku/heroku-mcp-server and reading its tools/list answer. Each tier is the tool risk checker’s reading, with our reason wherever we changed it. Written by the people who make VariantGate.

The short answer

No read-only mode, and no tool carries a hint. pg_psql runs any SQL and read a local .env file into its error, the deploy tool uploads whatever folder it is given, and a one-off dyno runs any command with the app's secrets. 11 of 33 tools only look; give it a key whose account sees only the apps the agent needs, and keep the rest on ask.

Can run on their own
11
Should ask a person
22

Lethal trifecta: This server can read private data and send data out. Beside a server that can take in content other people wrote, a setup holds all three legs of the lethal trifecta. Check your whole setup

Which Heroku server this is

This page is about Heroku’s own server, heroku/heroku-mcp-server, published on npm as @heroku/mcp-server. We ran 1.2.15, the latest, with Node 24 and Heroku CLI 11.14.0 on macOS. Most of its tools build a heroku command and send it to a Heroku CLI it keeps running in the background; the two deploy tools call Heroku’s API themselves. It lists 33 tools, and three more for Heroku’s AI models when the CLI’s AI plugin is installed. None carries a read-only or destructive hint, and there is no read-only mode. Heroku’s README recommends starting it with heroku mcp:start, which uses the CLI’s own sign-in.

How we ran it without a Heroku account

We gave it a made-up HEROKU_API_KEY, an empty home folder and HEROKU_HOST pointing the CLI at a small server on our own machine, which logged every request and answered for two apps, shop-prod and shop-staging. The deploy tools have https://api.heroku.com written into their code, so we sent those calls to the same server. The app’s DATABASE_URL pointed at Postgres 17 in Docker, and since this machine has no psql, a small wrapper logged what the CLI handed psql and ran psql 17 inside the container, passing a file on standard input. The tools that use Heroku’s separate data API (pg_info, pg_credentials, pg_backups) got no answer from our stand-in, so we did not see them work.

Arguments are quoted, and that held

The server wraps every value in single quotes before the CLI reads the line, and refuses line breaks. A new app name of x' --app 'shop-staging was sent to Heroku as that literal name, and ps_scale with web=0 --app shop-staging changed nothing on either app. What the tools are meant to do is the problem, not how they pass arguments.

pg_psql runs any SQL, and reads local files

pg_psql connects as the app’s database user with no confirmation. DELETE FROM customers answered DELETE 2, and the table was empty. Its database argument takes APP_NAME::DB for another app: with billing-prod::DATABASE the CLI fetched billing-prod’s config vars and connected with its DATABASE_URL.

Its file argument is a path on your machine, handed to psql to run. We pointed it at a .env file in another folder. psql could not run it as SQL, and its error quoted the first line back to the model:

{
  "name": "pg_psql",
  "arguments": { "app": "shop-prod", "file": "/path/to/other/.env" }
}
--> Connecting to postgresql-curly-12345
psql:<stdin>:2: ERROR:  syntax error at or near "STRIPE_SECRET_KEY"
LINE 1: STRIPE_SECRET_KEY=sk_live_LOCALFILE_FAKE123
        ^

The deploy tool uploads the folder it is given

deploy_to_heroku takes rootUri, a folder, and an app.json written by the model. It packs the folder, uploads it to the address Heroku hands out, and builds it on the named app, an existing one included. In a git repository it packs what git ls-files lists, so ignored files stay out and untracked ones go in; anywhere else it packs everything. These are the two uploads our server received:

rootUri = a folder that is not a git repository
  .npmrc
  .ssh/id_ed25519
  ./app.json

rootUri = a git repository whose .gitignore names .env
  .env.production
  .gitignore
  Procfile
  app.json

Its code skips symlinks that lead out of the folder, so a repository cannot pull in files from elsewhere that way. But the folder itself is whatever the model names, a home folder included.

A one-off dyno runs any command with the app’s secrets

deploy_one_off_dyno starts a dyno on the app and runs command in it. Its description invites network access and installing packages. A dyno has the app’s config vars in its environment, so printenv would print every secret the app has. With no size or time given, the server asked for a standard-1x dyno that lives an hour:

POST /apps/shop-prod/dynos
{ "command": "printenv", "size": "standard-1x", "type": "run",
  "time_to_live": 3600, "attach": true, "env": { "X": "1" } }

Changes go straight through

  • maintenance_on switched the app to maintenance mode, and ps_scale with web=0 sent a formation change to zero web dynos.
  • ps_restart with no arguments restarted every dyno of the app.
  • create_addon created a heroku-postgresql:premium-9 database, a paid plan, from one call.
  • pg_kill with force: true ran pg_terminate_backend at once.

Neither the server nor the CLI asked for a confirmation on any of them. pg_upgrade takes a confirm argument, but the model fills that in. pg_ps and pg_locks look harmless, but they return the full SQL other sessions are running, values included. get_app_logs returns whatever the app printed: a log line with an Authorization header came back unchanged.

Two tools call commands the CLI no longer has

pg_maintenance and pg_upgrade run heroku pg:maintenance and heroku pg:upgrade. Heroku CLI 11.14.0 has neither, only subcommands such as pg:upgrade:run. Both calls hung until the server’s timeout and came back as “failed to complete”. With no CLI installed, the server runs npx heroku@latest, which is this version.

Telemetry

The server itself sends nothing extra, but every API call carries Heroku-MCP-Server/1.2.15 as its user agent. The CLI’s code sends usage events and OpenTelemetry traces to backboard.heroku.com, with the MCP server’s version in them. With DISABLE_TELEMETRY=true, nothing reached the analytics address we pointed it at.

A safer setup

claude mcp add heroku -e HEROKU_API_KEY=… -e DISABLE_TELEMETRY=true -- npx -y @heroku/mcp-server@1.2.15

Pin the version, turn telemetry off, and use the key of a Heroku account that is a collaborator only on the apps the agent needs, never on production unless it must be. A Heroku API key reaches every app its account can; heroku authorizations:create can make a token with narrower scopes, which we did not test with this server. Start the client in a folder you would be happy to see uploaded, since the deploy tool takes any folder it is told.

All 33 tools

Hard to undo5 toolsAsk a person every time. Consider two people, or deny it if the agent never needs it.

  • pg_psql

    Execute SQL queries: analyze, debug, modify schema, manage data

    Server gives no read-only or destructive hint

    Our call: Runs any SQL as the app's database user: DELETE FROM customers emptied the table. Given a file, it read a local .env, and psql's error quoted its first line, key and all. database: billing-prod::DATABASE reached another app's database.

  • pg_kill

    Stop processes: stuck queries, blocking transactions, runaway operations

    Server gives no read-only or destructive hint

    Our call: With force: true it ran pg_terminate_backend through psql at once, ending that session and whatever it was doing.

  • pg_upgrade

    Upgrade PostgreSQL: version migration, compatibility, safety

    Server gives no read-only or destructive hint

    Our call: Runs heroku pg:upgrade, which Heroku CLI 11.14.0 no longer has, so the call hung until the timeout. A major version upgrade cannot be undone, and its confirm argument is one the model fills in itself.

  • deploy_to_heroku

    Use for all deployments. Deploys new/existing apps, with or without teams/spaces, and env vars to Heroku. Ask for app name if missing. Requires valid app.json via appJson param.

    Server gives no read-only or destructive hint

    Our call: Packs and uploads whatever folder rootUri names, then builds it on the app. Outside a git repository it took .ssh/id_ed25519 and .npmrc; in one it skipped the ignored .env but took an untracked .env.production.

  • deploy_one_off_dyno

    Run code/commands in Heroku one-off dyno with network and filesystem access.

    Server gives no read-only or destructive hint

    Our call: Starts a dyno that runs any command with the app's config vars. Our printenv went out as a standard-1x dyno that lives 3600 seconds, sizes and times the server filled in itself.

Moves money2 toolsSend the amount. A rule lets small amounts through; above the limit a person decides.

  • create_addon

    Create add-on: specify service, plan, custom names

    Server gives no read-only or destructive hint

    Our call: One call created a heroku-postgresql:premium-9 add-on, a paid plan billed to the app, with no confirmation.

  • ps_scale

    Scale Heroku app dynos. Adjust quantities, change sizes, view formation details, manage resources.

    Server gives no read-only or destructive hint

    Our call: web=0 went out at once as a formation change, which stops the app. The same tool changes dyno sizes, and larger dynos cost more.

Not sure8 toolsAsk a person until you have checked what it does.

  • get_app_logs

    App logs: monitor/debug/filter by dyno/process/source

    Server gives no read-only or destructive hint

    Our call: Returns whatever the app and Heroku printed. A log line with an Authorization header came back as it was written.

  • pg_info

    View database status: config, metrics, resources, health

    Server gives no read-only or destructive hint

    Our call: Runs heroku pg:info through Heroku's data API, which our stand-in did not answer, so we never saw what it does.

  • pg_ps

    Monitor active queries: progress, resources, performance

    Server gives no read-only or destructive hint

    Our call: Shows the full SQL of other sessions from pg_stat_activity, with whatever values those queries carry.

  • pg_locks

    Analyze locks: blocked queries, deadlocks, concurrency

    Server gives no read-only or destructive hint

    Our call: Shows the full SQL of other sessions from pg_stat_activity, with whatever values those queries carry.

  • pg_credentials

    Manage access: credentials, permissions, security, monitoring

    Server gives no read-only or destructive hint

  • pg_maintenance

    Track maintenance: windows, schedules, progress, planning

    Server gives no read-only or destructive hint

    Our call: Runs a heroku pg: command that Heroku CLI 11.14.0, the latest, no longer has, so the call hung until the server's timeout.

  • pg_backups

    Manage backups: schedules, status, verification, recovery

    Server gives no read-only or destructive hint

    Our call: Described as managing schedules, verification and recovery. It needs Heroku's data API, which our stand-in did not answer, so we never saw what it does.

  • pipelines_promote

    Promotes apps between pipeline stages with configurable target applications

    Server gives no read-only or destructive hint

Changes data7 toolsAsk a person. Once it is routine, a standing rule can answer.

  • create_app

    Create app: custom name, region (US/EU), team, private space

    Server gives no read-only or destructive hint

  • rename_app

    Rename app: validate and update app name

    Server gives no read-only or destructive hint

  • maintenance_on

    Enable maintenance mode and redirect traffic for a Heroku app

    Server gives no read-only or destructive hint

  • maintenance_off

    Disable maintenance mode and restore normal app operations

    Server gives no read-only or destructive hint

  • pg_outliers

    Find resource-heavy queries: performance, patterns, optimization

    Server gives no read-only or destructive hint

    Our call: reset: true clears pg_stat_statements, the query statistics of the whole database.

  • ps_restart

    Restart Heroku app processes. Restart specific dynos, process types, or all dynos. Reset dyno states selectively.

    Server gives no read-only or destructive hint

    Our call: Restarted every dyno of the app with one call and no confirmation.

  • pipelines_create

    Creates new Heroku deployment pipeline with configurable stages, apps, and team settings

    Server gives no read-only or destructive hint

Only looks11 toolsLet it run. It only looks.

  • list_apps

    List Heroku apps: owned, collaborator access, team/space filtering

    Server gives no read-only or destructive hint

    Our call: In our run it only sent GET requests to Heroku's API and changed nothing.

  • get_app_info

    Get app details: config, dynos, addons, access, domains

    Server gives no read-only or destructive hint

    Our call: Its description says config, but as text and as JSON it showed only the names of add-on config vars, never their values.

  • list_private_spaces

    Lists Heroku Private Spaces with CIDR blocks, regions, compliance and capacity details. JSON output supported.

    Server gives no read-only or destructive hint

    Our call: In our run it only sent GET requests to Heroku's API and changed nothing.

  • list_teams

    Lists accessible Heroku Teams. Use for: viewing teams, checking membership, getting team metadata, and verifying access. JSON output available.

    Server gives no read-only or destructive hint

    Our call: In our run it only sent GET requests to Heroku's API and changed nothing.

  • list_addons

    List add-ons: all apps or specific app, detailed metadata

    Server gives no read-only or destructive hint

    Our call: Only lists add-ons, their plans and their prices. The checker reads the add in add-on as a change.

  • get_addon_info

    Get add-on details: plan, state, billing

    Server gives no read-only or destructive hint

    Our call: Only lists add-ons, their plans and their prices. The checker reads the add in add-on as a change.

  • list_addon_services

    List available add-on services and features

    Server gives no read-only or destructive hint

    Our call: Only lists add-ons, their plans and their prices. The checker reads the add in add-on as a change.

  • list_addon_plans

    List service plans: features, pricing, availability

    Server gives no read-only or destructive hint

    Our call: In our run it only sent GET requests to Heroku's API and changed nothing.

  • ps_list

    List and monitor Heroku app dynos. View running dynos, check status/health, monitor process states, verify configurations.

    Server gives no read-only or destructive hint

    Our call: In our run it only sent GET requests to Heroku's API and changed nothing.

  • pipelines_list

    Lists accessible Heroku pipelines with ownership and configuration details

    Server gives no read-only or destructive hint

    Our call: In our run it only sent GET requests to Heroku's API and changed nothing.

  • pipelines_info

    Displays detailed pipeline configuration, stages, and connected applications

    Server gives no read-only or destructive hint

    Our call: Only shows a pipeline's stages and the apps in them.

Let the reads run in Claude Code

Claude Code asks before every MCP tool it has no rule for. Added as heroku, this server’s tools are named mcp__heroku__<tool>. These allow rules, in .claude/settings.json or ~/.claude/settings.json, let the tools that only look run without a prompt. Everything else keeps asking, including any tool a later version of the server adds.

{
  "permissions": {
    "allow": [
      "mcp__heroku__list_apps",
      "mcp__heroku__get_app_info",
      "mcp__heroku__list_private_spaces",
      "mcp__heroku__list_teams",
      "mcp__heroku__list_addons",
      "mcp__heroku__get_addon_info",
      "mcp__heroku__list_addon_services",
      "mcp__heroku__list_addon_plans",
      "mcp__heroku__ps_list",
      "mcp__heroku__pipelines_list",
      "mcp__heroku__pipelines_info"
    ]
  }
}

The command that adds the server:

claude mcp add heroku -e HEROKU_API_KEY=… -e DISABLE_TELEMETRY=true -- npx -y @heroku/mcp-server@1.2.15

Send the rest to a person, not the terminal

A prompt in the terminal only works while someone is watching it. With this hook, every other tool of the server becomes a request in your VariantGate inbox, on your phone or in Slack, and Claude Code waits for the answer. The matcher names the look-only tools, so a tool added later is sent too. Put the key in VARIANTGATE_KEY, or run the one-command setup for Claude Code first.

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "mcp__heroku__(?!(list_apps|get_app_info|list_private_spaces|list_teams|list_addons|get_addon_info|list_addon_services|list_addon_plans|ps_list|pipelines_list|pipelines_info)$).*",
        "hooks": [
          { "type": "command", "command": "variantgate hook claude-code", "timeout": 180 }
        ]
      }
    ]
  }
}

Disagree with a tier, or run the server with other flags? Open these tools in the tool risk checker, change what you like, and copy the settings for your own setup. It runs in your browser and starts from its own reading, so a tool we marked as only looking by hand asks there until you change it.

Set it up in Cursor, VS Code, Codex, Gemini CLI and other clients

The same server as the claude mcp add line above, written the way each client reads it, for Claude Desktop, Cursor, VS Code, Windsurf, Codex, Gemini CLI, Cline and Zed. Cursor and VS Code add it in one click: the app shows the settings and asks before it saves them. Set up like this, every tool runs as soon as the model calls it; the next section puts a person in front of the ones that change things. Running it with other flags? Convert your own settings.

claude_desktop_config.json{
  "mcpServers": {
    "heroku": {
      "command": "npx",
      "args": [
        "-y",
        "@heroku/mcp-server@1.2.15"
      ],
      "env": {
        "HEROKU_API_KEY": "…",
        "DISABLE_TELEMETRY": "true"
      }
    }
  }
}

Any MCP client: put the proxy in front

Claude Desktop, Cursor and most other MCP clients have no hook to send a call to a person. The VariantGate MCP proxy does it in the server’s place: it starts the server, lets the look-only tools above through, and holds every other call until someone approves it in the inbox. Run npx -y https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz login once to save a key, then use the settings for your client:

claude_desktop_config.json{
  "mcpServers": {
    "heroku": {
      "command": "npx",
      "args": [
        "-y",
        "https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
        "mcp-proxy",
        "--name",
        "heroku",
        "--look-only",
        "list_apps,get_app_info,list_private_spaces,list_teams,list_addons,get_addon_info,list_addon_services,list_addon_plans,ps_list,pipelines_list,pipelines_info",
        "--",
        "npx",
        "-y",
        "@heroku/mcp-server@1.2.15"
      ],
      "env": {
        "HEROKU_API_KEY": "…",
        "DISABLE_TELEMETRY": "true"
      }
    }
  }
}

Already have it in Claude Desktop? One command rewrites the file for you, with these look-only tools filled in, and keeps the old one (setup vscode does the same for VS Code; how it works):

npx -y https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz setup claude-desktop

The same in Claude Code, instead of the hook. The proxy now asks about every call that matters, so an allow rule for the whole server, mcp__heroku, keeps Claude Code from asking a second time in the terminal:

claude mcp add heroku -e HEROKU_API_KEY=… -e DISABLE_TELEMETRY=true -- npx -y https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz mcp-proxy --name heroku --look-only list_apps,get_app_info,list_private_spaces,list_teams,list_addons,get_addon_info,list_addon_services,list_addon_plans,ps_list,pipelines_list,pipelines_info -- npx -y @heroku/mcp-server@1.2.15

When the agent should change things

Claude Code’s rules match a tool’s name, not its arguments, so they cannot tell SELECT from DELETE in pg_psql, or a project folder from a home folder in deploy_to_heroku. A person who sees the arguments can. Outside Claude Code, the VariantGate MCP proxy sends each call to a person with its arguments, and the production deploys guide has a rule set for agents that deploy.

See it before you decide.

The playground runs the whole approval loop in your browser, no account needed. When it fits, the free plan covers 100 requests a month.