nnesly

For AI agents

The platform is built to be operated by an agent: local stdio MCP (same login as the CLI), remote MCP with OAuth for brew-less clients, a strict --json contract, and a diagnose loop that names the fix.

Auth first

Before any mutate or project lookup: call whoami. Ifsigned_in is false, reason says which failure it is, and most are not a lost session.api-unreachable (retryable: true) means a session is stored and the API went quiet — wait and callwhoami again; never ask for a sign-in there.no-credential, rejected andcredential-unreadable are the ones a sign-in fixes: runnesly login yourself — it opens the browser, the person only approves — then retry. With no browser on the machine, runnesly login --no-browser: stdout carries verification_url, user_codeand expires_in; give the person the URL and code. NESLY_TOKEN works too. Then ask them for nesly login,nesly mcp setup and an agent restart only if the CLI is not there. account-mismatch is the wrong account, not a lost session. Do not invent another cloud or paste tokens into chat. On MCP 401: stop retrying MCP; use the CLI in the same turn.

Claude Code plugin

One install brings the MCP tools and three skills: deploy(already-live check, preview-first then ask for production, domain buy or bind),debug(diagnose first, then traffic failures / request-id logs for live 5xx), androllback (list revisions → instant restore, no rebuild → verify; optional bisect).

/plugin marketplace add neslyhq/claude-plugin
/plugin install nesly@nesly

Local MCP (stdio)

