Skip to main content
Glama
Heroku MCP server

Heroku MCP server

Official
by heroku

heroku-mcp-サーバー

鍛冶屋のバッジ

Heroku プラットフォーム MCP サーバーは、Common Runtime、Cedar Private、Shield Spaces、Fir Private Spaces で動作します。

Herokuにデプロイ

展開する

Related MCP server: ChatGPT Gateway MCP Nyan

概要

Heroku プラットフォーム MCP サーバーは、大規模言語モデル (LLM) と Heroku プラットフォーム間のシームレスな連携を実現するために設計された、特別なモデルコンテキストプロトコル (MCP) 実装です。このサーバーは、LLM が Heroku プラットフォームのリソースを読み取り、管理、操作するための堅牢なツールと機能を提供します。

主な機能:

  • LLM 駆動ツールを通じて Heroku プラットフォーム リソースと直接対話

  • Heroku CLI を活用した Heroku プラットフォーム API への安全で認証されたアクセス

  • Heroku プラットフォームインタラクションのための自然言語インターフェース

注:Heroku Platform MCP Serverは現在開発初期段階にあります。実装の強化と改良を続けていく中で、利用可能な機能やツールが進化していく可能性があります。このプロジェクトの将来を形作るために、皆様からのフィードバックと貢献をお待ちしております。

認証

次のいずれかの方法で Heroku 認証トークンを生成します。

  • Heroku CLI コマンドを使用します:

      heroku authorizations:create
  • CLIで既存のトークンを使用する

      heroku auth:token

    トークンをコピーし、次の手順でHEROKU_API_KEYとして使用します。

  • Heroku ダッシュボードで:

    1. アバターを選択し、 **[アカウント設定]**を選択します。

    2. アプリケーションタブを開きます。

    3. [承認]の横にある[承認の作成] をクリックします。

Heroku プラットフォーム MCP サーバーを構成する

Claude Desktop、Zed、Cursor、Windsurf などを Heroku Platform MCP Server で動作するように構成できます。

クロードデスクトップ

次のスニペットをclaude_desktop_config.jsonに追加します。

{
  "mcpServers": {
    "heroku": {
      "command": "npx",
      "args": ["-y", "@heroku/mcp-server"],
      "env": {
        "HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>"
      }
    }
  }
}

ゼッド

このスニペットを Zed のsettings.jsonに追加します。

{
  "context_servers": {
    "heroku": {
      "command": {
        "path": "npx",
        "args": ["-y", "@heroku/mcp-server"],
        "env": {
          "HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>"
        }
      }
    }
  }
}

カーソル

**注:**シンプルな形式と明示的な形式の両方が機能しますが、エージェント ツールとの互換性を最大限に高めるには、キーは"heroku" ( "heroku-mcp-server"ではない) にする必要があります。

次のスニペットをカーソルmcp.jsonに追加します。

シンプルなフォーム:

{
  "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>"
      }
    }
  }
}

ウィンドサーフィン

このスニペットを Windsurf mcp_config.jsonに追加します。

{
  "mcpServers": {
    "heroku": {
      "command": "npx",
      "args": ["-y", "@heroku/mcp-server"],
      "env": {
        "HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>"
      }
    }
  }
}

クライン

このスニペットを Cline config.jsonに追加します。

{
  "mcpServers": {
    "heroku": {
      "command": "npx",
      "args": ["-y", "@heroku/mcp-server"],
      "env": {
        "HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>"
      }
    }
  }
}

VSコード

このスニペットを VSCode のsettings.jsonまたは.vscode/mcp.jsonに追加します。

{
  "mcp": {
    "servers": {
      "heroku": {
        "type": "stdio",
        "command": "npx",
        "args": ["-y", "@heroku/mcp-server"],
        "env": {
          "HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>"
        }
      }
    }
  }
}

トレイ

このスニペットを Trae mcp_settings.jsonに追加します。

{
  "mcpServers": {
    "heroku": {
      "command": "npx",
      "args": ["-y", "@heroku/mcp-server"],
      "env": {
        "HEROKU_API_KEY": "<YOUR_HEROKU_AUTH_TOKEN>"
      }
    }
  }
}

利用可能なツール

