by heroku
Enables large language models to manage and operate Heroku platform resources directly through the Heroku CLI, exposing a set of tools for app, dyno, add‑on, pipeline, database, and team operations.
Provides a Model Context Protocol (MCP) implementation that lets LLM‑driven clients interact with Heroku resources—apps, dynos, add‑ons, pipelines, PostgreSQL databases, teams, and private spaces—using the authenticated Heroku CLI session.
heroku --version
.npx -y @heroku/mcp-server
This requires setting the HEROKU_API_KEY
environment variable to a valid Heroku auth token (obtain via heroku auth:token
or the dashboard).list_apps
, create_app
, ps_scale
, pg_backups
, etc., and receive structured responses.heroku mcp:start
.MCP_SERVER_REQUEST_TIMEOUT
.Q: Do I need to expose my API key?
A: No, if you launch the server with heroku mcp:start
it uses the current CLI authentication. The npx
method requires HEROKU_API_KEY
.
Q: Which Heroku CLI version is required? A: Version 10.8.1 or newer.
Q: Can I run the server on a non‑Heroku machine? A: Yes, the server runs anywhere Node.js is available, provided it can reach the Heroku API and you supply a valid token.
Q: How are timeouts handled?
A: The MCP_SERVER_REQUEST_TIMEOUT
env variable sets the max request duration (default 15000 ms).
Q: Is the server open‑source? A: Yes, the code is hosted at https://github.com/heroku/heroku-mcp-server.
The Heroku Platform MCP Server works on Common Runtime, Cedar Private and Shield Spaces, and Fir Private Spaces.
The Heroku Platform MCP Server is a specialized Model Context Protocol (MCP) implementation designed to facilitate seamless interaction between large language models (LLMs) and the Heroku Platform. This server provides a robust set of tools and capabilities that enable LLMs to read, manage, and operate Heroku Platform resources.
Key Features:
Note: The Heroku Platform MCP Server is currently in early development. As we continue to enhance and refine the implementation, the available functionality and tools may evolve. We welcome feedback and contributions to help shape the future of this project.
Note: The Heroku Platform MCP Server requires the Heroku CLI to be installed globally (v10.8.1+). Ensure you have the correct version by running
heroku --version
.
You can configure Claude Desktop, Zed, Cursor, Windsurf, and other clients to work with the Heroku Platform MCP Server.
heroku mcp:start
Use heroku mcp:start
to launch the Heroku Platform MCP Server. We recommend this method as it leverages your existing
Heroku CLI authentication, so you don't need to set the
HEROKU_API_KEY
environment variable. The
heroku mcp:start
command is available in Heroku CLI version 10.8.1 and later.
There are several benefits to configuring with heroku mcp:start
:
{
"mcpServers": {
"heroku": {
"command": "heroku mcp:start"
}
}
}
{
"context_servers": {
"heroku": {
"command": {
"path": "heroku",
"args": ["mcp:start"]
}
}
}
}
{
"mcpServers": {
"heroku": {
"command": "heroku mcp:start"
}
}
}
{
"mcpServers": {
"heroku": {
"command": "heroku mcp:start"
}
}
}
{
"mcpServers": {
"heroku": {
"command": "heroku mcp:start"
}
}
}
{
"mcp": {
"servers": {
"heroku": {
"type": "stdio",
"command": "heroku",
"args": ["mcp:start"]
}
}
}
}
{
"mcpServers": {
"heroku": {
"command": "heroku mcp:start"
}
}
}
Note: When you use
heroku mcp:start
, the server authenticates using your current Heroku CLI session so you don't need to set theHEROKU_API_KEY
environment variable. We recommend you useheroku mcp:start
, but if you prefer to use an API key, you can use the alternate configuration below.
npx -y @heroku/mcp-server
You can also launch the Heroku Platform MCP Server using the npx -y @heroku/mcp-server
command. This method requires
you to set the HEROKU_API_KEY
environment
variable with your Heroku
authorization token.
HEROKU_API_KEY
Generate a Heroku authorization token with one of these methods:
Use the Heroku CLI command:
heroku authorizations:create
Use an existing token in the CLI
heroku auth:token
Copy the token and use it as your HEROKU_API_KEY
in the following steps.
In your Heroku Dashboard:
{
"mcpServers": {
"heroku": {
"command": "npx",
"args": ["-y", "@heroku/mcp-server"],
"env": {
"HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>"
}
}
}
}
{
"context_servers": {
"heroku": {
"command": {
"path": "npx",
"args": ["-y", "@heroku/mcp-server"],
"env": {
"HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>"
}
}
}
}
}
{
"mcpServers": {
"heroku": {
"command": "npx -y @heroku/mcp-server",
"env": {
"HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>"
}
}
}
}
{
"mcpServers": {
"heroku": {
"command": "npx",
"args": ["-y", "@heroku/mcp-server"],
"env": {
"HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>"
}
}
}
}
{
"mcpServers": {
"heroku": {
"command": "npx",
"args": ["-y", "@heroku/mcp-server"],
"env": {
"HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>"
}
}
}
}
{
"mcp": {
"servers": {
"heroku": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@heroku/mcp-server"],
"env": {
"HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>"
}
}
}
}
}
{
"mcpServers": {
"heroku": {
"command": "npx",
"args": ["-y", "@heroku/mcp-server"],
"env": {
"HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>"
}
}
}
}
Note: When you use
npx -y @heroku/mcp-server
, you must set theHEROKU_API_KEY
environment variable with your Heroku authorization token.
list_apps
- List all Heroku apps. You can filter apps by personal, collaborator, team, or space.get_app_info
- Get detailed information about an app, including its configuration, dynos, and add-ons.create_app
- Create a new app with customizable settings for region, team, and space.rename_app
- Rename an existing app.transfer_app
- Transfer ownership of an app to another user or team.deploy_to_heroku
- Deploy projects to Heroku with an app.json
configuration, supporting team deployments, private
spaces, and environment setups.deploy_one_off_dyno
- Execute code or commands in a sandboxed environment on a Heroku one-off dyno. Supports file
creation, network access, environment variables, and automatic cleanup. Ideal for running scripts, tests, or temporary
workloads.ps_list
- List all dynos for an app.ps_scale
- Scale the number of dynos up or down, or resize dynos.ps_restart
- Restart specific dynos, process types, or all dynos.list_addons
- List all add-ons for all apps or for a specific app.get_addon_info
- Get 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 stage in a pipeline.pipelines_list
- List available pipelines.pipelines_info
- Get detailed pipeline information.list_teams
- List teams you belong to.list_private_spaces
- List available spaces.pg_psql
- Execute SQL queries against the Heroku PostgreSQL database.pg_info
- Display detailed database information.pg_ps
- View active queries and execution details.pg_locks
- View database 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.You can use the MCP inspector or the VS Code Run and Debug function to run and debug the server.
npm link
from the project root.npm run build:dev
or watch for file changes and build automatically with npm run build:watch
.Use the MCP inspector with no breakpoints in the code:
# Breakpoints are not available
npx @modelcontextprotocol/inspector heroku-mcp-server
Alternatively, if you installed the package in a specific directory or are actively developing on the Heroku MCP server:
cd /path/to/servers
npx @modelcontextprotocol/inspector dist/index.js
Use the VS Code Run and Debug launcher with fully functional breakpoints in the code:
MCP Server Launcher
" in the dropdown.To set up local debugging with breakpoints:
Store your Heroku auth token in the VS Code user settings:
Preferences: Open User Settings (JSON)
.{
"heroku.mcp.authToken": "your-token-here"
}
Create or update .vscode/launch.json
:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "MCP Server Launcher",
"skipFiles": ["<node_internals>/**"],
"program": "${workspaceFolder}/node_modules/@modelcontextprotocol/inspector/bin/cli.js",
"outFiles": ["${workspaceFolder}/**/dist/**/*.js"],
"env": {
"HEROKU_API_KEY": "${config:heroku.mcp.authToken}",
"DEBUG": "true"
},
"args": ["heroku-mcp-server"],
"sourceMaps": true,
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"preLaunchTask": "npm: build:watch"
},
{
"type": "node",
"request": "attach",
"name": "Attach to Debug Hook Process",
"port": 9332,
"skipFiles": ["<node_internals>/**"],
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
},
{
"type": "node",
"request": "attach",
"name": "Attach to REPL Process",
"port": 9333,
"skipFiles": ["<node_internals>/**"],
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
}
],
"compounds": [
{
"name": "Attach to MCP Server",
"configurations": ["Attach to Debug Hook Process", "Attach to REPL Process"]
}
]
}
Create .vscode/tasks.json
:
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build:watch",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": ["$tsc"]
}
]
}
(Optional) Set breakpoints in your TypeScript files.
Press F5 or use the Run and Debug
sidebar.
Note: the debugger automatically builds your TypeScript files before launching.
To install Heroku Platform MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @heroku/heroku-mcp-server --client claude
The Heroku Platform MCP Server supports the following environment variables:
HEROKU_API_KEY
Your Heroku authorization token. Required for authentication with the Heroku Platform.
MCP_SERVER_REQUEST_TIMEOUT
Timeout in milliseconds for command execution. Defaults to 15000 (15 seconds) if not set.
Example configuration with custom timeout:
{
"mcpServers": {
"heroku": {
"command": "npx",
"args": ["-y", "@heroku/mcp-server"],
"env": {
"HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>",
"MCP_SERVER_REQUEST_TIMEOUT": "30000"
}
}
}
}
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "heroku": { "command": "npx", "args": [ "-y", "@heroku/mcp-server" ], "env": { "HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by awslabs
Provides specialized servers that expose AWS capabilities through the Model Context Protocol, enabling AI assistants to retrieve up-to-date documentation, execute API calls, and automate infrastructure workflows directly within development environments.
by cloudflare
Provides a collection of Model Context Protocol servers that enable MCP‑compatible clients to interact with Cloudflare services such as Workers, Observability, Radar, and more, allowing natural‑language driven management of configurations, data, and operations.
by Flux159
Connects to a Kubernetes cluster and offers a unified MCP interface for kubectl, Helm, port‑forwarding, diagnostics, and non‑destructive read‑only mode.
by TencentEdgeOne
Deploy HTML, folders, or zip archives to EdgeOne Pages and instantly obtain a public URL for fast edge delivery.
by rishikavikondala
Provides Model Context Protocol tools for performing AWS S3 and DynamoDB operations, with automatic logging and audit access via the `audit://aws-operations` endpoint.
by confluentinc
Enables AI assistants to manage Confluent Cloud resources such as Kafka topics, connectors, and Flink SQL statements through natural‑language interactions.
by aliyun
Enables AI assistants to operate Alibaba Cloud resources such as ECS, Cloud Monitor, OOS and other services through seamless integration with Alibaba Cloud APIs via the Model Context Protocol.
by aws-samples
Retrieve PDF documents and other S3 objects through Model Context Protocol resources, enabling LLMs to pull data directly from AWS S3 buckets.
by kocierik
Connects to HashiCorp Nomad and exposes Model Context Protocol endpoints for job, deployment, node, allocation, variable, volume, ACL, Sentinel, and cluster management via a Go‑based server.