Connect your coding assistant
Let your coding assistant inspect, diagnose, and operate your Ghosty apps directly — no copy-pasting.
Connect your coding assistant
Your coding assistant (Claude Code, Cursor, or any tool that supports MCP servers) can talk to the Ghosty platform directly: list your apps, read deploy history and logs, ask Ghosty to diagnose a failure — and then act on it: deploy the fix, put work on a preview link, store a secret, roll back a bad release.
The Ghosty CLI ships this as a built-in tool server. It runs on your machine, uses the same sign-in as the CLI, and can only see and do what you can.
Set it up
- Install or update the Ghosty CLI:
npm i -g ghosty-cli@latest - Sign in (once, in a terminal):
ghosty login - Register the server with your assistant. The command is
ghosty mcp— it speaks over stdio.
Claude Code
claude mcp add ghosty -- ghosty mcp
Cursor (and most other tools) — add to the MCP configuration file:
{
"mcpServers": {
"ghosty": {
"command": "ghosty",
"args": ["mcp"]
}
}
}
Run your assistant from inside an app folder and the tools automatically target that app; from anywhere else, the assistant passes an app name explicitly.
Look and diagnose
| Tool | What it does |
|---|---|
diagnose_app |
Asks the Ghosty platform to diagnose why an app is failing. Returns a verdict, a plain-language explanation, and step-by-step fix instructions your assistant can act on. Counts toward the app's daily diagnosis allowance. |
list_deploys |
Recent deploys: status, time, commit, deploy id. |
get_deploy_log |
The full build & deploy log for one deploy. |
get_app_logs |
Recent production logs from the live app. |
get_app_state |
Each platform piece the app needs (repository, service, database, URL) and whether it's ready. |
list_apps |
The apps in your workspace and what each one can do. |
whoami |
Who is signed in and which apps they own. |
preflight |
Checks your machine and connection are ready. |
list_secrets |
The names of an app's secrets and the environment variable each binds to. Names only — secret values are never shown. |
Act
| Tool | What it does |
|---|---|
deploy_app |
Ships the app in the folder: saves the changes and the platform builds and deploys them, reporting progress until live. |
create_preview |
Puts the current work on a private preview link without touching the live app. |
redeploy_app |
Rebuilds and redeploys from the latest shipped code, without new changes. |
rollback_app |
Puts a previous successful version back live (no rebuild; stored-data changes are not undone). |
set_secret |
Stores a secret for the app and binds it to an environment variable. |
create_migration |
Applies a stored-data schema change to the builder's personal dev data. |
init_app |
Scaffolds a new Ghosty app into an empty folder. |
provision_app |
Creates or syncs everything the app needs on the platform from its configuration. |
connect_app |
Requests a connection to another app's capability (a workspace admin approves when needed). |
delete_app |
Permanently deletes an app (the code repository is kept). |
Safety
- Deleting is guarded.
delete_apprefuses unless the assistant passes the app's exact name as a separate confirmation — the same type-to-confirm the console uses. A mismatch deletes nothing. - Secret values only go in, never out.
set_secretaccepts a value but no result — success or error — ever contains it, and no tool can read a stored value back. - Your sign-in, your apps. The server runs locally with your CLI sign-in; every action carries exactly your permissions, and each app folder is tied to its own workspace so an action can never land on a same-named app somewhere else.
- Canceling is safe. If you stop the assistant mid-action, work already accepted by the platform finishes there (a build keeps building), but nothing new is started after the cancel.
A typical moment
A deploy fails. Instead of pasting logs around, you say: "my expense-tracker deploy failed — find out why and fix it." Your assistant calls diagnose_app, gets the verdict and fix instructions from the platform, applies the code change, and calls deploy_app — you watch it go live.
Troubleshooting
- "You're not signed in" — run
ghosty loginin a terminal (the browser sign-in can't happen inside the assistant's connection), then ask the assistant to try again. - "Diagnosis isn't available on this workspace yet" — your workspace is getting this feature soon; deploys, logs, and state already work.
- The server doesn't appear in the assistant — check the CLI is on your PATH (
ghosty --version) and restart the assistant after registering.
When something breaks and you'd rather start from the terminal, see Getting help when something breaks.