Using with Claude Code
Once the fleet MCP server is installed (see Setup), Claude Code can manage your server by calling fleet tools directly. Here are practical examples.
Deploy an app
“Deploy the myapp application”
Claude will:
- Call
fleet_statusto see the current state - Call
fleet_deploywithapp: "myapp" - Confirm success or surface the error
If the app is not yet registered, Claude can first call fleet_register with the compose path, then deploy.
Check what is unhealthy
“Check what’s unhealthy on the server and tell me what to do”
Claude will:
- Call
fleet_health(no app parameter) to get health results for all apps - Identify any apps where
overallisdownordegraded - Call
fleet_logsfor each unhealthy app to look for errors - Suggest fixes based on the log output
Set a secret
“Set the DATABASE_URL secret for api to postgres://prod-host/mydb”
Claude will:
- Call
fleet_secrets_statusto confirm the vault is initialised - Call
fleet_secrets_setwithapp: "api",key: "DATABASE_URL", and the value - Remind you to unseal and restart the app for the change to take effect
If you want Claude to also apply it immediately:
fleet_secrets_unseal— decrypt the updated vault to runtimefleet_restartwithapp: "api"— pick up the new env
Create a pull request
“Create a PR for the myapp feature branch I’m on”
Claude will:
- Call
fleet_git_statuswithapp: "myapp"to get the current branch - Call
fleet_git_pr_createwith the app name, a draft title, andbase: "develop" - Return the PR URL
For a full feature workflow:
fleet_git_branch— create a branch- Make code changes (using file editing tools)
fleet_git_commit— stage and commitfleet_git_push— push to originfleet_git_pr_create— open the PR
Investigate a dependency alert
“What CVEs does myapp have and are any fixable?”
Claude will:
- Call
fleet_deps_statusto see if scan data is current, orfleet_deps_scanto refresh - Call
fleet_deps_appwithapp: "myapp"to get all findings - Filter for CVEs and check which have
fixable: true - Optionally call
fleet_deps_fixwithdryRun: trueto preview the PR changes - If you approve, call
fleet_deps_fixwithdryRun: falseto create the PR