StuMason/coolify-mcp
TypeScript
Issue Opened
Issue #110 opened: Bug: Cannot update application domain - API uses `domains` but MCP sends `fqdn`
Description
When attempting to update an application's domain using the application tool with action: 'update' and fqdn parameter, the Coolify API rejects the request with:
Validation failed. - fqdn: This field is not allowed.
Root Cause
The Coolify API PATCH endpoint for applications expects the field domains (plural), but the MCP server sends fqdn (singular).
Evidence from Coolify API Documentation
The correct API call should use domains:
curl -s -X PATCH \
-H "Authorization: Bearer ${COOLIFY_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"domains": "https://new-domain.example.com"}' \
"${COOLIFY_URL}/api/v1/applications/app-uuid-123"
This works correctly and updates the domain.
Current MCP Implementation
In src/types/coolify.ts, the UpdateApplicationRequest interface uses fqdn:
export interface UpdateApplicationRequest {
name?: string;
description?: string;
fqdn?: string; // ← Should be `domains`
// ...
}
In src/lib/mcp-server.ts, the tool schema also uses fqdn:
fqdn: z.string().optional(),
Expected Behavior
The MCP tool should accept a domains parameter and send it to the Coolify API, allowing users to update application domains.
Suggested Fix
- Update
UpdateApplicationRequestinsrc/types/coolify.tsto usedomainsinstead offqdn - Update the
applicationtool schema insrc/lib/mcp-server.tsto usedomains - Alternatively, keep
fqdnin the tool schema for backwards compatibility but map it todomainswhen sending to the API
Environment
- MCP Server Version: 2.6.1
- Coolify Version: 4.0.0-beta.462
Workaround
Currently, the only workaround is to call the Coolify API directly with domains instead of using the MCP tool.