# Cursor quickstart

> Connect Cursor to the hosted vvgen MCP server.

You need an API key from the [dashboard](https://vincevangen.com/app/keys) (`igk_live_...`, shown once).

## 1. Put the key in your environment

```bash
export VINCEVANGEN_API_KEY="igk_live_..."
```

Start Cursor from a shell that has it, or set it in your login profile. Cursor expands `${env:NAME}` in
`mcp.json`, so the key stays out of the file.

## 2. Add the server

Global (all projects): `~/.cursor/mcp.json`. One project only: `.cursor/mcp.json` in the repo.

```json
{
  "mcpServers": {
    "vvgen": {
      "url": "https://api.vincevangen.com/mcp",
      "headers": { "Authorization": "Bearer ${env:VINCEVANGEN_API_KEY}" }
    }
  }
}
```

Open **Settings, Tools & MCP**. `vvgen` should show a green dot and its tool list. Toggle it off and on
if you edited the file while Cursor was running.

## 3. Use it

In Agent mode:

> Generate a studio product photo of a ceramic pour-over dripper on a transparent background.

Cursor asks before running a tool the first time. The result has file links and a preview; the full image
comes through [`vvgen_get_file`](https://vincevangen.com/docs/tools.md#vvgen_get_file).

## Troubleshooting

| Symptom | Cause |
|---|---|
| Red dot, 401 | `${env:VINCEVANGEN_API_KEY}` is empty for the Cursor process. Restart Cursor from a shell that exports it. |
| Tools missing | Cursor limits how many tools it exposes at once across servers; disable unused servers. |
| 402 | Out of credits. See [Concepts](https://vincevangen.com/docs/concepts.md#errors). |
