deploy
Deploy applications or services using tags or UUIDs to release updates or new versions. Supports force rebuild for clean deployment. Simplify version management with Coolify MCP Server.
Instructions
Deploy an application or service using a tag or UUID. This allows you to deploy new versions or updates to your applications.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Force rebuild (without cache) | |
| tag | No | Tag name(s). Comma separated list is accepted | |
| uuid | No | Resource UUID(s). Comma separated list is accepted |
Implementation Reference
- src/index.ts:254-268 (handler)The handler for the 'deploy' tool. Parses arguments using DeploySchema, builds query params for tag/uuid/force, calls Coolify API /deploy endpoint, and returns JSON result as text content.case "deploy": { const params = DeploySchema.parse(request.params.arguments); const queryParams = new URLSearchParams(); if (params.tag) queryParams.append('tag', params.tag); if (params.uuid) queryParams.append('uuid', params.uuid); if (params.force) queryParams.append('force', 'true'); const result = await coolifyApiCall(`/deploy?${queryParams.toString()}`); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; }
- src/index.ts:54-58 (schema)Zod schema defining input for 'deploy' tool: optional tag (string), uuid (string), force (boolean). Used for validation in handler and JSON schema in registration.const DeploySchema = z.object({ tag: z.string().optional().describe("Tag name(s). Comma separated list is accepted"), uuid: z.string().optional().describe("Resource UUID(s). Comma separated list is accepted"), force: z.boolean().optional().describe("Force rebuild (without cache)"), });
- src/index.ts:128-132 (registration)Tool registration in ListTools response: defines 'deploy' tool with name, description, and inputSchema derived from DeploySchema.{ name: "deploy", description: "Deploy an application or service using a tag or UUID. This allows you to deploy new versions or updates to your applications.", inputSchema: zodToJsonSchema(DeploySchema), },
- src/index.ts:24-47 (helper)Helper function used by 'deploy' handler (and others) to make authenticated API calls to Coolify server.async function coolifyApiCall(endpoint: string, method: string = 'GET', body?: any): Promise<any> { const baseUrl = process.env.COOLIFY_BASE_URL?.replace(/\/$/, '') || 'https://coolify.stuartmason.co.uk'; const url = `${baseUrl}/api/v1${endpoint}`; const response = await fetch(url, { method, headers: { 'Authorization': `Bearer ${process.env.COOLIFY_ACCESS_TOKEN}`, 'Content-Type': 'application/json', }, body: body ? JSON.stringify(body) : undefined, }); if (!response.ok) { const errorBody = await response.json().catch(() => ({})); throw new Error(JSON.stringify({ error: `Coolify API error: ${response.status} ${response.statusText}`, status: response.status, details: errorBody })); } return await response.json(); }