heroku-review-app-mcp
Uses GitHub to support safe review-app workflows: validating task definitions and scripts against the repository default branch, checking PR eligibility, and providing repository tarballs for creating Heroku review apps.
Provides scoped tools for managing Heroku Review Apps in a single pipeline: listing and inspecting review apps, fetching logs, running reviewed or modified tasks and commands on one-off dynos, and creating or destroying review apps.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
heroku-review-app-mcp
An MCP server for working with Heroku Review Apps from a coding agent, hard-scoped to the review apps of one pipeline.
The official Heroku MCP server can reach every app your account can, including production. This one cannot: every tool that acts on an app first checks that the app's id is in the configured pipeline's review-app list, and refuses otherwise. That makes it reasonable to let an agent call it without a confirmation prompt for each step.
What it does
Tool | Purpose |
| Review apps of the pipeline with PR, branch, status, URL |
| Status of one review app (poll after creating) |
| Recent log lines |
| Run a task you defined in the config on a one-off dyno |
| Run a task whose definition or script differs from the default branch |
| Run an arbitrary command on a one-off dyno (off by default) |
| Create a review app for a PR or a default-branch commit |
| Delete a review app (its |
Apps are addressed by pr (number) or app (name).
Related MCP server: MCP Heroku Server
The scope guarantee
The pipeline is fixed in the config file when the server starts. No tool argument can change it.
An app is accepted only if its id is in
GET /pipelines/{id}/review-appsat the time of the call. Pipeline couplings (which include staging and production) and app-name patterns are never used.Any failure to establish membership rejects: a lookup error, a truncated list, a malformed record, an app still being created or deleted.
After the check, the server uses the id returned by the API, not the text the caller passed.
Commands run through the Platform API by app id, and task parameters travel as environment variables in a JSON body. Nothing the caller supplies passes through a local shell.
"Review app only" is not the same as "isolated". A review app's dynos hold whatever config vars your pipeline gives review apps, and those are often real credentials for shared services. That is why run_command is opt-in, and why you may still want your client to ask before run_command, run_modified_task, create_review_app and destroy_review_app.
Setup
Requires Node.js 20 or later.
Credentials:
Heroku:
HEROKU_API_KEY, or a logged-in Heroku CLI (heroku auth:tokenis used).GitHub (when
repois set: forcreate_review_appand for checking tasks against the default branch):GITHUB_TOKEN/GH_TOKEN, or a logged-in GitHub CLI.
Register it with your MCP client, pointing at a config file in your project:
{
"mcpServers": {
"heroku-review-app": {
"command": "npx",
"args": ["-y", "github:oakbow/heroku-review-app-mcp#v0.2.0", "--config", ".heroku-review-app-mcp.json", "--pipeline", "my-pipeline", "--repo", "my-org/my-app"]
}
}
}--pipeline and --repo are optional but recommended. They pin those two values in the launch command, which is what your client asks you to approve: if the config file says anything else, the server does not start.
The config path can also come from HEROKU_REVIEW_APP_MCP_CONFIG; the default is .heroku-review-app-mcp.json in the working directory.
Config
{
"pipeline": "my-pipeline",
"repo": "my-org/my-app",
"allowRunCommand": false,
"tasks": {
"seed_demo_data": {
"description": "Load the demo data set.",
"command": "bin/rails demo:seed",
"timeoutSeconds": 900
},
"promote_user": {
"description": "Give a seeded user a role.",
"command": "bin/rails runner 'eval(ENV.fetch(\"TASK_SCRIPT\"))'",
"scriptFile": "review-app-tasks/promote_user.rb",
"params": {
"email": { "description": "user email", "pattern": "^[a-z0-9._+-]+@[a-z0-9.-]+$" },
"role": { "pattern": "^(admin|editor|viewer)$" }
},
"resultPrefix": "RESULT="
}
}
}The same config with its script file is in examples/rails.
Key | Meaning |
| Pipeline name or id. Required. |
|
|
| Offer |
| Named commands for |
Task fields:
Field | Meaning |
| Shown to the agent. Required. |
| Fixed command line run on the dyno. Parameters are never inserted into it. Required. |
| Declared parameters. Each arrives on the dyno as |
| A file in your project (relative to the config file, and not outside its directory) whose content arrives as |
| If set, a successful run returns only the output lines that start with this prefix, with the prefix removed. A failed run returns all output. |
| Default 600. The dyno is stopped when it elapses. |
Tasks are how you add project-specific steps, such as preparing test data or opening a session for a test user, without teaching the server anything about your app.
Reviewed and modified tasks
The config file and the script files sit in the working tree, where the agent can edit them. If run_task ran whatever is there, allowing it without a prompt would allow arbitrary code on the dyno.
run_task therefore runs a task only if its definition and its script file are identical to the copies on the repository's default branch, read from GitHub at the time of the call. Anything else — an edited script, a changed command or parameter pattern, a task that exists only on a feature branch — is refused, and run_modified_task runs it from the working tree instead. Allow run_task and keep run_modified_task on ask: reviewed tasks run unattended, and the operator sees every run of an unreviewed one.
If GitHub cannot be queried, or the config has no repo, run_task refuses; it never falls back to the working tree. The config file must be inside the git checkout of repo. The comparison is byte for byte, so a checkout that rewrites line endings will not match.
pipeline and repo come from the same editable config. Unless the launch command pins them with --pipeline and --repo (see Setup), someone who can edit the config and restart the server can point repo at another repository whose default branch holds matching files, or pipeline at another pipeline's review apps.
Creating review apps
create_review_app takes either pr, or sha plus branch.
A review app receives the pipeline's config vars and runs your postdeploy script, so the server deploys only code that is already in the connected repository:
a PR must be open and must not come from a fork; it is deployed at its head commit;
a bare
shamust be on the repository's default branch.
If GitHub cannot be queried, nothing is created. The call returns as soon as the review app is requested; poll get_review_app until the status is created.
The source comes from GitHub's repository tarball endpoint, which answers with a short-lived signed URL; that URL is handed to Heroku's POST /review-apps. The GitHub token is sent to api.github.com only.
Development
npm install
npm test
npm run buildLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Deploy apps from GitHub, read build/runtime logs, and manage your app's users from your AI agent.
App hosting your agent runs: git, deploys, staging/production, Postgres. Owner approves risky steps.
Security reviews for coding agents: diffs checked against your org policy and live infrastructure.
Register, deploy, review, and govern internal applications built with coding agents.
Related MCP Servers
AlicenseAqualityBmaintenanceLet's your agent access the heroku platform338,199 npm82Apache 2.0- AlicenseAqualityDmaintenanceProvides 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.8MIT
- AlicenseBqualityCmaintenanceEnables AI agents to deploy and roll back applications, read build and runtime logs, diagnose broken apps, and run commands inside containers. It also manages environment variables, PostgreSQL databases, domains, cron jobs, marketplace services, and backups on a PaaS platform, with safety annotations so clients can confirm destructive actions.58MIT
- AlicenseNot gradedqualityBmaintenanceEnables an AI agent to inspect and manage hosted applications, including projects, environments, previews, logs, domains, health, and backups, with explicit confirmation required for deploys, deletions, and production changes.MIT