On a machine with the CLI, prefer local stdio so the agent uses the same credentials as nesly login. Run nesly mcp setup once: it connects the agent tools installed here — Antigravity (agy), Claude Code, Claude Desktop, Codex, VS Code (Copilot), Cursor, Windsurf (Devin Desktop), Gemini CLI and OpenCode — and prints one line per tool (connected when the tool itself listed it, already connected, written when the entry is in place but the tool cannot confirm it, skipped, error); --client <name>limits it to one. It replaces a remote OAuth URL entry if one is present. Windsurf (Devin Desktop) imports the servers of your other tools, so it gets its own entry only when none of them has nesly (--client devin always writes it). Codex (the ChatGPT desktop app, the Codex IDE extension and the codex CLI share one configuration) gets nesly from its plugin when that is installed and enabled; setup then writes nothing. nesly mcp on its own is the stdio server an assistant starts; typed at a terminal it prints help and exits 2. Any long flag also works with one dash (-all). nesly init --agents-md creates an AGENTS.md in a project directory that has none (an existing AGENTS.md and every other assistant file are left alone; the part to add is printed). Setup also installs the nesly skills into ~/.agents/skills(--skip-skills skips that); mcp remove --all takes back the ones you did not edit (--keep-skills keeps them). The tool list is the named workflow tools below plussearch_api / call_api for the rest of the control plane. Long output is a resource the result links to (nesly://projects/<project>/deployments/<id>/log); the prompts deploy, fix_failed_deploy and go_live carry the same text as the skills. Set NESLY_MCP_READ_ONLY=1 (or add ?read_only=true to the remote URL) and every tool that changes anything is left out. Product name aliases:/docs/taxonomy.json.

nesly login
nesly mcp setup
# restart the tool (Claude Desktop and the ChatGPT app: quit it completely)

# disconnect again (only our entry; --dry-run looks first)
nesly mcp remove --client cursor   # or --all

# or by hand, Claude Code without the plugin
claude mcp add nesly -- nesly mcp

# headless (CI, a server): no browser session needed
nesly token create agent   # shown once
NESLY_TOKEN=nesly_pat_... nesly mcp
search_documentationSearch the live platform docs (domains, addons, CLI, builds, …). Prefer this over guessing from training data. No auth required.
whoamiSession check — call FIRST before list_projects / deploy / mutate. If signed_in is false: stop; tell the user to run CLI login + mcp setup (stdio).
list_projects / get_projectStatus check: live URL, deployment, domains, addons. Requires sign-in. Call before publish when the project may already exist — if it is live, say the URL; a deploy is a new revision.
deployPack/upload/build (or clone a repository URL, or ship a prebuilt image) and return the URL. Agents: prefer environment=preview unless the user asked for prod; then ask before production. Sources in this order: a public git repository URL (full build; for an open-source app, its official repository), a connected repository, a prebuilt image last (it skips detected databases and generated config). On the hosted server it answers within seconds with deployment_id, state=building, watch_url (the console page that shows the build live: give it to the person at once) and say; the local server waits up to wait_seconds (default 90) and a build still going answers state=building with next_tool wait_deployment.
wait_deploymentWait for a deployment that is still building: ready, failed, or state=building again after wait_seconds (max 600; at most 45 on the hosted server), each time with a say of where it stands. Call it until ready or failed; never report success before verified=true. The build keeps running.
diagnoseWhy a deployment failed: findings with a fix each, env_findings (every missing variable and where its value comes from: addon, platform_minted, self_generated, third_party) and rescue (what the platform repaired itself). Call first after a failure.
get_logsThe last lines the app printed (build and runtime), when the diagnosis is not enough.
set_env / list_env / delete_envEnvironment variables (names only when listing). A change rolls out to the running app within seconds as a new revision; the old one serves until the new one is ready.
request_secretA secret only the person has (a payment or API key): the person is shown a console page — through the client's URL elicitation when it has one, otherwise the URL is in the result — types the value there, and the tool reports which keys are saved. The value never passes through the conversation.
add_addon / list_addonsManaged backing services (postgres, mysql, mssql, mongo, valkey, bucket, oidc, mail, model). Databases inject DATABASE_URL (mongo: MONGODB_URI); valkey injects REDIS_URL and VALKEY_URL; bucket injects AWS_*; mail injects MAIL_* and SMTP_URL / SMTP_HOST / SMTP_PORT / SMTP_USER / SMTP_PASSWORD / SMTP_FROM; mssql also ConnectionStrings__Default. The model addon gives the app an OpenAI-compatible URL, key and model name.
attach_domainPut your own domain on a project: adds it and checks DNS in one call; delegate=true for nameserver delegation. Call again to re-check. HTTPS follows DNS.
rollback / promoteRepoint traffic at a previous deployment, instantly; or make a ready preview the production release without rebuilding.
fix_dsnMake the code's database connection string reach the project's database (diff first; apply=true writes). Local files only.
get_app_model / plan_appThe runtime model a deployment runs with (processes, port, health, release, variable names by source, memory); plan_app takes the JSON of `app show --json` and names the fields a deploy would change. Never a value.
accept_proposalAccept (or reject=true) a value the platform proposed for a field a higher source holds. Accepting writes it into the project's build settings; a field set in the repository's config file is refused and changed there. Ask the person first.
search_api / call_apiEverything else in the control plane (cron, webhooks, log drains, team, backups, protection, usage, domains search and purchase, …): search_api finds a method by what it does and returns its input schema; call_api calls it. A destructive method needs confirm=true and then the person's phone.

Remote MCP (OAuth) — brew not required

Hosted Streamable HTTP endpoint with OAuth — for ChatGPT on the web, Claude.ai, or any client without the CLI (nesly mcp setup does not configure these). Paste https://mcp.nesly.net; the client shows Needs login and opens a browser. That OAuth session is not the same asnesly login — on Cursor with brew, use stdio above instead. Unauthenticated calls return HTTP 401 with aWWW-Authenticate pointer to protected-resource metadata.

# ChatGPT (web) / Claude.ai / brew-less Cursor
{
  "mcpServers": {
    "nesly": {
      "url": "https://mcp.nesly.net",
      "auth": {
        "CLIENT_ID": "platform-mcp"
      }
    }
  }
}

# Claude Code remote transport
claude mcp add --transport http nesly https://mcp.nesly.net

Three rules for agents

  1. Verify before you say done: open the deployment URL and check that it answers; give the URL to the person only after it does.
  2. Never search the machine for credentials, tokens or passwords. When the app needs a database, mail, storage or login, ask the platform: `nesly addon add <type> --yes` injects the variables.
  3. Ask the person before anything that costs money, deletes something, changes a quota or touches customer data. The person approves it: the command exits 6 and prints the approval id and any number; repeat it with `--approval <id>` once they have approved.

The --json contract

Every CLI command accepts --json and then prints exactly one JSON object on stdout; progress and logs go to stderr. Exit codes are stable: 0 ok, 1 error, 2 usage, 3 auth, 4 not found, 5 conflict, 6 approval pending. An agent that shells out instead of using MCP gets the same guarantees.

The diagnose loop

When a deploy fails, do not start by reading raw logs. nesly diagnose (or thediagnose tool) reads them for you and reports: the probable cause, the exact supporting log lines, env vars the app reads but the project does not define, and the command that fixes each finding. Failure reasons across the platform are written to be actionable by the agent fixing the code — never "check your configuration".

$ nesly diagnose --project shop --json
{
  "status": "FAILED",
  "missing_env": ["STRIPE_KEY"],
  "findings": [{
    "cause": "the application reads the environment variable STRIPE_KEY, but the project does not define it",
    "evidence": ["TypeError: ... (process.env.STRIPE_KEY)"],
    "fix": "nesly env set STRIPE_KEY=<value> --project shop, then redeploy"
  }]
}

llms.txt

nesly.net/llms.txt is the one-page briefing: the deploy quickstart, the command list and the application contract (listen on $PORT, bind 0.0.0.0). AI assistants fetching the home page receive it directly. For the full documentation corpus in one file, usenesly.net/docs/llms-full.txt(built from every docs markdown twin). For a short index of every docs page with summaries and prerequisites, usenesly.net/docs/sitemap.md.