deploy
Deploy applications and resources on Coolify PaaS using UUIDs or tags. Supports batch deployments with optional force rebuild and confirmation for dangerous operations.
Instructions
Deploy resources by UUID or tag. Supports deploying multiple resources at once using comma-separated values.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | No | Resource UUID(s) to deploy (comma-separated for multiple) | |
| tag | No | Tag(s) to deploy (comma-separated for multiple) | |
| force | No | Force rebuild without cache | |
| confirm | No | Confirm the dangerous operation (required when COOLIFY_REQUIRE_CONFIRM=true) |
Implementation Reference
- src/tools/handlers.ts:235-245 (handler)Handler implementation for the 'deploy' tool. Constructs query parameters from args (uuid, tag, force) and calls the Coolify /deploy API endpoint.case 'deploy': // Generic deploy endpoint supporting uuid and/or tag parameters const genericDeployParams = new URLSearchParams(); if (args.uuid) genericDeployParams.append('uuid', String(args.uuid)); if (args.tag) genericDeployParams.append('tag', String(args.tag)); if (args.force) genericDeployParams.append('force', 'true'); if (!args.uuid && !args.tag) { throw new McpError(ErrorCode.InvalidParams, 'Either uuid or tag parameter is required'); } const genericDeployQuery = genericDeployParams.toString(); return client.get(`/deploy?${genericDeployQuery}`);
- src/tools/definitions.ts:462-474 (schema)Input schema definition for the 'deploy' tool, including parameters uuid, tag, force, confirm.name: 'deploy', description: 'Deploy resources by UUID or tag. Supports deploying multiple resources at once using comma-separated values.', inputSchema: { type: 'object', properties: { uuid: { type: 'string', description: 'Resource UUID(s) to deploy (comma-separated for multiple)' }, tag: { type: 'string', description: 'Tag(s) to deploy (comma-separated for multiple)' }, force: { type: 'boolean', description: 'Force rebuild without cache', default: false }, confirm: { type: 'boolean', description: 'Confirm the dangerous operation (required when COOLIFY_REQUIRE_CONFIRM=true)' } }, required: [] } },
- src/index.ts:41-67 (registration)MCP server request handler for all tool calls, which dispatches to handleTool based on tool name 'deploy'.this.server.setRequestHandler(CallToolRequestSchema, async (request) => { if (!this.client) { throw new McpError(ErrorCode.InternalError, 'Client not initialized'); } const { name, arguments: args } = request.params; // Block write operations in read-only mode if (isReadOnlyMode() && !READ_ONLY_TOOLS.includes(name)) { throw new McpError( ErrorCode.InvalidRequest, `Operation '${name}' is not allowed in read-only mode. Set COOLIFY_READONLY=false to enable write operations.` ); } try { const result = await handleTool(this.client, name, args || {}); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { if (error instanceof McpError) throw error; const message = error instanceof Error ? error.message : 'Unknown error'; throw new McpError(ErrorCode.InternalError, `Tool execution failed: ${message}`); } });
- src/tools/definitions.ts:45-54 (helper)'deploy' tool is classified as a dangerous operation, requiring confirmation in certain modes.export const DANGEROUS_OPERATIONS = [ 'stop_application', 'restart_application', 'stop_service', 'restart_service', 'stop_database', 'restart_database', 'deploy_application', 'deploy', 'execute_command',
- src/tools/definitions.ts:67-86 (schema)Warning message for the 'deploy' tool indicating potential downtime.export const DANGER_WARNINGS: Record<string, string> = { stop_application: 'This will stop the application and make it unavailable until restarted.', restart_application: 'This will restart the application, causing brief downtime.', stop_service: 'This will stop the service and make it unavailable until restarted.', restart_service: 'This will restart the service, causing brief downtime.', stop_database: 'This will stop the database and make it unavailable until restarted.', restart_database: 'This will restart the database, causing brief downtime.', deploy_application: 'This will deploy a new version of the application, which may cause downtime.', deploy: 'This will deploy resources by UUID or tag, which may cause downtime.', execute_command: 'This will execute a command inside the application container.', delete_server: 'This will permanently delete the server and all its resources.', delete_project: 'This will permanently delete the project and all its resources.', delete_environment: 'This will permanently delete the environment and all its resources.', delete_application: 'This will permanently delete the application and all its data.', delete_service: 'This will permanently delete the service and all its data.', delete_database: 'This will permanently delete the database and all its data.', delete_private_key: 'This will permanently delete the private key. Make sure no servers are using it.', delete_github_app: 'This will permanently delete the GitHub App configuration. Applications using it will lose access.', cancel_deployment: 'This will cancel the deployment in progress.' };