Coolify MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Coolify MCP Server list my applications"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Coolify MCP Server
A Model Context Protocol (MCP) server that integrates with Coolify to let AI assistants manage your Coolify instance via a clean toolkit that wraps the official REST API.
Table of Contents
Related MCP server: coolify-mcp
Features
Core Capabilities
Coverage of key Coolify API endpoints (applications, services, deployments, teams, private keys, domains, health/version)
Team Management – List teams, get team details, and view members
Server & Domain Insights – Query domains configured per server
Application Lifecycle – Start/stop/restart and create applications
Service Management – List/create/start/stop/restart services
Deployments – List running deployments; fetch deployment by UUID
Private Keys – List and create SSH private keys for server auth
Env Vars – CRUD for application/service environment variables
Note: Some aggregated operations (e.g., "resources by server") are implemented by client-side filtering over the supported endpoints rather than a dedicated API path.
Prerequisites
Node.js v18 or newer
npm or yarn
A running Coolify instance (self‑hosted or cloud)
A Coolify API token with appropriate permissions
Installation
1) Clone & install
git clone https://github.com/forsonny/Coolify-MCP-Server-for-Claude-Code.git
cd Coolify-MCP-Server-for-Claude-Code
npm install2) Build
npm run build(Compiles TypeScript into dist/)
Configuration
Environment Setup
Create a .env file at the project root:
# Required
COOLIFY_BASE_URL=https://your-coolify-instance.com
COOLIFY_API_TOKEN=your-api-token-here
# Optional
COOLIFY_TIMEOUT=30000Notes
Use a full base URL (no trailing slash). Example:
https://coolify.example.comDo not use inline comments in
.envvalues.Never commit
.envto version control.
Claude Code Setup
You can connect the server to Claude Code using the automated setup script or manually.
Option A — Automated Setup (Recommended)
The easiest way is to use the setup script:
# Run the setup script
npm run setupThis will:
Validate your
.envfile configurationBuild the TypeScript project if needed
Generate the correct
claude mcp add-jsoncommand with environment variablesProvide troubleshooting tips
Option B — Manual Setup
If you prefer to set it up manually, you have two approaches:
Method 1: With explicit environment variables (most reliable)
claude mcp add-json coolify '{
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/Coolify-MCP-Server-for-Claude-Code/dist/index.js"],
"env": {
"COOLIFY_BASE_URL": "https://your-coolify-instance.com",
"COOLIFY_API_TOKEN": "your-api-token-here",
"COOLIFY_TIMEOUT": "30000"
}
}' -s localMethod 2: Simple command (relies on .env file)
claude mcp add coolify "node /absolute/path/to/Coolify-MCP-Server-for-Claude-Code/dist/index.js" -s localVerify the connection
claude mcp listOption C — Import from Claude Desktop If you already have the server configured in Claude Desktop:
claude mcp add-from-claude-desktop
claude mcp listImportant: Method 1 (explicit environment variables) is more reliable because it ensures environment variables are available to the MCP server process, regardless of the working directory from which Claude Code launches the server.
Tip: Some setups store Claude Code MCP config in
~/.claude.json. The Desktop app usesclaude_desktop_config.jsonunder your OS application data directory.
Cursor Setup
Cursor supports MCP. The easiest route is through Settings → Extensions → MCP Servers → Add Server, then point to your built script (node …/dist/index.js) and add the three environment variables. Restart Cursor after saving.
For advanced/enterprise setups, see Cursor's MCP docs on programmatic registration.
API Token Generation
Open your Coolify dashboard.
Navigate to Keys & Tokens → API tokens.
Create a new token (name it e.g. "MCP Server"), select the permissions you need, and optionally set an expiration.
Copy the token once when shown and paste it into your
.env.
Available Tools
System
Tool | What it does |
| Get Coolify version |
| Healthcheck probe |
Teams
Tool | What it does |
| List all teams |
| Get team by ID |
| Get current team |
| List members of current team |
Servers & Domains
Tool | What it does |
| Get domains for a server UUID |
Applications
Tool | What it does |
| List applications |
| Create application |
| Start application |
| Stop application |
| Restart application |
Services
Tool | What it does |
| List services |
| Create service |
| Start service |
| Stop service |
| Restart service |
Deployments & Keys
Tool | What it does |
| List running deployments |
| Get deployment by UUID |
| List SSH private keys |
| Create a new SSH private key |
Environment Variables
Application and service env vars support: list, create, update (single/bulk), and delete.
Usage Examples
Natural language you can try once connected:
Basics
"List my applications"
"Who's in the current team?"
"What version is my Coolify instance?"Servers & Apps
"Show domains for server 123e4567-e89b-12d3-a456-426614174000"
"Create a new app from https://github.com/user/repo"
"Restart the backend app"Services & Env Vars
"List running services"
"Create a PostgreSQL service on the main server"
"Add DATABASE_URL to the frontend app"Development
Dev mode (watch):
npm run devBuild:
npm run buildSetup:
npm run setupClean:
npm run cleanProject Structure
Coolify-MCP-Server-for-Claude-Code/
├── src/
│ ├── index.ts # MCP server entrypoint
│ ├── coolify-client.ts # Coolify API client
│ └── types.ts # Type definitions
├── dist/ # Compiled JS (generated)
├── .env # Environment variables (create this)
├── setup-mcp.js # Setup script for easy configuration
├── package.json
├── tsconfig.json
└── README.md # This fileAPI Reference
Selected endpoint mapping used by this server
MCP Tool | Method | Path |
| GET |
|
| GET |
|
| GET |
|
| GET |
|
| GET |
|
| GET |
|
| GET |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| GET |
|
| POST |
|
| GET |
|
| GET |
|
| GET |
|
| POST |
|
| GET |
|
Endpoint paths follow the official Coolify API and do not use a
/api/v1prefix.
Environment variable flags
Flag | Meaning | Apps | Services |
| Present at build time | ✅ | — |
| Applies to preview deployments only | ✅ | ✅ |
| Disable variable substitution | ✅ | ✅ |
Services are prebuilt images (no build phase), so
is_build_timehas no effect for services.
Troubleshooting
Server won't start
Confirm Node ≥ 18:
node --versionReinstall deps:
rm -rf node_modules && npm installRebuild:
npm run clean && npm run buildConfirm absolute paths in MCP config
Auth errors (401 Unauthorized)
Verify token is valid and scoped to the correct team
Recreate token if expired; paste into
.env
Connection issues (ECONNREFUSED/timeouts)
Check
COOLIFY_BASE_URL(no trailing slash)Ensure the Coolify instance is reachable and healthy
Increase
COOLIFY_TIMEOUTfor slow links
Tools not appearing
Restart your client (Claude Code / Cursor)
Verify with
claude mcp listCheck server logs in your terminal
Ensure environment variables are set for the MCP process
Environment variable issues
If you see COOLIFY_BASE_URL and COOLIFY_API_TOKEN environment variables are required errors:
Use the automated setup script:
npm run setupOr use explicit environment variables: Remove the existing MCP server and re-add with explicit env vars:
claude mcp remove coolify -s local claude mcp add-json coolify '{ "type": "stdio", "command": "node", "args": ["/absolute/path/to/your/dist/index.js"], "env": { "COOLIFY_BASE_URL": "https://your-coolify-instance.com", "COOLIFY_API_TOKEN": "your-api-token-here" } }' -s localVerify your .env file exists and has proper values:
cat .env
Why this happens: When MCP servers are launched by Claude Code, they may run from a different working directory, causing the
.envfile to not be found. Explicit environment variables in the MCP configuration solve this issue.
Debug mode
DEBUG=coolify-mcp npm run devSecurity
Keep API tokens out of VCS; rotate regularly
Use HTTPS; consider IP allowlists / VPN for private instances
Add
.envto.gitignore; restrict file permissionsUse least-privilege tokens per environment; audit and revoke regularly
Contributing
We welcome contributions!
Fork the repo and clone your fork
git clone https://github.com/<your-username>/Coolify-MCP-Server-for-Claude-Code.gitCreate a branch
git checkout -b feat/your-featureCode & test – follow existing style; add tests where useful
Commit
git commit -m "feat: add <thing>"Push & open PR
git push origin feat/your-feature
Guidelines
TypeScript best practices; backward compat where feasible
Clear commit messages and error handling
Update README when adding features
License
MIT — see LICENSE.
Support
Issues – open on GitHub
Docs
Version: 1.0.0 Maintainer: @forsonny
Available Tools
35 toolsbulk_update_application_envsA
Update multiple environment variables for an application in a single operation. Efficient for updating many variables at once.
Inputs: envs (required), uuid (required).
bulk_update_service_envsA
Update multiple environment variables for a service in a single operation. Efficient for updating many variables at once. Note: Setting is_build_time=true has no functional effect on services (they use pre-built images).
Inputs: data (required), uuid (required).
create_applicationC
Create a new application in Coolify. Applications are deployable units that can be sourced from Git repositories.
Inputs: project_uuid (required), destination_uuid (required), environment_name (required), ports_exposes, +2 more.
create_application_envC
Create a new environment variable for an application. This adds a new key-value pair to the application's environment.
Inputs: key (required), uuid (required), value (required), is_literal, +2 more.
create_private_keyB
Create a new SSH private key in Coolify for server authentication or Git repository access.
Inputs: name (required), private_key (required), description.
create_serverB
Create a new server in Coolify. Requires SSH access details and a private key for authentication.
Inputs: ip (required), name (required), port (required), user (required), +5 more.
create_serviceA
Create a new service on a specified server. Services are containerized applications that run on your Coolify servers.
Inputs: name (required), server_uuid (required), project_uuid (required), description, +2 more.
create_service_envA
Create a new environment variable for a service. This adds a new key-value pair to the service's environment. Note: Setting is_build_time=true has no functional effect on services (they use pre-built images).
Inputs: key (required), uuid (required), value (required), is_literal, +2 more.
delete_application_envA
Delete an environment variable from an application. This permanently removes the environment variable.
Inputs: env_uuid (required), application_uuid (required).
delete_service_envB
Delete an environment variable from a service. This permanently removes the environment variable.
Inputs: env_uuid (required), service_uuid (required).
get_current_teamA
Get details of the currently authenticated team. This is the team associated with your API token.
Inputs: no named parameters.
get_current_team_membersB
Get a list of all members in the currently authenticated team. Shows who has access to team resources.
Inputs: no named parameters.
get_deploymentA
Get detailed information about a specific deployment. Use this to monitor deployment status and troubleshoot issues.
Inputs: uuid (required).
get_server_domainsA
Get a list of domains configured for a server. These domains are used for routing traffic to applications and services.
Inputs: uuid (required).
get_server_resourcesA
Get a list of applications and services running on a server. This provides an overview of all resources deployed on the specified server.
Inputs: uuid (required).
get_teamA
Get details of a specific team. Requires a team ID obtained from list_teams.
Inputs: team_id (required).
get_versionA
Get Coolify version information. Returns the current version of the Coolify instance.
Inputs: no named parameters.
health_checkA
Check Coolify API health status. Note: This endpoint may not be available in all Coolify versions, including the current version (4.0.0-beta.397).
Inputs: no named parameters.
list_application_envsA
List all environment variables for a specific application. Use this to view current environment configuration.
Inputs: uuid (required).
list_applicationsA
List all applications across your Coolify instance. Applications are deployable units sourced from Git repositories.
Inputs: no named parameters.
list_deploymentsA
List all deployments across your Coolify instance. Deployments represent the history of application and service deployments.
Inputs: no named parameters.
list_private_keysA
List all SSH private keys stored in Coolify. These keys are used for server authentication and Git repository access.
Inputs: no named parameters.
list_serversA
List all servers registered in your Coolify instance. Use this to get server UUIDs needed for other operations.
Inputs: no named parameters.
list_service_envsA
List all environment variables for a specific service. Use this to view current environment configuration.
Inputs: uuid (required).
list_servicesA
List all services across your Coolify instance. Services are containerized applications running on your servers.
Inputs: no named parameters.
list_teamsA
List all teams the authenticated user has access to. Use this to get team UUIDs needed for other operations.
Inputs: no named parameters.
restart_applicationA
Restart an application by stopping and starting it again. Useful for applying configuration changes or recovering from issues.
Inputs: uuid (required).
restart_serviceA
Restart a service by stopping and starting it again. Useful for applying configuration changes or recovering from issues.
Inputs: uuid (required).
start_applicationA
Start a previously created application. This will initialize the application container and make it accessible.
Inputs: uuid (required).
start_serviceC
Start a previously created service. This will initialize the service container and make it accessible.
Inputs: uuid (required).
stop_applicationA
Stop a running application. This will gracefully shut down the application container.
Inputs: uuid (required).
stop_serviceA
Stop a running service. This will gracefully shut down the service container.
Inputs: uuid (required).
update_application_envC
Update an existing environment variable for an application. This modifies the value or settings of an existing environment variable.
Inputs: env_uuid (required), application_uuid (required), key, value, +3 more.
update_service_envB
Update an existing environment variable for a service. This modifies the value or settings of an existing environment variable. Note: Setting is_build_time=true has no functional effect on services (they use pre-built images).
Inputs: key (required), value (required), service_uuid (required), is_literal, +2 more.
validate_serverA
Validate a server's configuration and connectivity. Use this to verify server setup and troubleshoot connection issues.
Inputs: uuid (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 35 tools
Each tool targets a distinct resource and action, with clear separation between application and service operations. No ambiguity between tool purposes.
Most tools follow a consistent verb_noun pattern, but there is a mix of 'get_' and 'list_' for retrieval operations (e.g., get_server_domains vs list_applications), which is a minor inconsistency.
35 tools is on the high side, but the server covers multiple domains (applications, services, environments, servers, etc.). It could be streamlined slightly but is not excessive.
Notable gaps: missing delete operations for applications and services, no update for application/service properties (only envs), and no explicit deploy or redeploy tools for deployments. This will likely cause agent failures for common workflows.
Maintenance
Related MCP Connectors
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceMCP server for Coolify infrastructure management, providing 45 tools for servers, applications, databases, deployments, and diagnostics via natural language.10 npmMIT
- AlicenseBqualityBmaintenanceMCP server for managing Coolify instances, enabling control of applications, databases, services, servers, and more via natural language.13654 npmMIT
- AlicenseBqualityBmaintenanceMCP server for Coolify API that enables full deployment workflows from zero to production, including project, server, and application management.6570 npm4MIT
- AlicenseAqualityBmaintenanceOne MCP server to manage self-hosted Coolify instances: verify connectivity, discover servers, deploy applications, tail logs, diagnose incidents, and run emergency ops from any MCP client.1999 npmMIT