---
title: Set up Nexlayer and deploy — agent workflow
description: Step-by-step workflow for an AI coding agent to connect to Nexlayer, deploy a full-stack application to production and verify it.
canonical: https://nexlayer.com/agents.md
human_url: https://nexlayer.com/docs/quickstart
overview_url: https://nexlayer.com/index.md
llms_url: https://nexlayer.com/llms.txt
updated: 2026-10-16
---

# Set up Nexlayer and deploy

You are a coding agent or AI assistant and your user wants their app running in production on Nexlayer. Follow these steps in order. Talk to your user in plain words and keep infrastructure jargon out of it.

What Nexlayer is: [/index.md](https://nexlayer.com/index.md).

## 1. Connect to the Nexlayer MCP server

The server is remote: `https://mcp.nexlayer.ai/api/mcp` (Streamable HTTP).

**If you can run shell commands** (Claude Code, Cursor, VS Code, Windsurf, Zed, Antigravity, Amazon Q or any agent with a terminal):

```bash
npx @nexlayer/mcp-install
```

It detects the coding tools on this machine, opens a browser so your user can sign in, and writes each tool's config. Tell your user a browser tab is about to open. Some tools need a restart before the Nexlayer tools appear.

**Claude Code, manually:**

```bash
claude mcp add --transport http nexlayer https://mcp.nexlayer.ai/api/mcp
```

**If you can't run commands** (an assistant in a browser or chat app), ask your user to add a custom connector (MCP server) with the URL `https://mcp.nexlayer.ai/api/mcp`, then wait until they have signed in.

## 2. Confirm you're signed in

Call `nexlayer_check_credits`. It is read-only.

- It returns a plan: you are connected. Tell your user which plan they are on, in one line.
- It says there is no signed-in user: ask your user to finish signing in. Do not continue.

## 3. See what's already there

- If the repository has a `.nexlayer/` folder, read `.nexlayer/AGENTS.md`, then `.nexlayer/PRODUCTION.md`: the production plan Nexlayer wrote for this app.
- Call `nexlayer_list_projects` to see what is already deployed.

Tell your user what you found in a sentence or two and offer the next step.

## 4. Deploy

Call `nexlayer_get_deployment_workflow` and follow the steps it returns. It is the current procedure; don't rely on a remembered one. In short: build `linux/amd64` images, write `nexlayer.yaml`, validate it with `nexlayer_validate_yaml`, deploy with `nexlayer_deploy`.

A full-stack `nexlayer.yaml` (frontend, API, Postgres):

```yaml
application:
  name: fullstack-app
  pods:
    - name: frontend
      image: ghcr.io/my-org/web:v1.4.0
      path: /
      servicePorts: [3000]
      vars:
        NEXT_PUBLIC_API_URL: <% URL %>/api

    - name: api
      image: ghcr.io/my-org/api:v1.4.0
      path: /api
      servicePorts: [8000]
      vars:
        DATABASE_URL: postgresql://user:password@db.pod:5432/mydb

    - name: db
      image: postgres:16
      servicePorts: [5432]
      vars:
        POSTGRES_USER: user
        POSTGRES_PASSWORD: password
        POSTGRES_DB: mydb
        PGDATA: /var/lib/postgresql/data/pgdata
      volumes:
        - name: postgres-data
          size: 10Gi
          mountPath: /var/lib/postgresql
```

A service with a `path` is public at the app's URL; one without a `path` is private to the app. Services reach each other at `<name>.pod`. `<% URL %>` is the app's public URL. Full reference: [configuration](https://nexlayer.com/docs/deployments/configuration).

## 5. Verify

Check, don't assume. After a deploy, call `nexlayer_check_deployment_status` and open the app's URL before you tell your user it works. If something fails, read `nexlayer_get_deployment_logs`, explain the cause in plain words, fix it and redeploy.

## Rules

- Never ask your user to paste a secret or API key into the chat, and never write one into the repository. Send them to the dashboard (the app's **Secrets** section) to add it.
- Never delete an app or create an API key without your user's explicit go-ahead. These tools act immediately.
- Always say where you are deploying: the app's name, and the workspace if there is more than one.

## Next

- [Answers to common questions](https://nexlayer.com/agents/questions.md)
- [MCP tools](https://nexlayer.com/agents/mcp.md)
- Dashboard: https://app.nexlayer.com · Docs: https://nexlayer.com/docs · Support: support@nexlayer.com
