Skip to main content
Glama
heroku

Heroku MCP server

Official
by heroku

maintenance_on

Activate maintenance mode for Heroku apps to redirect traffic, schedule updates, and manage service interruptions. Ensures smooth transitions during deployments or planned maintenance windows.

Instructions

Enable maintenance mode for Heroku applications. Use this tool when you need to: 1) Redirect traffic to a maintenance page, 2) Prepare for system updates or deployments, 3) Schedule planned maintenance windows, 4) Gracefully handle service interruptions. The tool manages traffic routing and process states while preserving running operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appYesThe name of the Heroku app to modify maintenance mode for. This must be an existing app that you have access to.

Implementation Reference

  • The handler function for the 'maintenance_on' tool. It builds a Heroku CLI command using CommandBuilder with the MAINTENANCE_ON command and the app flag, executes it via herokuRepl, and processes the output with handleCliOutput.
    async (options: MaintenanceModeOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.MAINTENANCE_ON) .addFlags({ app: options.app }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); }
  • Zod schema for input validation of the maintenance_on tool, requiring an 'app' string parameter.
    export const maintenanceModeOptionsSchema = z.object({ app: z.string().describe('Target Heroku app name') });
  • The registration function for the maintenance_on tool, which calls server.tool to register the handler, schema, and description.
    export const registerMaintenanceOnTool = (server: McpServer, herokuRepl: HerokuREPL): void => { server.tool( 'maintenance_on', 'Enable maintenance mode and redirect traffic for a Heroku app', maintenanceModeOptionsSchema.shape, async (options: MaintenanceModeOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.MAINTENANCE_ON) .addFlags({ app: options.app }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); } ); };
  • src/index.ts:56-56 (registration)
    Invocation of the registerMaintenanceOnTool during MCP server initialization.
    maintenance.registerMaintenanceOnTool(server, herokuRepl);
  • TOOL_COMMAND_MAP constant providing the Heroku CLI command string for maintenance_on.
    MAINTENANCE_ON: 'maintenance:on',

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