# Connect VS Code Copilot to XgenPlus Mail

To connect VS Code, add the XgenPlus server to `.vscode/mcp.json` in your project, or to your user `mcp.json` with **MCP: Open User Configuration** from the Command Palette. Use the block below. VS Code asks for your token the first time the server starts and stores it securely, so the token is not written in the file.

## How to connect VS Code Copilot to XgenPlus Mail

1. Create your agent password and [make your token](/developers/mcp-make-a-token/).
2. Open `.vscode/mcp.json` in your project, or run **MCP: Open User Configuration** from the Command Palette.
3. Paste the block below and save.
4. Start the **xgenplus** server and paste your token when VS Code asks for it.
5. Open Copilot Chat in agent mode and check that the XgenPlus tools are listed.

## When to use it

> Meera, a developer at acme.in, asks Copilot to find the mail with the staging server change and draft a reply confirming the new date.

## Configuration

```json
{
  "inputs": [
    { "type": "promptString", "id": "xgenplus-token", "description": "XgenPlus MCP token", "password": true }
  ],
  "servers": {
    "xgenplus": {
      "type": "http",
      "url": "https://mcp.xgenplus.com/mcp",
      "headers": { "Authorization": "Bearer ${input:xgenplus-token}" }
    }
  }
}
```

## Good to know

- VS Code's file uses `servers`, not `mcpServers` as in other clients.
- Because the token is asked for at start-up, a project `mcp.json` like this is safe to share with your team. Each person enters their own token.

Source: https://docs.xgenplus.com/developers/mcp-vs-code/
