# Work from your editor

> Set Bash up, test it and ask it from your editor's chat: vestra mcp on your computer, or /v1/mcp from anywhere.

Your editor's agent can set Bash up, test it and ask it for you. Add `vestra mcp` to your editor once, then ask in plain words.

About 5 minutes. It uses [`mcp`](https://vestra.ai/developers/mcp.md), [`init`](https://vestra.ai/developers/init.md), [`test`](https://vestra.ai/developers/test.md).

## 1. Log in once

In a terminal, run `vestra login` with your test key ([quickstart](https://vestra.ai/developers/quickstart.md)).

**What happens:** Your key is saved on this computer, and `vestra mcp` uses it.

## 2. Add it to your editor

A stdio server: the command `vestra`, with the argument `mcp`. Cursor and Windsurf take this file as it is.

`mcp.json`:

```json
{
  "mcpServers": {
    "vestra": {
      "command": "vestra",
      "args": ["mcp"]
    }
  }
}
```

**What happens:** Your editor starts `vestra mcp` itself, and its agent sees Vestra's tools: `init`, `test`, `deploy`, `ask` and the rest.

## 3. Or in VS Code

VS Code reads `.vscode/mcp.json`, where the list is `servers` and each says its `type`.

`.vscode/mcp.json`:

```json
{
  "servers": {
    "vestra": {
      "type": "stdio",
      "command": "vestra",
      "args": ["mcp"]
    }
  }
}
```

**What happens:** The same tools, in VS Code's agent.

## 4. Set Bash up by talking

Ask your editor's agent: "Set up Vestra to answer Tripnest travellers' booking questions."

**What happens:** It calls `init`, brings you Bash's questions, and writes `vestra.yaml` into your folder.

## 5. Test it

Ask: "Run the tests."

**What happens:** It calls `test`, waits up to 45 seconds for the verdict, and reads you the reason for any failure.

## 6. Ship it to test mode

Ask: "Deploy it."

**What happens:** `deploy` runs on your computer with your key, and only ever to test mode. Going live is yours to type: `vestra deploy --live`.

## 7. Ask it

Ask as a traveller would: "Ask travel-help, as traveller-42, when my flight on TN-48213 leaves."

**What happens:** It calls `ask`. An approval is asked right in your editor, when your editor supports it.

## 8. Or connect from anywhere

Any MCP client can reach `/v1/mcp` with your key as a Bearer token: while in preview, on `api-staging.vestra.ai` ([`mcp`](https://vestra.ai/developers/mcp.md)). Cursor takes this file as it is; in VS Code, list it under `servers` with `"type": "http"`.

`mcp.json`:

```json
{
  "mcpServers": {
    "vestra": {
      "url": "https://api-staging.vestra.ai/v1/mcp",
      "headers": {
        "Authorization": "Bearer vk_test_your_key"
      }
    }
  }
}
```

**What happens:** The same tools, except `deploy`: shipping a version stays with you.

Next: [Going live](https://vestra.ai/developers/guides/going-live.md)
