Heroku MCP Server
Published
At a glance
- Category
- Cloud & DevOps
- GitHub repository
- heroku/heroku-mcp-server
- Watch out for
- Heroku labels the server as early development, so tools and behaviour may change between versions.
The Heroku Platform MCP Server is published by Heroku in the heroku/heroku-mcp-server repository and on npm as @heroku/mcp-server. It lets an AI agent read and operate Heroku resources: apps, dynos, add-ons, pipelines, logs, teams, private spaces and Heroku Postgres databases.
It runs locally over stdio and talks to Heroku through the Heroku CLI, which must be installed globally at version 10.8.1 or later. The README says it works on Common Runtime, Cedar Private and Shield Spaces, and Fir Private Spaces.
Heroku describes the project as being in early development, so the tool list may change between releases. There are two ways to start it: through the CLI with heroku mcp:start, which reuses your existing CLI login, or with npx and an API token in an environment variable.
How it connects
Your AI app
An assistant or agent that supports MCP
Heroku MCP Server
Runs as
- npx (Node.js)
Gives the agent
- App management
- One-off dynos
- Dynos and processes
- Add-ons, logs and maintenance
- Pipelines, teams and spaces
- Heroku Postgres
Heroku
Signs in with
- API key
What it can do
- App management
- list_apps, get_app_info, create_app, rename_app and transfer_app cover the app lifecycle, and deploy_to_heroku deploys a project that has an app.json file.
- One-off dynos
- deploy_one_off_dyno runs code or commands in a sandboxed one-off dyno, with file creation, network access, environment variables and automatic cleanup.
- Dynos and processes
- ps_list lists an app's dynos, ps_scale changes their count or size, and ps_restart restarts specific dynos, process types or all of them.
- Add-ons, logs and maintenance
- list_addons, get_addon_info and create_addon handle add-ons. get_app_logs reads logs, and maintenance_on and maintenance_off toggle maintenance mode.
- Pipelines, teams and spaces
- pipelines_create, pipelines_promote, pipelines_list and pipelines_info manage pipelines, while list_teams and list_private_spaces show what you have access to.
- Heroku Postgres
- pg_psql runs SQL, and pg_info, pg_ps, pg_locks, pg_outliers, pg_maintenance, pg_credentials, pg_kill, pg_backups and pg_upgrade cover diagnostics, credentials, backups and version upgrades.
Setting it up
Install the Heroku CLI (10.8.1 or newer), log in, and check the version with heroku --version. The recommended config for Claude Desktop, Cursor, Windsurf, Cline and Trae is an mcpServers entry named heroku with "command": "heroku mcp:start", which uses your current CLI session so no API key is needed. In VS Code, add a server under mcp.servers with "type": "stdio", "command": "heroku" and "args": ["mcp:start"]; Zed uses a context_servers entry with the same path and args. The alternative is npx -y @heroku/mcp-server with HEROKU_API_KEY set to an authorization token, which you can create with heroku authorizations:create, read with heroku auth:token, or generate under Account Settings, Applications in the dashboard. MCP_SERVER_REQUEST_TIMEOUT (default 15000 ms) and MCP_SERVER_IDLE_TIMEOUT (default 300000 ms, 0 disables idle teardown) tune timeouts.
claude mcp add heroku -- npx -y @heroku/mcp-serverRuns the @heroku/mcp-server package from npm. Add any API keys, environment variables or extra arguments the setup notes above list. Combine several servers in the MCP config generator
Where each client keeps its MCP config file, and the JSON it expects (cheat sheet)
Where it helps
- Check why an app is failing by pulling get_app_logs output and the dyno list from ps_list, then restarting the affected process type.
- Find slow or blocking Postgres queries with pg_outliers, pg_ps and pg_locks before deciding whether to kill one.
- Promote a build from staging to production through pipelines_promote after reviewing pipelines_info.
- Run a one-off script or test in an isolated dyno with deploy_one_off_dyno instead of on a running web dyno.
- Scale workers up for a batch job with ps_scale and back down afterwards.
Limitations and things to watch
- Heroku labels the server as early development, so tools and behaviour may change between versions.
- It depends on a globally installed Heroku CLI at version 10.8.1 or later, even when launched through npx.
- Many tools change live infrastructure, including transfer_app, ps_scale, pg_kill, pg_credentials and pg_upgrade, and pg_psql can run any SQL the credentials allow, so review agent actions before approving them.
- The server acts with the full permissions of your CLI session or the HEROKU_API_KEY token you give it.
- Commands time out after 15 seconds by default, so long operations may need MCP_SERVER_REQUEST_TIMEOUT raised.
Sources
Written from the project's own documentation, checked November 2026.
- github.com /heroku/heroku-mcp-server
- devcenter.heroku.com /articles/heroku-mcp-server
- npmjs.com /package/@heroku/mcp-server
How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.