# Connect Cursor

URL: https://getvando.com/docs/connect-an-ai/cursor

Connect Cursor to the Vando app on your phone, so it gets a secret only after you tap Give, and keys stay out of your .env files and chats.

The AI code editor, its terminal agent and its cloud agents. Last checked 2026-11-10, against Cursor’s own documentation (the links at the end). If a step doesn’t match what you see, [tell us](https://getvando.com/support). For Claude Code, [Connect an AI](https://getvando.com/docs/connect-an-ai) is the same road.

## The steps every tool shares

**1.** Install `vando` in your own terminal (not through your AI tool):

```bash
npm i -g @getvando/cli --registry=https://registry.npmjs.org --@getvando:registry=https://registry.npmjs.org
```

No npm on this computer? The one-line installer gets the same signed vando:

```bash
curl -fsSL https://getvando.com/install.sh | sh
```

**2.** Connect it to your phone. It shows a code that works once, for 10 minutes; open Vando on your phone, then **Connect an AI**, enter the code and tap **Connect**. Run `vando connect` again to finish. Do this in your own terminal: it writes the connection’s key on this computer, and many sandboxes block that.

```bash
vando connect
```

**3.** Save a secret once. Without a terminal it opens a one-time page in your own browser; you paste the value there and it goes to your phone, locked so only the phone can open it. Tap Save on the phone. Or add it in the Vando app.

```bash
vando add STRIPE_KEY
```

**4.** Your tool runs a command with it. Your phone shows what is asked and for how long; you give it or deny it there, and the value goes into that one program’s environment, as the variable `STRIPE_KEY`.

```bash
vando run --secret STRIPE_KEY -- node send.js
```

A `.env` line can name a secret instead of holding it, and `vando run` fills it in when the program starts:

```text
STRIPE_KEY=vando://Work/acme/dev/STRIPE_KEY
```

**5.** Tell your tool how to ask: put this note in its instructions file (the file is named below):

```md
## Secrets (Vando)
- Never open, print, copy or edit `.env*` files or secret values, and never put a secret in chat.
- Run anything that needs a secret as `vando run --secret NAME -- <command>` (repeat `--secret` for more than one).
- Exit 75 means it is waiting for the owner's phone: say "Approve NAME on your phone, then I'll run it again", do other work, then run the same command again. After two waits, stop and tell the owner to open Vando on their phone (the request is in the Inbox).
- Exit 77 means the owner said no or the access ended: don't retry; ask the owner.
- Output that shows `[vando:NAME]` had a secret hidden; that is expected.
- Don't use `vando get` or `vando env --reveal`: they print values where you can read them. `vando env` (names only) is fine.
- Never enter a connect code yourself.
```

## What differs for Cursor

### The instructions file

Put the note from step 5 in `AGENTS.md` in the project root (the editor, the Cursor CLI and cloud agents all read it), or a rule file `.cursor/rules/vando.mdc` with `alwaysApply: true`.

**Every project:** Cursor has no user-level file: its User Rules live in the settings (Customize → Rules) and project rules win where they conflict. The note to put there: [Use Vando in every project](https://getvando.com/docs/connect-an-ai/every-project).

### Approvals and the sandbox

Cursor’s agent runs terminal commands in a sandbox whose network is blocked by default. Add Vando’s server to the project’s `.cursor/sandbox.json` (the project file wins over `~/.cursor/sandbox.json`):

```json
{ "networkPolicy": { "default": "deny", "allow": ["<Vando's server>"] } }
```

Replace `<Vando's server>` with the address `vando` names in its blocked message. Keep the default Auto-review run mode, or use Allowlist and add `vando`. In the Cursor CLI the allow rule is `Shell(vando)`, which matches on the first word, so it allows every `vando` subcommand; there is no way to allow `run` alone there.

Cursor’s docs don’t say whether the sandbox can reach the macOS keychain: run `vando connect` in your own terminal.

### MCP tools (optional)

Most work goes through `vando run`, which keeps secrets out of the chat. Add the tools only when Cursor must read a value itself; a value a tool returns stays in the conversation ([the tools](https://getvando.com/docs/reference/mcp)). Add the server to `.cursor/mcp.json` (this project) or `~/.cursor/mcp.json` (all projects); the editor and the Cursor CLI share it:

```json
{
  "mcpServers": {
    "vando": { "type": "stdio", "command": "vando", "args": ["mcp"] }
  }
}
```

Cursor asks before each MCP tool call by default. In the CLI, `agent mcp list` shows the server and `Mcp(vando:*)` is the permission token.

### Cloud and remote sessions

Cursor cloud agents (called background agents before) run on isolated machines with internet on by default, install with `.cursor/environment.json`, and run every terminal command without asking. You can install `vando` there (`"install": "<the install line from step 1>"`), but each new machine needs its own connect, and nobody is there to read the code unless you are watching the session. Don’t store a Vando connection key as a cloud agent secret. Use Vando with the editor or the CLI on a computer you sit at.

### If something goes wrong

- The sandbox blocks the network by default; without the `sandbox.json` rule, `vando run` fails with a connection error, not exit 75.
- The CLI’s Shell Mode has a fixed 30-second timeout, shorter than a phone approval can take. The agent should run the same command again on exit 75.
- If Cursor was opened from the Dock and `vando` was installed with npm under nvm, put the `PATH` line in `~/.zshenv` or use the full path as the MCP `command` (a tip from Cursor’s forum, not its docs).
- Heavy shell prompts (Powerlevel10k and the like) can garble or hang the agent terminal; skip them when the `CURSOR_AGENT` variable is set.
- Run `vando doctor` in your own terminal: it says what is wrong and the command that fixes it.
- If a `vando` command stops, relay what it says; the line ends with a link to [the errors reference](https://getvando.com/docs/reference/errors).

## Sources

What this page is written from:

- [Cursor: rules](https://cursor.com/docs/context/rules)
- [Cursor: MCP](https://cursor.com/docs/context/mcp)
- [Cursor: run modes and sandbox](https://cursor.com/docs/agent/security/run-modes)
- [Cursor: sandbox.json](https://cursor.com/docs/reference/sandbox)
- [Cursor: CLI permissions](https://cursor.com/docs/cli/reference/permissions)
- [Cursor: cloud agents](https://cursor.com/docs/cloud-agent/setup)
