Skip to main content
Glama
heroku

Heroku MCP server

Official
by heroku

create_app

Create a new Heroku application with customizable settings, including name, region, private space, or team association. Automatically generate app names if not specified and receive detailed app information upon creation.

Instructions

Create a new Heroku application with customizable settings. Use this tool when a user wants to: 1) Create a new app with a specific name, 2) Create an app in a particular region (US/EU), 3) Create an app within a team, or 4) Create an app in a private space. The tool handles name generation if not specified and returns the new app's details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNoSpecifies the desired name for the new Heroku app. If omitted, Heroku will auto-generate a random name. Best practice: Provide a meaningful, unique name that reflects your application's purpose.
regionNoDetermines the geographical region where your app will run. Options: "us" (United States) or "eu" (Europe). Defaults to "us" if not specified. Note: Cannot be used with space parameter.
spaceNoPlaces the app in a specific private space, which provides enhanced security and networking features. Specify the private space name. Note: When used, the app inherits the region from the private space and the region parameter cannot be used.
teamNoAssociates the app with a specific team for collaborative development and management. Provide the team name to set ownership. The app will be created under the team's account rather than your personal account.

Implementation Reference

  • The core handler function that constructs a CommandBuilder for the 'apps:create' CLI command using provided options and executes it via the HerokuREPL, returning the processed output.
    async (options: CreateAppOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.CREATE_APP) .addPositionalArguments({ app: options.app }) .addFlags({ region: options.region, space: options.space, team: options.team }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); }
  • Zod schema defining the input parameters for the create_app tool, including optional app name, region, space, and team.
    export const createAppOptionsSchema = z.object({ app: z.string().optional().describe('App name. Auto-generated if omitted'), region: z.enum(['us', 'eu']).optional().describe('Region: us/eu. Default: us. Excludes space param'), space: z.string().optional().describe('Private space name. Inherits region. Excludes region param'), team: z.string().optional().describe('Team name for ownership') });
  • Module-level registration function that registers the 'create_app' tool on the MCP server with schema and handler.
    export const registerCreateAppTool = (server: McpServer, herokuRepl: HerokuREPL): void => { server.tool( 'create_app', 'Create app: custom name, region (US/EU), team, private space', createAppOptionsSchema.shape, async (options: CreateAppOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.CREATE_APP) .addPositionalArguments({ app: options.app }) .addFlags({ region: options.region, space: options.space, team: options.team }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); } ); };
  • src/index.ts:52-52 (registration)
    Top-level application registration call for the create_app tool.
    apps.registerCreateAppTool(server, herokuRepl);
  • Helper constant mapping the CREATE_APP tool to the Heroku CLI command 'apps:create'.
    CREATE_APP: 'apps:create',

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/heroku/heroku-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server