create_server
Create a new server in Coolify by specifying name, IP address, and SSH credentials to deploy applications and manage infrastructure.
Instructions
Create a new server
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Server name | |
| description | No | Server description | |
| ip | Yes | Server IP address | |
| port | No | SSH port (default: 22) | |
| user | No | SSH user (default: root) | root |
| private_key_uuid | Yes | UUID of the private key for SSH | |
| is_build_server | No | Use as build server | |
| instant_validate | No | Validate immediately |
Implementation Reference
- src/tools/handlers.ts:73-77 (handler)The switch case handler for the 'create_server' tool. Validates required input parameters (name, ip, private_key_uuid) and sends a POST request to the Coolify API endpoint '/servers' to create a new server.case 'create_server': requireParam(args, 'name'); requireParam(args, 'ip'); requireParam(args, 'private_key_uuid'); return client.post('/servers', args);
- src/tools/definitions.ts:157-174 (registration)MCP tool registration for 'create_server' including name, description, and JSON input schema definition used for tool validation and documentation.{ name: 'create_server', description: 'Create a new server', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Server name' }, description: { type: 'string', description: 'Server description' }, ip: { type: 'string', description: 'Server IP address' }, port: { type: 'number', description: 'SSH port (default: 22)', default: 22 }, user: { type: 'string', description: 'SSH user (default: root)', default: 'root' }, private_key_uuid: { type: 'string', description: 'UUID of the private key for SSH' }, is_build_server: { type: 'boolean', description: 'Use as build server', default: false }, instant_validate: { type: 'boolean', description: 'Validate immediately', default: true } }, required: ['name', 'ip', 'private_key_uuid'] } },
- src/types.ts:111-120 (schema)TypeScript type definition for CreateServerInput interface, providing compile-time validation matching the tool's input schema.export interface CreateServerInput { name: string; description?: string; ip: string; port?: number; user?: string; private_key_uuid: string; is_build_server?: boolean; instant_validate?: boolean; }