アプリケーション管理

  • list_apps - すべての Heroku アプリを一覧表示します。個人、共同作業者、チーム、スペースでアプリをフィルタリングできます。

  • get_app_info - アプリの構成、dyno、アドオンなど、アプリに関する詳細情報を取得します。

  • create_app - 地域、チーム、スペースのカスタマイズ可能な設定を持つ新しいアプリを作成します。

  • rename_app - 既存のアプリの名前を変更します。

  • transfer_app - アプリの所有権を別のユーザーまたはチームに譲渡します。

  • deploy_to_heroku - app.json構成を使用してプロジェクトを Heroku にデプロイし、チームのデプロイ、プライベート スペース、環境設定をサポートします。

  • deploy_one_off_dyno - Herokuのワンオフdyno上のサンドボックス環境でコードやコマンドを実行します。ファイル作成、ネットワークアクセス、環境変数、自動クリーンアップをサポートします。スクリプト、テスト、一時的なワークロードの実行に最適です。

プロセスとダイノ管理

  • ps_list - アプリのすべての dyno を一覧表示します。

  • ps_scale - dyno の数を拡大または縮小したり、dyno のサイズを変更したりします。

  • ps_restart - 特定の dyno、プロセス タイプ、またはすべての dyno を再起動します。

アドオン

  • list_addons - すべてのアプリまたは特定のアプリのすべてのアドオンを一覧表示します。

  • get_addon_info - 特定のアドオンに関する詳細情報を取得します。

  • create_addon - アプリの新しいアドオンをプロビジョニングします。

メンテナンスとログ

  • maintenance_on - アプリのメンテナンス モードを有効にします。

  • maintenance_off - アプリのメンテナンス モードを無効にします。

  • get_app_logs - アプリケーション ログを表示します。

パイプライン管理

  • pipelines_create - 新しいパイプラインを作成します。

  • pipelines_promote - パイプラインの次のステージにアプリを昇格します。

  • pipelines_list - 利用可能なパイプラインを一覧表示します。

  • pipelines_info - 詳細なパイプライン情報を取得します。

チームとスペースの管理

  • list_teams - 所属するチームを一覧表示します。

  • list_private_spaces - 利用可能なスペースを一覧表示します。

PostgreSQLデータベース管理

  • pg_psql - Heroku PostgreSQL データベースに対して SQL クエリを実行します。

  • pg_info - 詳細なデータベース情報を表示します。

  • pg_ps - アクティブなクエリと実行の詳細を表示します。

  • pg_locks - データベースのロックを確認し、ブロックしているトランザクションを識別します。

  • pg_outliers - リソースを大量に消費するクエリを識別します。

  • pg_credentials - データベースの資格情報とアクセスを管理します。

  • pg_kill - 特定のデータベース プロセスを終了します。

  • pg_maintenance - データベースのメンテナンス情報を表示します。

  • pg_backups - データベースのバックアップとスケジュールを管理します。

  • pg_upgrade - PostgreSQL を新しいバージョンにアップグレードします。

デバッグ

MCP インスペクターまたはVS Code の実行とデバッグ機能を使用して、サーバーを実行およびデバッグできます。

  1. プロジェクト ルートからnpm linkを使用して、プロジェクトをグローバル CLI としてリンクします。

  2. npm run build:devでビルドするか、 npm run build:watchでファイルの変更を監視して自動的にビルドします。

MCPインスペクターを使用する

コードにブレークポイントを設定せずに MCP インスペクタを使用します。

# Breakpoints are not available
npx @modelcontextprotocol/inspector heroku-mcp-server

あるいは、パッケージを特定のディレクトリにインストールした場合、または Heroku MCP サーバーでアクティブに開発している場合は、次のようにします。

cd /path/to/servers
npx @modelcontextprotocol/inspector dist/index.js

VS Codeの実行とデバッグ機能を使用する

コード内の完全に機能するブレークポイントを備えた VS Code実行およびデバッグ ランチャーを使用します。

  1. 実行デバッグを見つけて選択します。

  2. ドロップダウンから「 MCP Server Launcher 」というラベルの付いた構成を選択します。

  3. 実行/デバッグボタンを選択します。

VS Code / カーソルデバッグ設定

