# VS Code

Source: https://smartpdf.ru/en/developers/docs/vscode

The Copilot agent in VS Code connects MCP servers from `mcp.json`.

VS Code — .vscode/mcp.json (or MCP: Open User Configuration):

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

- VS Code asks for the key once and keeps it in secure storage.

- The tools are available in Copilot agent mode.

The file is `.vscode/mcp.json` in the project, or a global one (the **MCP: Open User Configuration** command). VS Code asks for the key once and saves it in secure storage. SmartPDF tools appear in agent mode.
