deploy_to_heroku
Deploy applications to Heroku by automating git push workflows. Use to create or update apps, configure team or private space deployments, and set environment-specific settings. Requires valid app.json for dynamic configurations.
Instructions
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.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
appJson | No | Stringified app.json configuration for deployment. Used for dynamic configurations or converted projects. The app.json string must be valid and conform to the following schema: {"default":{"$schema":"http://json-schema.org/draft-07/schema#","title":"Heroku app.json Schema","description":"app.json is a manifest format for describing web apps. It declares environment variables, add-ons, and other information required to run an app on Heroku. Used for dynamic configurations or converted projects","type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z-_\\.]+","maxLength":300},"description":{"type":"string"},"keywords":{"type":"array","items":{"type":"string"}},"website":{"$ref":"#/definitions/uriString"},"repository":{"$ref":"#/definitions/uriString"},"logo":{"$ref":"#/definitions/uriString"},"success_url":{"type":"string"},"scripts":{"$ref":"#/definitions/scripts"},"env":{"$ref":"#/definitions/env"},"formation":{"$ref":"#/definitions/formation"},"addons":{"$ref":"#/definitions/addons"},"buildpacks":{"$ref":"#/definitions/buildpacks"},"environments":{"$ref":"#/definitions/environments"},"stack":{"$ref":"#/definitions/stack"},"image":{"type":"string"}},"additionalProperties":false,"definitions":{"uriString":{"type":"string","format":"uri"},"scripts":{"type":"object","properties":{"postdeploy":{"type":"string"},"pr-predestroy":{"type":"string"}},"additionalProperties":false},"env":{"type":"object","patternProperties":{"^[A-Z][A-Z0-9_]*$":{"type":"object","properties":{"description":{"type":"string"},"value":{"type":"string"},"required":{"type":"boolean"},"generator":{"type":"string","enum":["secret"]}},"additionalProperties":false}}},"dynoSize":{"type":"string","enum":["free","eco","hobby","basic","standard-1x","standard-2x","performance-m","performance-l","private-s","private-m","private-l","shield-s","shield-m","shield-l"]},"formation":{"type":"object","patternProperties":{"^[a-zA-Z0-9_-]+$":{"type":"object","properties":{"quantity":{"type":"integer","minimum":0},"size":{"$ref":"#/definitions/dynoSize"}},"required":["quantity"],"additionalProperties":false}}},"addons":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"plan":{"type":"string"},"as":{"type":"string"},"options":{"type":"object"}},"required":["plan"],"additionalProperties":false}]}},"buildpacks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}},"environmentConfig":{"type":"object","properties":{"env":{"type":"object"},"formation":{"type":"object"},"addons":{"type":"array"},"buildpacks":{"type":"array"}}},"environments":{"type":"object","properties":{"test":{"allOf":[{"$ref":"#/definitions/environmentConfig"},{"type":"object","properties":{"scripts":{"type":"object","properties":{"test":{"type":"string"}},"additionalProperties":false}}}]},"review":{"$ref":"#/definitions/environmentConfig"},"production":{"$ref":"#/definitions/environmentConfig"}},"additionalProperties":false},"stack":{"type":"string","enum":["heroku-18","heroku-20","heroku-22","heroku-24"]}}}} | |
env | No | Key-value pairs of environment variables for the deployment that override the ones in app.json | |
internalRouting | No | Enables internal routing within private spaces. Use this flag when you need to configure private spaces for internal routing. | |
name | Yes | Heroku application name for deployment target. If omitted, a new app will be created with a random name. If supplied and the app does not exist, the tool will create a new app with the given name. | |
rootUri | Yes | The absolute path of the user's workspace unless otherwise specified by the user. Must be a string that can be resolved to a valid directory using node's path module. | |
spaceId | No | Heroku private space identifier for space-scoped deployments. Use spaces_list tool to get a list of spaces if needed. | |
tarballUri | No | The URL of the tarball to deploy. If not provided, the rootUri must be provided and the tool will create a new tarball from the contents of the rootUri. | |
teamId | No | Heroku team identifier for team-scoped deployments. Use teams_list tool to get a list of teams if needed. |
Input Schema (JSON Schema)
You must be authenticated.
Other Tools from Heroku MCP server
- create_addon
- create_app
- deploy_to_heroku
- get_addon_info
- get_app_info
- get_app_logs
- list_addon_plans
- list_addons
- list_addon_services
- list_apps
- list_private_spaces
- list_teams
- maintenance_off
- maintenance_on
- pg_backups
- pg_credentials
- pg_info
- pg_kill
- pg_locks
- pg_maintenance
- pg_outliers
- pg_ps
- pg_psql
- pg_upgrade
- pipelines_create
- pipelines_info
- pipelines_list
- pipelines_promote
- ps_list
- ps_restart
- ps_scale
- rename_app
- transfer_app
Related Tools
- @heroku/heroku-mcp-server
- @heroku/heroku-mcp-server
- @heroku/heroku-mcp-server
- @heroku/heroku-mcp-server
- @heroku/heroku-mcp-server