ブレークポイントを使用してローカル デバッグを設定するには:

  1. Heroku 認証トークンを VS Code ユーザー設定に保存します。

    • コマンドパレットを開きます (Cmd/Ctrl + Shift + P)。

    • Preferences: Open User Settings (JSON)と入力します。

    • 次のスニペットを追加します。

    {
      "heroku.mcp.authToken": "your-token-here"
    }
  2. .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. .vscode/tasks.jsonを作成します:

    {
      "version": "2.0.0",
      "tasks": [
        {
          "type": "npm",
          "script": "build:watch",
          "group": {
            "kind": "build",
            "isDefault": true
          },
          "problemMatcher": ["$tsc"]
        }
      ]
    }
  4. (オプション) TypeScript ファイルにブレークポイントを設定します。

  5. F5 キーを押すか、 **Run and Debug**バーを使用します。

注: デバッガーは起動前に TypeScript ファイルを自動的にビルドします。

Smithery経由でインストール

Smithery経由で Claude Desktop 用の Heroku Platform MCP Server を自動的にインストールするには:

npx -y @smithery/cli install @heroku/heroku-mcp-server --client claude

Available Tools

33 tools
create_addonA

Create a new Heroku add-on for an application. Use this tool when you need to: 1) Provision a new add-on for your app, 2) Specify a particular service and plan, 3) Set a custom name for the add-on or attachment. The tool handles the provisioning process and returns the new add-on's details.

Inputs: app (required), serviceAndPlan (required), as, name.

create_appA

Create a new Heroku application with customizable settings. Use this tool when a user wants to: 1) Create a new app with a specific name, 2) Create an app in a particular region (US/EU), 3) Create an app within a team, or 4) Create an app in a private space. The tool handles name generation if not specified and returns the new app's details.

Inputs: app, region, space, team.

deploy_to_herokuA

Deploy projects to Heroku, replaces manual git push workflows. Use this tool when you need to: 1) Deploy a new application with specific app.json configuration, 2) Update an existing application with new code, 3) Configure team or private space deployments, or 4) Set up environment-specific configurations. The tool handles app creation, source code deployment, and environment setup. Requires valid app.json in workspace or provided via configuration. Supports team deployments, private spaces, and custom environment variables.Use apps_list tool with the "all" param to get a list of apps for the user to choose from when deploying to an existing app and the app name was not provided.

Inputs: name (required), rootUri (required), appJson, env, +4 more.

get_addon_infoA

Get comprehensive information about a Heroku add-on. Use this tool when you need to: 1) View add-on details, 2) Check plan details and state, 3) View billing information. Accepts add-on ID, name, or attachment name.

Inputs: addon (required), app.

get_app_infoA

Get comprehensive information about a Heroku application. Use this tool when you need to: 1) View app configuration and settings, 2) Check dyno formation and scaling, 3) List add-ons and buildpacks, 4) View collaborators and access details, 5) Check domains and certificates. Accepts app name and optional JSON format. Returns detailed app status and configuration.

Inputs: app (required), json.

get_app_logsA

View application logs with flexible filtering options. Use this tool when you need to: 1) Monitor application activity in real-time, 2) Debug issues by viewing recent logs, 3) Filter logs by dyno, process type, or source.

Inputs: app (required), dynoName, processType, source.

list_addon_plansA

List available plans for a specific Heroku add-on service. Use this tool when you need to: 1) View all plans for a service, 2) Compare plan pricing, 3) Check plan availability. Requires add-on service slug and returns detailed plan information.

Inputs: service (required), json.

list_addonsA

List Heroku add-ons with flexible filtering options. Use this tool when you need to: 1) View all add-ons across your apps, 2) List add-ons for a specific app, 3) Get detailed add-on metadata in JSON format.

Inputs: all, app, json.

list_addon_servicesA

List available Heroku add-on services. Use this tool when you need to view all available add-on services. Returns a list of add-on services with their basic information.

Inputs: json.

list_appsA

List Heroku applications with flexible filtering options. Use this tool when you need to: 1) Show all apps owned by the user, 2) Show apps where the user is a collaborator (use all=true), 3) Filter apps by team or private space. Note: For checking app name availability, prefer using get_app_info as it returns a more focused dataset. The response includes app names, regions, and ownership information.

Inputs: all, json, personal, space, +1 more.

list_private_spacesA

List Heroku Private Spaces available to the user. Use this tool when you need to: 1) View all private spaces, 2) Get space details like CIDR blocks and regions, 3) Check space compliance features, or 4) View space capacity information. Supports JSON output for detailed metadata. Essential for enterprise space management.

