# Quickstart for Cursor

Connect Cursor to Astris, then ask its agent to deploy your app.

## Create a key

[Sign in to the Console](https://api.astris.run/console/sign-in) and create a key on the API keys page. Astris shows a key only once, so copy it now. See [Keys](/docs/keys).

## Connect the Astris MCP

Paste this into `~/.cursor/mcp.json`. Put your key in place of `PASTE_KEY_HERE`.

```
{
  "mcpServers": {
    "astris": {
      "url": "https://api.astris.run/mcp",
      "headers": {
        "Authorization": "Bearer PASTE_KEY_HERE"
      }
    }
  }
}
```

Do not commit a file that contains the key.

## Install the Astris Skill

The Skill tells the agent how to use the Astris MCP: what to check before a deploy, and in which order to call the tools.

In Cursor, open Customize, choose From GitHub Repository and import `astris-labs/astris-skill`. Then install the plugin.

## Deploy your first app

Ask the agent to deploy your repository to Astris. With the Skill, it calls `whoami` to read your next step, `preflight` to check the repository, and then `deploy` with a project name, an app name, the Git URL and the branch.

If your account has no plan yet, the API refuses the deploy with [upgrade_required](/docs/errors/upgrade_required). Choose a plan on the Billing page in the Console, then ask again.

## Or deploy with the Astris CLI

The Astris CLI needs Node 22 or later.

```
npm install --global @astris-labs/cli
```

```
astris login
```

`astris login` asks `Paste your Astris API key:` and prints `Logged in.` when the API accepts the key.

```
astris deploy --project <project> --name <app> --git-url <repository> --branch <branch> --wait
```

With `--wait`, the command prints `done`, `error`, `cancelled` or `still running, check status`. Then see [Apps](/docs/apps) and [Domains](/docs/domains).
