Cover image
Try Now
2025-04-14

Heroku Platform MCP Server

3 years

Works with Finder

25

Github Watches

3

Github Forks

17

Github Stars

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.

Install the Heroku Platform MCP Server

Install the Heroku Platform MCP Server globally usingnpm:

npm i -g @heroku/mcp-server

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 HEROKU_API_KEY in the following steps.

  • In your Heroku Dashboard:

    1. Select your avatar, then select Account Settings.
    2. Open the Applications tab.
    3. 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_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.

Process & Dyno Management

  • 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.

Add-ons

  • 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 & Logs

  • maintenance_on - Enable maintenance mode for an app.
  • maintenance_off - Disable maintenance mode for an app.
  • get_app_logs - View application logs.

Pipeline Management

  • 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.

Team & Space Management

  • list_teams - List teams you belong to.
  • list_private_spaces - List available spaces.

PostgreSQL Database Management

  • 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.

Debugging

You can use the MCP inspector or the VS Code Run and Debug function to run and debug the server.

  1. Link the project as a global CLI using npm link from the project root.
  2. Build with npm run build:dev or watch for file changes and build automatically with 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:

  1. Locate and select the run debug.
  2. Select the configuration labeled "MCP Server Launcher" in the dropdown.
  3. Select the run/debug button.

VS Code / Cursor Debugging Setup

To set up local debugging with breakpoints:

  1. 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"
    }
    
  2. 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"]
        }
      ]
    }
    
  3. Create .vscode/tasks.json:

    {
      "version": "2.0.0",
      "tasks": [
        {
          "type": "npm",
          "script": "build:watch",
          "group": {
            "kind": "build",
            "isDefault": true
          },
          "problemMatcher": ["$tsc"]
        }
      ]
    }
    
  4. (Optional) Set breakpoints in your TypeScript files.

  5. Press F5 or use the Run and Debug sidebar.

Note: the debugger automatically builds your TypeScript files before launching.

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Lists Tailwind CSS classes in monospaced font

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • apappascs
  • Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • jae-jae
  • MCP server for fetch web page content using Playwright headless browser.

  • HiveNexus
  • An AI chat bot for small and medium-sized teams, supporting models such as Deepseek, Open AI, Claude, and Gemini. 专为中小团队设计的 AI 聊天应用,支持 Deepseek、Open AI、Claude、Gemini 等模型。

  • ravitemer
  • A powerful Neovim plugin for managing MCP (Model Context Protocol) servers

  • patruff
  • Bridge between Ollama and MCP servers, enabling local LLMs to use Model Context Protocol tools

    Reviews

    5 (1)
    Avatar
    user_6QZwEv4c
    2025-04-16

    As a dedicated user of Heroku MCP applications, I found the Heroku MCP Server to be an indispensable tool for managing my cloud projects. The seamless integration and reliable performance have significantly improved my productivity. Highly recommended for anyone looking to streamline their cloud operations!