Heroku Code MCP

io.github.dsouzaAnushPublished by GitHub account dsouzaAnushv0.1.0Updated Oct 24, 2026

Search and execute Heroku Platform API operations

VerifiedSTDIODesktop onlyCloud & InfrastructureDeveloper Tools

Overview

AI-generated overview

Compact MCP server that lets an assistant search and execute Heroku Platform API operations through three tools: auth_status, search and execute.

What you can do
  • Check whether the caller is authenticated with Heroku before doing API work
  • Search and rank Heroku operations from schema and documentation context using natural-language intent
  • Execute a chosen operation with path parameters, query parameters and a request body
  • Dry-run write operations and replay them with a confirmation token when writes are enabled
When to use it
Useful when an assistant should manage Heroku apps and platform resources through live API calls while keeping the tool list small and token-efficient. It suits users who already work with the Heroku CLI and want agent-driven reads, with optional guarded writes.
Requirements
Runs locally as a Node.js process built from the repository (npm install, build, start) and serves a local HTTP MCP endpoint, or can be started via npx from GitHub. Needs a Heroku account token, seeded from the Heroku CLI or via OAuth, plus TOKEN_STORE_PATH and TOKEN_ENCRYPTION_KEY_BASE64; clients connect with an x-user-id header. Writes additionally need ALLOW_WRITES and WRITE_CONFIRMATION_SECRET.
Before you install
It holds a Heroku account token in an encrypted local token store, so protect TOKEN_STORE_PATH and TOKEN_ENCRYPTION_KEY_BASE64. Mutations are blocked by default but can be enabled with ALLOW_WRITES, after which the assistant can create, change or delete Heroku resources; review dry runs before confirming. Sensitive headers and body fields are redacted, but API data goes to Heroku.

Installation

In SourceWeft

  1. Open Heroku Code MCP in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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.

Source: README.md at commit 79ff865

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts