CapRover MCP
Provides tools for reading CapRover apps, projects, configuration, runtime/build logs, and status, plus safely planning and applying app config changes with backups, verification, and automatic rollback.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
CapRover MCP
An MCP server for CapRover that lets AI agents (Claude Code, Codex, any MCP client) read your apps' config and logs and change config without breaking apps: every change is planned, confirmed, backed up, verified and rolled back automatically if the app does not come back.
Comes with a plugin for Claude Code and Codex that bundles the MCP connection and skills for reading config, reading logs, updating config, rolling back, troubleshooting and auditing projects.
Tested against CapRover 1.14 and 1.16.
Features
Read: apps, apps grouped by project with dependency and risk analysis, full app config (env values masked), runtime status, runtime logs (Docker stream decoded, sorted, secrets redacted), build logs.
Change safely: env vars (set/unset), instance count, container HTTP port, force HTTPS, websocket, internal-only, host port mappings, description.
Two steps:
planreturns a diff and warnings;applyruns only with thatplan_id.Sends the full app definition. CapRover's update API resets every omitted field (env vars, instance count, App Token), so partial updates break apps.
Backs up before writing, re-reads and compares every stored field, then waits for the app to be healthy (Swarm task status on CapRover ≥ 1.16, plus an HTTP probe). Rolls back on any failure.
Refuses risky edits: CapRover/Swarm host ports, port conflicts, >1 instance for persistent apps, Force HTTPS without an SSL domain, stale plans, apps that are building.
Auth: logs in with the dashboard password (TOTP 2FA supported), caches the token (0600 file) and logs in again when it expires; or uses a fixed token. Over HTTP, clients authenticate with per-user bearer tokens, and each change records who applied it.
Tool | Purpose |
| Connection and auth state (no secrets) |
| Apps with image, instances, domains |
| Apps by project, dependencies ( |
| One app's config, env values masked |
| Swarm task state, failures, history (CapRover ≥ 1.16) |
| Runtime logs, filterable, secrets redacted |
| Latest build/deploy log |
| Validate a change, return diff + |
| Undo from backups |
| Apply a confirmed plan (the only write tool) |
The MCP cannot create/delete apps, deploy images, or change domains, SSL, volumes or nginx config.
Related MCP server: Coolify MCP Server
Quick start (local, stdio)
git clone https://github.com/minhvip08/caprover-mcp && cd caprover-mcp
make install
cp .env.example .env # set CAPROVER_URL and CAPROVER_PASSWORD
claude mcp add caprover -- "$PWD/.venv/bin/python" -m caprover_mcp # or any MCP clientPython 3.14+. Values in .env are read by make run; for claude mcp add pass them with -e KEY=VALUE or export them.
Deploy to CapRover (HTTP, shared by a team)
Create an app (e.g.
caprover-mcp) with Has Persistent Data, container HTTP port8000, a persistent directory at/data(token cache and backups), HTTPS enabled and forced.Set env vars in App Configs:
Variable
Value
CAPROVER_URLhttp://captain-captain:3000(internal), or your dashboard URLCAPROVER_PASSWORDdashboard password
MCP_AUTH_TOKENSalice:<token>,bob:<token>(openssl rand -hex 32, ≥ 32 chars each)CAPROVER_PROTECTED_APPScaprover-mcp(the MCP never edits itself)Deploy. The repo ships a GitHub Actions workflow: push to
mainruns CI, buildsghcr.io/<owner>/<repo>and deploys withcaprover/deploy-from-github. Enable the app's App Token, then putCAPROVER_SERVER,CAPROVER_APP_NAME,CAPROVER_APP_TOKENin a GitHub environment namedcaprover(scripts/setup-github.shdoes it withgh). Or build theDockerfileany other way.Check
https://<app-domain>/health. MCP endpoint:https://<app-domain>/mcp.
Run a single instance: plans live in process memory.
Plugin for Claude Code and Codex
See plugins/caprover.
# Claude Code: asks for the MCP URL and your token (stored in secure storage)
/plugin marketplace add minhvip08/caprover-mcp
/plugin install caprover@caprover-mcp
# Codex: bearer token from $CAPROVER_MCP_TOKEN
codex plugin marketplace add minhvip08/caprover-mcp
codex plugin add caprover@caprover-mcpConfiguration
All settings are env vars, validated at startup; see .env.example.
Variable | Default | |
| required | Dashboard/API URL |
| one required | CapRover auth |
| Base32 TOTP secret if 2FA is on | |
|
| |
| required for HTTP | Client bearer tokens |
| Apps that cannot be changed | |
|
| Disable writes |
|
| Allow |
|
| Seconds to wait for health before rolling back |
|
|
|
|
| Token cache and backups (secrets, 0600) |
Calling captain over plain http://…:3000 works with Force HTTPS on: the client sends X-Forwarded-Proto: https as nginx does.
Development
make ci # ruff + pytest
scripts/mcp_client.py tools # talk to the server like an MCP client does
scripts/mcp_client.py call caprover_plan_config_change '{"app_name":"my-app","set_env":{"A":"1"}}' \
call caprover_apply_config_change '{"plan_id":"{plan_id}"}'Tests run against an in-memory CapRover (tests/fake_caprover.py) that mirrors the real API's behaviour (omitted fields reset on update, token expiry, Docker log framing, no runtime API on old versions). See AGENTS.md for code layout and rules.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Deploy apps from GitHub, read build/runtime logs, and manage your app's users from your AI agent.
AI-native managed hosting: your agent operates your apps over MCP within your account's boundary.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI agents to manage self-hosted Coolify v4 instances, including listing applications, safely handling environment variables with masking and dry runs, deploying, restarting, and reading logs.201MIT
- AlicenseNot gradedqualityCmaintenanceEnables managing a self-hosted Coolify PaaS from Claude, Cursor, or any MCP client through 45 tools for deploying, rolling back, debugging, and operating applications, databases, services, projects, and environments in plain English. Destructive operations pause for human confirmation and secrets stay masked.MIT
- AlicenseCqualityAmaintenanceEnables AI agents to manage Docker environments through DPanel by exposing MCP tools for containers, compose projects, images, networks, volumes, files, cron tasks, backups, and system information. Supports read-only, read-write, and admin capability tiers, with sensitive-value redaction and fail-closed confirmation for destructive operations.99MIT
- AlicenseBqualityCmaintenanceEnables AI agents to deploy and roll back applications, read build and runtime logs, diagnose broken apps, and run commands inside containers. It also manages environment variables, PostgreSQL databases, domains, cron jobs, marketplace services, and backups on a PaaS platform, with safety annotations so clients can confirm destructive actions.58MIT