Inputs: json.

list_teamsA

List Heroku Teams the user belongs to. Use this tool when you need to: 1) View all accessible teams, 2) Check team membership, 3) Get team metadata and enterprise relationships, or 4) Verify team access for app operations. Supports JSON output for detailed team information.

Inputs: json.

maintenance_offA

Disable maintenance mode for Heroku applications. Use this tool when you need to: 1) Restore normal application traffic routing, 2) Resume dyno operations after maintenance, 3) Complete deployment processes, 4) Verify application health after maintenance. The tool handles service restoration and process resumption.

Inputs: app (required).

maintenance_onA

Enable maintenance mode for Heroku applications. Use this tool when you need to: 1) Redirect traffic to a maintenance page, 2) Prepare for system updates or deployments, 3) Schedule planned maintenance windows, 4) Gracefully handle service interruptions. The tool manages traffic routing and process states while preserving running operations.

Inputs: app (required).

pg_backupsB

Manage database backup operations and schedules. Use this tool when you need to: 1) View existing database backups, 2) Monitor backup schedules and status, 3) Track backup operation progress, 4) Verify backup availability. The tool helps maintain database backup operations and disaster recovery readiness.

Inputs: app (required).

pg_credentialsA

Manage database access credentials and security. Use this tool when you need to: 1) View current database credentials, 2) Configure database access permissions, 3) Rotate credentials for security compliance, 4) Set up monitoring access. The tool helps maintain secure database access and credential management.

Inputs: app (required), database.

pg_infoA

Display detailed information about Heroku PostgreSQL databases. Use this tool when you need to: 1) View comprehensive database configuration and status, 2) Monitor database performance metrics, 3) Check connection and resource utilization, 4) Assess database health and capacity. The tool provides detailed insights into database operations and configuration.

Inputs: app (required), database.

pg_killA

Terminate specific database processes. Use this tool when you need to: 1) Stop problematic or stuck queries, 2) Clear blocking transactions, 3) Manage resource-intensive operations, 4) Handle runaway processes safely. The tool provides controlled process termination with optional force mode.

Inputs: app (required), pid (required), database, force.

pg_locksA

Analyze database locks and blocking transactions. Use this tool when you need to: 1) Identify blocked queries and lock chains, 2) Investigate deadlock situations, 3) Monitor transaction lock states, 4) Resolve blocking issues affecting performance. The tool helps diagnose and resolve database concurrency problems.

Inputs: app (required), database, truncate.

pg_maintenanceA

Monitor database maintenance status and operations. Use this tool when you need to: 1) Check current maintenance windows, 2) View scheduled maintenance activities, 3) Track maintenance operation progress, 4) Plan database maintenance tasks. The tool provides visibility into database maintenance state and scheduling.

Inputs: app (required), database.

pg_outliersB

Identify resource-intensive database operations. Use this tool when you need to: 1) Find slow or expensive queries, 2) Analyze query performance patterns, 3) Optimize database workload, 4) Track query statistics over time. The tool helps identify opportunities for performance optimization.

Inputs: app (required), database, num, reset, +1 more.

pg_psA

Monitor active database queries and processes. Use this tool when you need to: 1) View currently executing queries, 2) Track query progress and resource usage, 3) Identify long-running or blocked queries, 4) Debug performance issues in real-time. The tool provides detailed visibility into database activity with optional verbose output.

Inputs: app (required), database, verbose.

pg_psqlA

Execute SQL queries against Heroku PostgreSQL databases. Use this tool when you need to: 1) Run SQL queries for database analysis, 2) Investigate database locks and performance, 3) Make schema modifications or updates, 4) Execute complex database operations. The tool provides direct SQL access with support for file-based queries and credential management.

Inputs: app (required), command, credential, database, +1 more.

pg_upgradeA

Upgrade PostgreSQL database version. Use this tool when you need to: 1) Migrate to a newer PostgreSQL version, 2) Plan version upgrade paths, 3) Execute controlled version migrations, 4) Verify upgrade compatibility. The tool manages safe database version upgrades with confirmation protection.

Inputs: app (required), confirm, database, version.

pipelines_createA

Create new Heroku deployment pipelines. Use this tool when you need to: 1) Set up new deployment workflows, 2) Create staged application environments, 3) Organize apps by development stages, 4) Configure team-based pipeline structures. The tool manages pipeline creation with optional team and initial app configuration.

