AI Assistant Access (MCP)
Let Cursor, Claude Code and other MCP-compatible AI assistants inspect your apps, servers, databases and metrics, and optionally deploy, roll back, restart, scale, query databases or manage cron, each capability its own toggle.
Prefer to watch? Part 8 of the video walkthrough (1:30) covers this page.
DeployOS ships a local MCP server so an AI coding assistant can answer "why is my app down?" or restart a stuck app, without you switching windows. Every capability beyond read access is off until you individually turn it on: enabling AI assistant access does not, by itself, grant write access to anything.
What it can do
Read-only tools are available the moment AI assistant access is on. None of them can change anything. The main ones:
- list_apps / get_app, every app, or full detail on one (domains, build method, port, replicas, health path, repo/branch)
- list_servers, every server DeployOS manages
- list_deployments, recent deployments for a named app (each entry's ID works with rollback)
- run_doctor, the 9-step Doctor diagnostic (DNS, ports, proxy, container, network, route, health, TLS, logs) against a named app
- fetch_logs, recent logs for a named app, from the app itself or its reverse proxy
- get_server_metrics / get_app_metrics, live CPU/RAM/disk for a server, and p50/p95/p99 latency + status-code breakdown for an app
- list_env_var_keys, the env var names set on an app, never their values
- list_databases / list_db_backups, every database, and the backup files already taken for one
- list_templates, the one-click app template library
Everything past that is a separate switch, one per tool, on the AI Access page, all off by default. The page lists the tools in groups, has a search box (type "cron" or "backup" to find one), shows how many are switched on, and has a Switch all off link. In all, DeployOS exposes 68 tools once you count the VPN, pen-testing and client-hosting ones.
| Group | Tool | What it does |
|---|---|---|
| App lifecycle | Deploy an app | Fetches the latest commit (or rebuilds from the pinned image), publishes the route, and health-checks it, the same pipeline as clicking Deploy in DeployOS, including AI Deploy Guardrails and the pre-migration snapshot check |
| App lifecycle | Roll back an app | Rolls back to a previous deployment, instant if that deployment's image is still cached, otherwise rebuilds from that commit |
| App lifecycle | Restart an app | Restarts a named app's containers |
| App lifecycle | Stop an app / Start an app | Stops a named app's containers (keeping volumes, images and config, optionally showing a placeholder page instead of an error) and starts it again later |
| App lifecycle | Scale an app | Changes a named app's replica count |
| App lifecycle | Deploy a template | Deploys a one-click template (Uptime Kuma, n8n, etc.) as a new app |
| App lifecycle | Create an app | Creates a new app from a git repo, a prebuilt image or a compose file, including wildcard domains |
| App lifecycle | Author a template | Creates or updates a custom deployable template |
| Configuration | Reconfigure a template app | Changes the WordPress or PHP version, starter preset or container size of a template-deployed app; data volumes are kept |
| Configuration | Update an app | Changes an app's domains, port, service, resource profile, replicas, repo, branch, image or health path |
| Configuration | Set an env var | Sets a single env var on an app, leaving the rest untouched, doesn't itself restart the app |
| Databases | Run a database backup | Takes an on-demand backup of a database right now |
| Databases | Run a database query | Runs arbitrary SQL/commands against a database, can write or delete data, no undo beyond existing backups |
| Operations | Manage cron jobs | List, add, enable/disable/remove cron jobs on a server. This one switch covers listing too, so with it off your assistant cannot see your cron jobs |
| Client Hosting Mode | Suspend a client / Restore a client | Pauses or restores a Client Hosting Mode client's service |
| Security testing | Run attack simulations | The attack simulation on one server and its apps' domains, then: investigate one finding further, check a proposed fix (with a dry run where possible), retest after you apply it, compare the last two runs, export the report as Markdown, and bring in a source-code audit of an app (see below) |
| Security testing | Let it probe like a pen tester | The assistant designs its own tests (see AI pen testing below) |
| Security testing | Add security checks to deploys | Turns a finding into a check that runs before or after your deploys. Changes a local setting only |
| Destructive | Tear down an app | Deletes a named app's containers, volumes, images and route, no undo |
AI pen testing
The attack simulation runs the same checklist every time. With Let it probe like a pen tester switched on, your assistant can work the way a human tester does: map the attack surface, decide what looks weak, and send the request that tests it.
- pentest_recon maps one domain: the framework and versions it announces, cookie flags, pages, every form (and whether it has a password field, a CSRF token or a file upload), API routes found in the site's JavaScript, third-party backends such as Supabase, Firebase or S3, robots.txt, the sitemap and security.txt. It ends with leads: what to test next and with which tool.
- pentest_probe sends one request the assistant designs, with GET, HEAD or OPTIONS and headers from a fixed list. It reports what the response suggests: a value reflected without encoding (possible XSS), a CORS policy that trusts any site, host header injection, an open redirect, a stack trace, an exposed file.
- pentest_check_api requests up to 25 API routes without logging in and sorts them: protected, open with personal or secret fields, open public data, or only accepting POST. GraphQL routes get an introspection query to see whether the whole schema can be downloaded. It returns field names and record counts, never the data.
- pentest_service_auth asks each database or admin port that answers from the internet the protocol's own harmless question (Redis PING, MongoDB listDatabases, Docker's /version and so on) to see whether it needs a password. It never sends a login or a password guess.
- pentest_dns_email checks your domains with
digon the server: subdomain takeover, domains that don't point at the server, and SPF, DMARC and CAA, with the record to add for each problem.
The limits are enforced by DeployOS, not left to the assistant:
- Your own targets only: the server's address and the domains of apps DeployOS deployed to it. Anything else is refused.
- Reads only: GET, HEAD and OPTIONS. Your cookies and logins are never sent, so it sees what an anonymous attacker sees.
- 400 requests per server per hour, so testing never turns into load.
- Secrets removed: passwords, tokens and keys in responses are blanked, files that match an exposed-secret pattern are withheld entirely, and cookie values never come back.
- Every request is logged in the server's security history.
Add a source-code audit (Cloudflare's security-audit skill)
The probes above test your app from the outside. They cannot read its code, so a missing ownership check or an injectable query behind a login stays invisible to them. Cloudflare's open-source security-audit skill does the opposite: it reads the code and never touches a live site. DeployOS joins the two.
- Install the skill in your assistant:
npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit. Use Cloudflare's own repository, not a copy. - pentest_source_context gives the assistant what the code doesn't say: the exact commit that is live (audit that one, not the newest), the domains, the proxy in front of the app, its compose file with every value removed, the names of its variables, and the open live findings for it.
- The assistant runs the skill's full audit on the repository at that commit.
- Anything the skill could not settle from code alone comes back as needs validation, with the fact it is missing. Where that fact is about your live app, the assistant checks it on your own domain with pentest_probe or pentest_check_api.
- pentest_import_source_findings puts the results in the same report as the live findings, under Source code: confirmed problems with their severity, the path through the code (file and line), what an attacker does and the suggested fix; open questions as Needs checking. Importing again replaces that app's earlier source findings, and a later live run keeps them.
A source finding can't be retested from DeployOS. Fix it in the code, deploy, run the audit again and import the new results.
A useful prompt: "Run a pen test on my production server: start with the attack simulation, map each domain, test what looks weak, and give me a report with the attack chains you found and the fix for each." It is a strong first pass, not a replacement for a human penetration test: it cannot test anything behind a login.
Nothing beyond this list is ever exposed, and a tool call for something you haven't turned on returns a clear "not enabled, turn it on in Settings" message rather than silently doing nothing or failing oddly. Every tool also carries standard MCP annotations (read-only, destructive, idempotent) so clients like Claude Code can show you accurate risk before calling one.
Setup, everything happens in the desktop app
There's no separate account, token, or credential entry for MCP. The server reads the exact same servers, apps and SSH credentials already configured in DeployOS, straight from your OS keychain, the same way the desktop app itself does. If you installed DeployOS the normal way, the MCP server binary is already sitting next to it: no Rust toolchain, no build step.
- Open Settings → AI assistant access and switch it on. DeployOS shows you the exact path to the binary on your machine, already filled into a ready-to-paste config.
- Add that to Cursor's or Claude Code's MCP config (typically a
mcp.jsonor.cursor/mcp.json):(Settings gives you the real path for your install, this is just what it looks like on a normal macOS install.){ "mcpServers": { "deployos": { "command": "/Applications/DeployOS.app/Contents/MacOS/mcp_server" } } } - Restart your assistant so it picks up the new server, then ask it something like "list my DeployOS apps" or "run Doctor on my-app."
If AI assistant access is off, the binary exits immediately with a message telling you where to turn it on, it won't silently do nothing.
Building from source instead (contributing to DeployOS itself)? A dev build only compiles the binary you ask for, so Settings will tell you to run npm run build:mcp from the project root first, the path only auto-fills once that binary actually exists on disk.
How deploy and rollback work headless
deploy_app and rollback_app stream live progress back into DeployOS's own UI, which normally needs a real, running desktop-app window under the hood. The MCP server runs headless (no window ever appears), it builds a real app instance with its window forced invisible, gets a fully working handle without ever showing anything on screen, and that's what makes both possible here at all.
Privacy
Nothing about your servers, apps, or SSH keys is sent anywhere by enabling this, the MCP server talks to your AI assistant over local stdio (standard input/output on your own machine), the same transport Cursor and Claude Code use for every local MCP server. It's exactly as private as running a command in your terminal and pasting the output into a chat, except automated.
Hand a failing container to your assistant
On the Dashboard and in Monitoring → Health, a failing container has a Fix with AI button. It copies a briefing (server, container, image, state, restart count and why it was flagged) with step-by-step instructions: read the logs, explain the problem in plain language, then suggest the safest fix, preferring a restart, then a rollback, and asking before removing anything. Paste it into your assistant. If the fix needs a tool you have not switched on, the assistant tells you which switch to turn on. See Monitoring & Metrics.