Let your AI agent run your Coolify. Safely.
List apps, manage environment variables, deploy, restart and read logs from Claude, Cursor, VS Code or Windsurf. Secrets stay masked, every change can be a dry run, and read-only mode is one flag away.
$ npx -y github:amintt2/coolify-mcp
{ "dry_run": true,
"message": "Dry run: nothing was sent to Coolify.",
"summary": { "created": 0, "updated": 1, "unchanged": 0 },
"results": [{ "key": "LOG_LEVEL", "status": "updated",
"changes": ["value"] }] }
{ "key": "DATABASE_URL", "value": "post*** (41 chars)" }
DATABASE_URL stays masked. Apply it and restart the app?Your config, ready to paste
Type your Coolify URL, pick your client, copy. Runs with npx straight from GitHub, so there is nothing to install beyond Node.js 20+ and git.
Create your Coolify token
Two minutes in the Coolify dashboard. Give the token only what you want the agent to be able to do.
Enable API access
In Coolify, open Settings → Advanced and turn on API Access.
If Allowed IPs is set, add the IP of the machine that runs the MCP server (usually your laptop).
Create an API token
Open Keys & Tokens → API tokens and create one. It is scoped to the team you are in.
readListing, env keys, deployments, logsread:sensitiveEnv values to mask & diff, build logs rec.writeSet and delete env varsdeployDeploy, start, stop, restartrootNot needed. Don't.
Paste it into your client
Replace <YOUR_COOLIFY_TOKEN> in the snippet above, or let VS Code prompt for it.
Then ask your agent: “Which of my Coolify apps are unhealthy?” It should call get_version and list_applications.
Only team admins and owners can create write, deploy or read:sensitive tokens.
Built for letting an agent near production
Every tool is designed around the question “what if the model gets it wrong?”
Secrets masked by default
Env values come back as post*** (41 chars). Plaintext needs reveal: true from the agent and COOLIFY_ALLOW_REVEAL=1 from you.
Dry run everything
set_envs and delete_env take dry_run and report created / updated / unchanged per key without writing, and without echoing values.
Read-only mode
COOLIFY_READ_ONLY=1 refuses every mutating tool. Tools also carry MCP read-only / destructive hints so clients can ask first.
18 tools
Discovery, env vars, deploys, start / stop / restart, deployment status with build logs, and container logs.
Coolify quirks handled
The bulk env endpoint resets is_literal and is_multiline when omitted. set_envs resends them so your flags survive.
Say “the api app”
Reference resources by uuid, name or part of the domain. Ambiguous matches fail with the candidates listed, never a guess.
Tools
Anything that takes an application or service accepts a uuid, the exact name, or a unique part of its name or domain.
Discovery 7 tools
get_versionCoolify version, health, API base in use, read-only and reveal flags. Call first when something fails.
readlist_projectsProjects and their environments.
readlist_serversServers, IPs, reachability and proxy type.
readlist_applicationsName, uuid, domains, status, git repo and branch, project and environment. Optional filter.
get_applicationOne application's details, with webhook secrets and passwords stripped.
readlist_servicesOne-click and compose services. Optional filter.
list_databasesStandalone databases, without credentials.
readEnvironment variables 3 tools
list_envsKeys, uuids and flags for an app or service; values masked. key_filter, reveal.
set_envsUpsert up to 200 keys in one call with build-time / runtime / preview / literal / multiline flags. dry_run.
delete_envDelete one key; is_preview targets the preview copy. dry_run.
Lifecycle 5 tools
deployDeploy by resource (uuid or name, comma-separated) or by Coolify tag. force rebuilds without cache.
restart_applicationRestart containers without rebuilding; picks up runtime env changes.
deploystart_applicationStart a stopped application. force, instant_deploy.
stop_applicationStop an application's containers. docker_cleanup.
restart_serviceRestart a service, optionally pulling the latest images first.
deployObservability 3 tools
list_deploymentsRecent deployments of an app, or everything queued and in progress.
readget_deploymentStatus plus the last N build and deploy log lines (default 100).
readget_application_logsLast N container log lines of a running application.
readEnvironment server config
| Variable | Meaning |
|---|---|
COOLIFY_URL | Required. Instance URL, e.g. https://coolify.example.com. |
COOLIFY_TOKEN | Required. API token, sent as a Bearer token. |
COOLIFY_READ_ONLY | 1 refuses every mutating tool. |
COOLIFY_ALLOW_REVEAL | 1 allows list_envs with reveal: true. |
COOLIFY_TIMEOUT_MS | Per-request timeout, default 30000. |
Questions
Which token permissions should I pick?
read is the minimum. Add read:sensitive so env values can be masked and compared (without it, list_envs shows keys only, set_envs can't tell unchanged from updated, and get_deployment has no build logs). Add write for env changes and deploy for deploy / start / stop / restart.
Never root. For a look-only setup, use read + read:sensitive and turn on read-only mode.
Does my token or my secrets leave my machine?
The server runs locally over stdio and talks only to your COOLIFY_URL. No telemetry. The token is never logged and is redacted from errors.
Env values are fetched so they can be masked; the agent (and so your model provider) only sees plaintext if you set COOLIFY_ALLOW_REVEAL=1 and the agent explicitly asks with reveal: true.
What's the difference between application and service env vars?
Applications (git / Dockerfile / Nixpacks builds) have build-time and runtime flags and a separate preview copy of each key for PR deployments. is_preview picks which copy you edit.
Services (one-click and docker-compose) have neither preview nor build-time flags. Coolify trims values and stores an empty value as null. After changing a service's envs, use restart_service; for apps, restart_application for runtime vars or deploy for build-time vars.
I'm on an older Coolify beta. Will the build-time flag work?
Yes. Current Coolify calls it is_buildtime (with is_runtime); older v4 betas used is_build_time. set_envs sends both and Coolify ignores the one it doesn't know.
Why does the first launch take a while?
npx -y github:amintt2/coolify-mcp clones the repository and compiles it the first time, then reuses its cache. It needs git on your PATH. You can also clone it, run npm install, and point your client at node /path/to/coolify-mcp/dist/index.js.
My client says it can't find npx.
GUI apps like Claude Desktop don't always see the PATH from your shell (common with nvm). Replace "npx" with the absolute path printed by which npx.
Is this an official Coolify project?
No. It's an independent, MIT-licensed project that uses Coolify's public v4 REST API.