Inputs: name (required), stage (required), app, team.

pipelines_infoA

Display detailed pipeline configuration. Use this tool when you need to: 1) View pipeline stage configuration, 2) Check connected applications, 3) Verify pipeline settings, 4) Monitor pipeline status. The tool provides comprehensive pipeline information and structure details.

Inputs: pipeline (required), json.

pipelines_listA

View available Heroku pipelines. Use this tool when you need to: 1) List accessible pipelines, 2) Check pipeline ownership and access, 3) View pipeline organization, 4) Find specific pipeline configurations. The tool provides pipeline visibility with optional JSON output format.

Inputs: json.

pipelines_promoteA

Promote applications through pipeline stages. Use this tool when you need to: 1) Deploy code to staging or production environments, 2) Manage staged releases, 3) Coordinate multi-app promotions, 4) Control deployment workflows. The tool handles safe promotion of apps between pipeline stages.

Inputs: app (required), to.

ps_listA

List and monitor Heroku application dynos. Use this tool when you need to: 1) View all running dynos for an app, 2) Check dyno status and health, 3) Monitor application process states, 4) Verify dyno configurations. The tool provides process visibility with optional JSON output format.

Inputs: app (required), json.

ps_restartA

Restart Heroku application processes. Use this tool when you need to: 1) Restart specific dynos by name, 2) Restart all dynos of a process type, 3) Perform full application restarts, 4) Reset dyno states selectively. The tool manages process restarts with flexible targeting options.

Inputs: app (required), dyno-name, process-type.

ps_scaleA

Scale and resize Heroku application dynos. Use this tool when you need to: 1) Adjust dyno quantities up or down, 2) Change dyno sizes for performance, 3) View current formation details, 4) Manage resource allocation. The tool handles dyno scaling with support for type-specific adjustments.

Inputs: app (required), dyno.

rename_appA

Rename an existing Heroku application. Use this tool when a user needs to: 1) Change an app's name, or 2) Resolve naming conflicts. Requires both current app name and desired new name. The tool validates name availability and handles the rename process.

Inputs: app (required), newName (required).

transfer_appA

Transfer ownership of a Heroku application. Use this tool when a user wants to: 1) Transfer an app to another user's account, 2) Move an app to a team, 3) Change app ownership for organizational purposes. Requires the app name and recipient (email for users, name for teams). The current user must be the app owner or a team admin to perform the transfer.

Inputs: app (required), recipient (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 33 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting specific resources and actions, such as create_app vs. get_app_info. However, some PostgreSQL tools like pg_ps and pg_outliers have overlapping monitoring functions that could cause confusion, though their descriptions help differentiate them.

    Naming Consistency5/5

    Tool names follow a highly consistent verb_noun or noun_verb pattern throughout, such as create_addon, list_addons, pg_backups, and ps_scale. All use snake_case uniformly, with clear prefixes like 'pg_' for PostgreSQL and 'ps_' for process-related tools, making the naming predictable and readable.

    Tool Count3/5

    With 33 tools, the count is high and may feel heavy for the Heroku domain, as it includes many specialized PostgreSQL tools that could be consolidated. While comprehensive, it borders on being overwhelming compared to typical well-scoped servers (3-15 tools), though it covers a broad range of operations.

    Completeness5/5

    The tool set provides complete CRUD and lifecycle coverage for Heroku's core domains, including apps, add-ons, PostgreSQL, pipelines, and processes. It handles creation, retrieval, updates, deletion, and management operations across all areas, with no obvious gaps that would cause agent failures.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides comprehensive Heroku application management through the Heroku Platform API for AI assistants using the Model Context Protocol. It enables users to scale dynos, view deployment history, access logs, and manage environment variables through natural language.
      8
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables agent clients to safely connect to tools and execution resources through MCP with authorization, approvals, audit, chat-context isolation, SSH/Docker access, and long-running command session tracking.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants and MCP clients to execute commands, copy/move files, manage background jobs and port forwarding, and optionally view and control remote screens using scoped, expiring agent tokens.
      6 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to create projects, deploy files, container images, or Git repositories, attach domains, set write-only secrets, add Postgres, read logs, metrics, and failure summaries, and roll back.
      Apache 2.0