StuMason/coolify-mcp
If you are the rightful owner of coolify-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A Model Context Protocol (MCP) server implementation for Coolify, enabling AI assistants to interact with your Coolify instances through natural language.
Coolify MCP Server
The most comprehensive MCP server for Coolify - 34 optimized tools, smart diagnostics, and batch operations for managing your self-hosted PaaS through AI assistants.
A Model Context Protocol (MCP) server for Coolify, enabling AI assistants to manage and debug your Coolify instances through natural language.
Features
This MCP server provides 34 token-optimized tools for debugging, management, and deployment:
| Category | Tools |
|---|---|
| Infrastructure | get_infrastructure_overview, get_mcp_version, get_version |
| Diagnostics | diagnose_app, diagnose_server, find_issues |
| Batch Operations | restart_project_apps, bulk_env_update, stop_all_apps, redeploy_project |
| Servers | list_servers, get_server, validate_server, server_resources, server_domains |
| Projects | projects (list, get, create, update, delete via action param) |
| Environments | environments (list, get, create, delete via action param) |
| Applications | list_applications, get_application, application (CRUD), application_logs |
| Databases | list_databases, get_database, database (create 8 types, delete), database_backups |
| Services | list_services, get_service, service (create, update, delete) |
| Control | control (start/stop/restart for apps, databases, services) |
| Env Vars | env_vars (CRUD for application and service env vars) |
| Deployments | list_deployments, deploy, deployment (get, cancel, list_for_app) |
| Private Keys | private_keys (list, get, create, update, delete via action param) |
v2.0.0 Token Diet
v2.0.0 reduced token usage by 85% (from ~43,000 to ~6,600 tokens) by consolidating related operations into single tools with action parameters. This prevents context window exhaustion in AI assistants.
Installation
Prerequisites
- Node.js >= 18
- A running Coolify instance
- Coolify API access token (generate in Coolify Settings > API)
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"coolify": {
"command": "npx",
"args": ["-y", "@masonator/coolify-mcp"],
"env": {
"COOLIFY_ACCESS_TOKEN": "your-api-token",
"COOLIFY_BASE_URL": "https://your-coolify-instance.com"
}
}
}
}
Claude Code
claude mcp add coolify \
-e COOLIFY_BASE_URL="https://your-coolify-instance.com" \
-e COOLIFY_ACCESS_TOKEN="your-api-token" \
-- npx @masonator/coolify-mcp@latest
Note: Use
@latesttag (not-yflag) for reliable startup in Claude Code CLI.
Cursor
env COOLIFY_ACCESS_TOKEN=your-api-token COOLIFY_BASE_URL=https://your-coolify-instance.com npx -y @masonator/coolify-mcp
Context-Optimized Responses
Why This Matters
The Coolify API returns extremely verbose responses - a single application can contain 91 fields including embedded 3KB server objects and 47KB docker-compose files. When listing 20+ applications, responses can exceed 200KB, which quickly exhausts the context window of AI assistants like Claude Desktop.
This MCP server solves this by returning optimized summaries by default.
How It Works
| Tool Type | Returns | Use Case |
|---|---|---|
list_* | Summaries only (uuid, name, status, etc) | Discovery, finding resources |
get_* | Full details for a single resource | Deep inspection, debugging |
get_infrastructure_overview | All resources summarized in one call | Start here to understand your setup |
Response Size Comparison
| Endpoint | Full Response | Summary Response | Reduction |
|---|---|---|---|
| list_applications | ~170KB | ~4.4KB | 97% |
| list_services | ~367KB | ~1.2KB | 99% |
| list_servers | ~4KB | ~0.4KB | 90% |
| list_application_envs | ~3KB/var | ~0.1KB/var | 97% |
Recommended Workflow
- Start with overview:
get_infrastructure_overview- see everything at once - Find your target:
list_applications- get UUIDs of what you need - Dive deep:
get_application(uuid)- full details for one resource - Take action:
restart_application(uuid),get_application_logs(uuid), etc.
Pagination
All list endpoints still support optional pagination for very large deployments:
# Get page 2 with 10 items per page
list_applications(page=2, per_page=10)
Example Prompts
Getting Started
Give me an overview of my infrastructure
Show me all my applications
What's running on my servers?
Debugging & Monitoring
Diagnose my stuartmason.co.uk app
What's wrong with my-api application?
Check the status of server 192.168.1.100
Find any issues in my infrastructure
Get the logs for application {uuid}
What environment variables are set for application {uuid}?
Show me recent deployments for application {uuid}
What resources are running on server {uuid}?
Application Management
Restart application {uuid}
Stop the database {uuid}
Start service {uuid}
Deploy application {uuid} with force rebuild
Update the DATABASE_URL env var for application {uuid}
Project Setup
Create a new project called "my-app"
Create a staging environment in project {uuid}
Deploy my app from private GitHub repo org/repo on branch main
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
COOLIFY_ACCESS_TOKEN | Yes | - | Your Coolify API token |
COOLIFY_BASE_URL | No | http://localhost:3000 | Your Coolify instance URL |
Development
# Clone and install
git clone https://github.com/stumason/coolify-mcp.git
cd coolify-mcp
npm install
# Build
npm run build
# Test
npm test
# Run locally
COOLIFY_BASE_URL="https://your-coolify.com" \
COOLIFY_ACCESS_TOKEN="your-token" \
node dist/index.js
Available Tools
Infrastructure
get_version- Get Coolify API versionget_mcp_version- Get coolify-mcp server version (useful to verify which version is installed)get_infrastructure_overview- Get a high-level overview of all infrastructure (servers, projects, applications, databases, services)
Diagnostics (Smart Lookup)
These tools accept human-friendly identifiers instead of just UUIDs:
diagnose_app- Get comprehensive app diagnostics (status, logs, env vars, deployments). Accepts UUID, name, or domain (e.g., "stuartmason.co.uk" or "my-app")diagnose_server- Get server diagnostics (status, resources, domains, validation). Accepts UUID, name, or IP address (e.g., "coolify-apps" or "192.168.1.100")find_issues- Scan entire infrastructure for unhealthy apps, databases, services, and unreachable servers
Servers
list_servers- List all servers (returns summary)get_server- Get server detailsget_server_resources- Get resources running on a serverget_server_domains- Get domains configured on a servervalidate_server- Validate server connection
Projects
list_projects- List all projects (returns summary)get_project- Get project detailscreate_project- Create a new projectupdate_project- Update a projectdelete_project- Delete a project
Environments
list_environments- List environments in a projectget_environment- Get environment detailscreate_environment- Create environment in a projectdelete_environment- Delete an environment
Applications
list_applications- List all applications (returns summary)get_application- Get application detailscreate_application_private_gh- Create app from private GitHub repo (GitHub App)create_application_private_key- Create app from private repo using deploy keyupdate_application- Update an applicationdelete_application- Delete an applicationstart_application- Start an applicationstop_application- Stop an applicationrestart_application- Restart an applicationget_application_logs- Get application logslist_application_envs- List application environment variablescreate_application_env- Create application environment variableupdate_application_env- Update application environment variabledelete_application_env- Delete application environment variable
Databases
list_databases- List all databases (returns summary)get_database- Get database detailsstart_database- Start a databasestop_database- Stop a databaserestart_database- Restart a databasedelete_database- Delete a database (with optional volume cleanup)list_database_backups- List scheduled backups for a databaseget_database_backup- Get details of a scheduled backuplist_backup_executions- List execution history for a scheduled backupget_backup_execution- Get details of a specific backup execution
Services
list_services- List all services (returns summary)get_service- Get service detailscreate_service- Create a one-click service (e.g., pocketbase, mysql, redis, wordpress)update_service- Update a servicedelete_service- Delete a servicestart_service- Start a servicestop_service- Stop a servicerestart_service- Restart a servicelist_service_envs- List service environment variablescreate_service_env- Create service environment variabledelete_service_env- Delete service environment variable
Deployments
list_deployments- List running deployments (returns summary)get_deployment- Get deployment detailsdeploy- Deploy by tag or UUIDcancel_deployment- Cancel a running deploymentlist_application_deployments- List deployments for an application
Private Keys
list_private_keys- List all private keys (SSH keys for deployments)get_private_key- Get private key detailscreate_private_key- Create a new private key for deploymentsupdate_private_key- Update a private keydelete_private_key- Delete a private key
Batch Operations
Power user tools for operating on multiple resources at once:
restart_project_apps- Restart all applications in a projectbulk_env_update- Update or create an environment variable across multiple applications (upsert behavior)stop_all_apps- Emergency stop all running applications (requires confirmation)redeploy_project- Redeploy all applications in a project with force rebuild
Why Coolify MCP?
- Context-Optimized: Responses are 90-99% smaller than raw API, preventing context window exhaustion
- Smart Lookup: Find apps by domain (
stuartmason.co.uk), servers by IP, not just UUIDs - Batch Operations: Restart entire projects, bulk update env vars, emergency stop all apps
- Workflow Prompts: Pre-built guided workflows for common tasks
- Production Ready: 98%+ test coverage, TypeScript strict mode, comprehensive error handling
- Always Current: Weekly OpenAPI drift detection ensures we stay in sync with Coolify
Related Links
- Coolify - The open-source & self-hostable Heroku/Netlify/Vercel alternative
- Model Context Protocol - The protocol powering AI tool integrations
- MCP Server Registry - Official MCP server directory
Contributing
Contributions welcome! Please see for guidelines.
License
MIT - see for details.
Support
If you find this useful, please ⭐ star the repo!
