Heroku Code MCP

io.github.dsouzaAnush由 GitHub 帳號 dsouzaAnush 發布v0.1.0更新於 Oct 24, 2026

Search and execute Heroku Platform API operations

概覽

AI 產生的概覽

精簡的 MCP 伺服器,讓助理透過 auth_status、search 與 execute 三個工具檢索並執行 Heroku 平台 API 操作。

可以做什麼
  • 檢查呼叫端是否已通過 Heroku 身分驗證,方便在呼叫 API 前分流處理
  • 以自然語言意圖從 schema 與文件內容中檢索並排序 Heroku 操作
  • 依選定的操作執行請求,帶入路徑參數、查詢參數與請求主體
  • 對寫入操作先試跑,再憑確認權杖重放執行
適用情境
適合希望助理透過即時 API 呼叫管理 Heroku 應用程式與平台資源、同時讓工具清單保持精簡省 token 的情境。也適合已在使用 Heroku CLI、想讓代理程式執行讀取操作並可選擇性受控寫入的使用者。
執行需求
以本機 Node.js 程序執行,需從儲存庫安裝相依套件、建置並啟動,提供本機 HTTP MCP 端點,也可透過 npx 從 GitHub 啟動。需要 Heroku 帳戶權杖(由 Heroku CLI 匯入或走 OAuth),以及 TOKEN_STORE_PATH 與 TOKEN_ENCRYPTION_KEY_BASE64;用戶端以 x-user-id 標頭連線。啟用寫入還需 ALLOW_WRITES 與 WRITE_CONFIRMATION_SECRET。
安裝前請注意
它會在本機加密權杖儲存區保存 Heroku 帳戶權杖,需妥善保護 TOKEN_STORE_PATH 與 TOKEN_ENCRYPTION_KEY_BASE64。變更操作預設會被阻擋,但設定 ALLOW_WRITES 後助理即可建立、修改或刪除 Heroku 資源,確認前應先檢視試跑結果。敏感標頭與請求主體欄位會被遮蔽,但 API 資料仍會傳送給 Heroku。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Heroku Code MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[Heroku]

Heroku Code MCP

A compact MCP server for the Heroku Platform API using a Code Mode pattern: search + execute + auth_status.

Heroku Code MCP gives agent clients a small, token-efficient control surface for Heroku operations. Pair it with Heroku Skills when you want workflow guidance, safety checks, and Heroku product context alongside live API tools.

Design references:

Quick Start

Default MCP URL: http://127.0.0.1:3000/mcp

bash
git clone https://github.com/dsouzaAnush/heroku-code-mcp.gitcd heroku-code-mcpnpm installnpm run buildnpm test

Seed auth from the Heroku CLI:

bash
heroku auth:whoaminpm run seed:token

Start the server:

bash
TOKEN_STORE_PATH=./data/tokens.integration.json \TOKEN_ENCRYPTION_KEY_BASE64="<seed-output-key>" \PORT=3000 HOST=127.0.0.1 npm run dev

Smoke test:

bash
curl -sS http://127.0.0.1:3000/healthzMCP_URL=http://127.0.0.1:3000/mcp USER_ID=default npm run smoke:mcp

Before npm publication, the package can also run from GitHub:

bash
HOST=127.0.0.1 PORT=3333 \TOKEN_STORE_PATH="$HOME/.heroku-code-mcp/tokens.json" \TOKEN_ENCRYPTION_KEY_BASE64="<base64-32-byte-key>" \WRITE_CONFIRMATION_SECRET="<random-secret>" \npx -y github:dsouzaAnush/heroku-code-mcp

Install in Agent Clients

[Claude Code] Claude Code

Install the companion plugin for skills plus MCP wiring:

bash
claude plugin marketplace add dsouzaAnush/heroku-pluginclaude plugin install heroku@heroku-pluginclaude plugin enable heroku@heroku-plugin

Or add the running MCP server directly:

bash
claude mcp add \  --transport http \  --scope local \  heroku-code-mcp \  http://127.0.0.1:3000/mcp \  --header "x-user-id: default"

[Claude Desktop] Claude Desktop

Use the HTTP endpoint directly when supported:

json
{  "mcpServers": {    "heroku-code-mcp": {      "type": "http",      "url": "http://127.0.0.1:3000/mcp",      "headers": {        "x-user-id": "default"      }    }  }}

For Desktop builds that expect stdio servers, bridge through mcp-remote:

json
{  "mcpServers": {    "heroku-code-mcp": {      "command": "npx",      "args": ["-y", "mcp-remote", "http://127.0.0.1:3000/mcp", "--allow-http", "--header", "x-user-id:default"]    }  }}

Build a .mcpb bundle with:

bash
npm run build:mcpb

[OpenAI Codex] Codex

Codex uses Heroku Plugin for skills and optional MCP wiring:

bash
codex plugin marketplace add dsouzaAnush/heroku-plugin --ref main

Enable heroku-plugin@heroku-plugin in the Codex Plugins tab, or add:

