Heroku
official
database
Interact with the Heroku Platform through LLM-driven tools for managing apps, add-ons, dynos, databases, and more.
heroku-mcp-server
The Heroku Platform MCP Server works on Common Runtime, Cedar Private and Shield Spaces, and Fir Private Spaces.
Overview
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:
- Direct interaction with Heroku Platform resources through LLM-driven tools
- Secure and authenticated access to Heroku Platform APIs, leveraging the Heroku CLI
- Natural language interface for Heroku Platform interactions
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.
Authentication
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
in the following steps.HEROKU_API_KEY
-
In your Heroku Dashboard:
- Select your avatar, then select Account Settings.
- Open the Applications tab.
- Next to Authorizations, click Create authorization.
Configure the Heroku Platform MCP Server
You can configure Claude Desktop, Zed, Cursor, and Windsurf to work with the Heroku Platform MCP Server.
Claude Desktop
Add this snippet to your
claude_desktop_config.json
:{ "mcpServers": { "heroku": { "command": "npx -y @heroku/mcp-server", "env": { "HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>" } } } }
Zed
Add this snippet to your Zed
settings.json
:{ "context_servers": { "heroku": { "command": { "path": "npx", "args": ["-y", "@heroku/mcp-server"], "env": { "HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>" } } } } }
Cursor
Add this snippet to your Cursor
mcp.json
:{ "mcpServers": { "heroku": { "command": "npx -y @heroku/mcp-server", "env": { "HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>" } } } }
Windsurf
Add this snippet to your Windsurf
mcp_config.json
:{ "mcpServers": { "heroku": { "command": "npx -y @heroku/mcp-server", "env": { "HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>" } } } }
Available Tools
Application Management
- List all Heroku apps. You can filter apps by personal, collaborator, team, or space.list_apps
- Get detailed information about an app, including its configuration, dynos, and add-ons.get_app_info
- Create a new app with customizable settings for region, team, and space.create_app
- Rename an existing app.rename_app
- Transfer ownership of an app to another user or team.transfer_app
- Deploy projects to Heroku with andeploy_to_heroku
configuration, supporting team deployments, private spaces, and environment setups.app.json
- 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.deploy_one_off_dyno
Process & Dyno Management
- List all dynos for an app.ps_list
- Scale the number of dynos up or down, or resize dynos.ps_scale
- Restart specific dynos, process types, or all dynos.ps_restart
Add-ons
- List all add-ons for all apps or for a specific app.list_addons
- Get detailed information about a specific add-on.get_addon_info
- Provision a new add-on for an app.create_addon
Maintenance & Logs
- Enable maintenance mode for an app.maintenance_on
- Disable maintenance mode for an app.maintenance_off
- View application logs.get_app_logs
Pipeline Management
- Create a new pipeline.pipelines_create
- Promote apps to the next stage in a pipeline.pipelines_promote
- List available pipelines.pipelines_list
- Get detailed pipeline information.pipelines_info
Team & Space Management
- List teams you belong to.list_teams
- List available spaces.list_private_spaces
PostgreSQL Database Management
- Execute SQL queries against the Heroku PostgreSQL database.pg_psql
- Display detailed database information.pg_info
- View active queries and execution details.pg_ps
- View database locks and identify blocking transactions.pg_locks
- Identify resource-intensive queries.pg_outliers
- Manage database credentials and access.pg_credentials
- Terminate specific database processes.pg_kill
- Show database maintenance information.pg_maintenance
- Manage database backups and schedules.pg_backups
- Upgrade PostgreSQL to a newer version.pg_upgrade
Debugging
You can use the MCP inspector or the
VS Code Run and Debug function to
run and debug the server.
- Link the project as a global CLI using
from the project root.npm link
- Build with
or watch for file changes and build automatically withnpm run build:dev
.npm run build:watch
Use the MCP Inspector
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 Function
Use the VS Code
Run and Debug launcher with fully
functional breakpoints in the code:
- Locate and select the run debug.
- Select the configuration labeled "
" in the dropdown.MCP Server Launcher
- Select the run/debug button.
VS Code / Cursor Debugging Setup
To set up local debugging with breakpoints:
-
Store your Heroku auth token in the VS Code user settings:
- Open the Command Palette (Cmd/Ctrl + Shift + P).
- Type
.Preferences: Open User Settings (JSON)
- Add the following snippet:
{ "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
sidebar.Run and Debug
Note: the debugger automatically builds your TypeScript files before launching.
Related Servers
Apache IoTDB
official
MCP Server for [Apache IoTDB](https://github.com/apache/iotdb) database and its tools
View Details