# Connect VS Code to FreshlyCited MCP

VS Code (Copilot agent mode) supports remote HTTP MCP servers with OAuth or headers.

## Install link

Open [Install FreshlyCited in VS Code](vscode:mcp/install?%7B%22name%22%3A%22freshlycited%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Ffreshlycited.com%2Fmcp%22%7D) or run:

```bash
code --add-mcp '{"name":"freshlycited","type":"http","url":"https://freshlycited.com/mcp"}'
```

VS Code asks you to sign in with OAuth the first time the server starts.

## .vscode/mcp.json (OAuth)

```json
{
  "servers": {
    "freshlycited": {
      "type": "http",
      "url": "https://freshlycited.com/mcp"
    }
  }
}
```

## .vscode/mcp.json with a prompted API key

VS Code prompts for the key once and stores it securely, so it never lands in the file:

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "freshlycited-key",
      "description": "FreshlyCited API key",
      "password": true
    }
  ],
  "servers": {
    "freshlycited": {
      "type": "http",
      "url": "https://freshlycited.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:freshlycited-key}"
      }
    }
  }
}
```

API keys are created under **API keys** in the FreshlyCited app and shown once. A key only sees its own workspace and the clients under it, with the key's role.

## Check it works

Ask: *"Call FreshlyCited's get_started tool."* You should see your workspace, role and credit balance. If the client says it can't connect, see [Authentication](https://freshlycited.com/docs/authentication) for what each error means.

---
Source: https://freshlycited.com/docs/clients/vscode
