Heroku Code MCP
Provides access to the Heroku Platform API, allowing users to search for operations and execute them to manage applications, including listing apps and modifying configurations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Heroku Code MCPlist my apps and check their current dyno status"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
git clone https://github.com/dsouzaAnush/heroku-code-mcp.git
cd heroku-code-mcp
npm install
npm run build
npm testSeed auth from the Heroku CLI:
heroku auth:whoami
npm run seed:tokenStart the server:
TOKEN_STORE_PATH=./data/tokens.integration.json \
TOKEN_ENCRYPTION_KEY_BASE64="<seed-output-key>" \
PORT=3000 HOST=127.0.0.1 npm run devSmoke test:
curl -sS http://127.0.0.1:3000/healthz
MCP_URL=http://127.0.0.1:3000/mcp USER_ID=default npm run smoke:mcpBefore npm publication, the package can also run from GitHub:
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-mcpInstall in Agent Clients
Claude Code
Install the companion plugin for skills plus MCP wiring:
claude plugin marketplace add dsouzaAnush/heroku-plugin
claude plugin install heroku@heroku-plugin
claude plugin enable heroku@heroku-pluginOr add the running MCP server directly:
claude mcp add \
--transport http \
--scope local \
heroku-code-mcp \
http://127.0.0.1:3000/mcp \
--header "x-user-id: default"Claude Desktop
Use the HTTP endpoint directly when supported:
{
"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:
{
"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:
npm run build:mcpbCodex
Codex uses Heroku Plugin for skills and optional MCP wiring:
codex plugin marketplace add dsouzaAnush/heroku-plugin --ref mainEnable heroku-plugin@heroku-plugin in the Codex Plugins tab, or add:
[plugins."heroku-plugin@heroku-plugin"]
enabled = trueRun this MCP server on http://127.0.0.1:3333/mcp when you want live Heroku API tools through the plugin.
Cursor
git clone https://github.com/dsouzaAnush/heroku-plugin.git
cursor agent --plugin-dir heroku-pluginAdd the MCP server to ~/.cursor/mcp.json or project-local .cursor/mcp.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:
{
"mcpServers": {
"heroku-code-mcp": {
"transport": "streamable_http",
"url": "http://127.0.0.1:3000/mcp",
"headers": {
"x-user-id": "default"
}
}
}
}Or bridge to stdio:
{
"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
Tool | What it does | Why it exists |
| Reports whether the caller is authenticated with Heroku | Lets agents branch cleanly before API work |
| Ranks Heroku operations from schema and docs context | Avoids exposing dozens of endpoint-shaped tools up front |
| Validates params/body and calls the selected Heroku operation | Gives one deterministic execution path |
Typical flow:
Call
auth_status.Call
searchwith natural language intent.Choose one
operation_id.Call
executewithpath_params,query_params, andbody.For writes, run
dry_run=true, then replay withconfirm_write_tokenandALLOW_WRITES=true.
Examples:
{
"query": "list apps",
"limit": 5
}{
"operation_id": "GET /apps"
}{
"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_WRITESREQUEST_TIMEOUT_MSMAX_RETRIESCATALOG_CACHE_PATHREAD_CACHE_TTL_MSEXECUTE_MAX_BODY_BYTESEXECUTE_BODY_PREVIEW_CHARS
Full example: .env.example
Benchmarks
Benchmarks were captured on February 22, 2026 on the same machine and account for both implementations.
Metric |
| official Heroku MCP | Delta |
Tool count | 3 | 37 | 91.9% lower |
Tool-list payload bytes | 1,469 | 25,500 | 94.2% lower |
Tool-list approx tokens | 368 | 6,375 | 94.2% lower |
Connect avg | 14.8 ms | 10,168.7 ms | 687x faster |
| 4.3 ms | 10.3 ms | 2.4x faster |
Read op avg | 528.0 ms ( | 9,697.4 ms ( | 18.4x faster |
Charts:
Full methodology and artifacts live in BENCHMARKS.md and benchmarks/results/.
Development and Release
Validate locally:
npm run build
npm test
npm run validate:server
npm run publish:dry-runThis repo uses free GitHub Actions:
validate.ymlruns build, tests,server.jsonvalidation, and npm pack dry-run on PRs and pushes tomain.release.ymlruns onv*tags, builds the.mcpb, updates releaseserver.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:
npm publish --access public
mcp-publisher login github
mcp-publisher publish server.jsonFor 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 cachesrc/search/*: search index and rankingsrc/execute/*: validation and Heroku API executionsrc/auth/*: OAuth and encrypted token storagetests/*: catalog, search, and execute testsbenchmarks/results/*: benchmark artifactsserver.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/mcpand server health.AUTH_REQUIRED: seed a token or complete OAuth.Write blocked: confirm
ALLOW_WRITES=trueand send the dry-run confirmation token.Large response body: narrow query scope or lower output caps.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dsouzaAnush/heroku-code-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server