toml
[plugins."heroku-plugin@heroku-plugin"]enabled = true

Run this MCP server on http://127.0.0.1:3333/mcp when you want live Heroku API tools through the plugin.

[Cursor] Cursor

bash
git clone https://github.com/dsouzaAnush/heroku-plugin.gitcursor agent --plugin-dir heroku-plugin

Add the MCP server to ~/.cursor/mcp.json or project-local .cursor/mcp.json:

json
{  "mcpServers": {    "heroku-code-mcp": {      "type": "streamable-http",      "url": "http://127.0.0.1:3333/mcp",      "headers": {        "x-user-id": "default"      }    }  }}

Other MCP Clients

Use streamable HTTP:

json
{  "mcpServers": {    "heroku-code-mcp": {      "transport": "streamable_http",      "url": "http://127.0.0.1:3000/mcp",      "headers": {        "x-user-id": "default"      }    }  }}

Or bridge to stdio:

json
{  "mcpServers": {    "heroku-code-mcp": {      "command": "npx",      "args": ["-y", "mcp-remote", "http://127.0.0.1:3000/mcp", "--allow-http", "--header", "x-user-id:default"]    }  }}

How It Works

ToolWhat it doesWhy it exists
auth_statusReports whether the caller is authenticated with HerokuLets agents branch cleanly before API work
searchRanks Heroku operations from schema and docs contextAvoids exposing dozens of endpoint-shaped tools up front
executeValidates params/body and calls the selected Heroku operationGives one deterministic execution path

Typical flow:

  1. Call auth_status.
  2. Call search with natural language intent.
  3. Choose one operation_id.
  4. Call execute with path_params, query_params, and body.
  5. For writes, run dry_run=true, then replay with confirm_write_token and ALLOW_WRITES=true.

Examples:

json
{  "query": "list apps",  "limit": 5}
json
{  "operation_id": "GET /apps"}
json
{  "operation_id": "PATCH /apps/{app_identity}",  "path_params": {    "app_identity": "my-app"  },  "body": {    "maintenance": true  },  "dry_run": true}

Safety and Configuration

Mutations (POST, PATCH, PUT, DELETE) are blocked by default. To allow a write, set ALLOW_WRITES=true, request a dry run, and replay with the returned confirm_write_token. Sensitive headers and body fields are redacted.

Key env vars:

  • ALLOW_WRITES
  • REQUEST_TIMEOUT_MS
  • MAX_RETRIES
  • CATALOG_CACHE_PATH
  • READ_CACHE_TTL_MS
  • EXECUTE_MAX_BODY_BYTES
  • EXECUTE_BODY_PREVIEW_CHARS

Full example: .env.example

Benchmarks

Benchmarks were captured on February 22, 2026 on the same machine and account for both implementations.

Metricheroku-code-mcpofficial Heroku MCPDelta
Tool count33791.9% lower
Tool-list payload bytes1,46925,50094.2% lower
Tool-list approx tokens3686,37594.2% lower
Connect avg14.8 ms10,168.7 ms687x faster
list_tools avg4.3 ms10.3 ms2.4x faster
Read op avg528.0 ms (execute GET /apps)9,697.4 ms (list_apps)18.4x faster

Charts:

Full methodology and artifacts live in BENCHMARKS.md and benchmarks/results/.

Development and Release

Validate locally:

bash
npm run buildnpm testnpm run validate:servernpm run publish:dry-run

This repo uses free GitHub Actions:

  • validate.yml runs build, tests, server.json validation, and npm pack dry-run on PRs and pushes to main.
  • release.yml runs on v* tags, builds the .mcpb, updates release server.json, creates or updates the GitHub Release, and publishes to the MCP Registry through GitHub OIDC.
  • Dependabot checks npm and GitHub Actions dependencies weekly.

Publish manually when needed:

bash
npm publish --access publicmcp-publisher login githubmcp-publisher publish server.json

For CI-based npm publishing, configure npm trusted publishing for repo dsouzaAnush/heroku-code-mcp and workflow release.yml, then run the release workflow with publish_npm=true.

Repository Layout

  • src/schema/*: ingestion, operation normalization, and cache
  • src/search/*: search index and ranking
  • src/execute/*: validation and Heroku API execution
  • src/auth/*: OAuth and encrypted token storage
  • tests/*: catalog, search, and execute tests
  • benchmarks/results/*: benchmark artifacts
  • server.json: MCP Registry metadata

Brand and Troubleshooting

This repo includes the official Heroku wordmark and mark under assets. Use them according to the Heroku Brand Guidelines.

Common fixes:

  • MCP Inspector connection error: confirm URL http://127.0.0.1:3000/mcp and server health.
  • AUTH_REQUIRED: seed a token or complete OAuth.
  • Write blocked: confirm ALLOW_WRITES=true and send the dry-run confirmation token.
  • Large response body: narrow query scope or lower output caps.

來源:README.md,提交 79ff865

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分