StuMason/coolify-mcp
TypeScript
Pull Request Merged
PR #85 merged: chore: release v2.5.0 - type safety improvements
Summary
Eliminates all 5 as any type casts in MCP tool handlers, replacing them with explicit typed object construction. This prevents bugs like #76 where MCP-internal fields leaked to the API.
Version bump: 2.4.0 → 2.5.0 (will release on merge)
Changes
| Handler | Before | After |
|---|---|---|
application create_public | apiData as any | Explicit typed object |
application create_github | apiData as any | Explicit typed object |
application create_key | apiData as any | Explicit typed object |
application create_dockerimage | apiData as any | Explicit typed object |
service create | apiData as any | Explicit typed object |
Type Fixes
Fixed CreateApplicationPrivateGHRequest and CreateApplicationPrivateKeyRequest:
build_packandports_exposesare now optional (verified against Coolify API)- Used
Omit<>to properly exclude required fields from base type
Live API Testing
Tested against real Coolify v4.0.0-beta.460 instance:
| build_pack | Result |
|---|---|
nixpacks | ✅ Works |
dockerfile | ✅ Works |
static | ✅ Works |
dockercompose | ✅ Works |
invalid_buildpack | ❌ Clear error from Coolify API |
Decision: Keep build_pack as z.string() (not enum) - let Coolify API validate. This ensures future build packs work without MCP updates.
Test Plan
-
npm test- 199 tests pass -
npm run build- TypeScript compiles - Live API testing against Coolify v4.0.0-beta.460
- Version bumped to 2.5.0
Closes #81
Stu Mason + AI [email protected]
+100
additions
-21
deletions
6
files changed