# Give GitHub Copilot in VS Code its own email address

GitHub Copilot in VS Code can have its own email address, such as
`ada@botmail.pro`. Paste one prompt to claim a Botmail mailbox, add Botmail's
MCP server to your `mcp.json`, and start it; VS Code opens the browser for
you to sign in. Copilot's agent can then check its inbox, reply in threads,
wait for mail and write drafts from chat.

## Why Copilot needs its own address

Copilot's agent already edits code and runs commands for you. With an inbox
it can also handle the email around that work:

- **Report results.** "Run the migration on staging and email the summary to
  the team lead" ends with a message from the agent's address, not yours.
- **Pick up requests.** It can read a teammate's bug report in its inbox,
  find the cause in your workspace and reply in the same thread.
- **Finish sign-ups.** It can register for a service you approve and read
  the verification code. See
  [verification emails](https://botmail.pro/guides/ai-agent-verification-emails).
- **Draft first.** It writes outreach as a draft and gives you a review link.

## 1. Claim a mailbox

Open the Chat view and paste:

```text
Read https://botmail.pro/skill.md and claim a mailbox for yourself. Send the invite to my email, then wait for me to approve it.
```

Copilot reads the instructions and runs a few terminal commands to solve a
small proof-of-work challenge; confirm them when VS Code asks. It asks for
your email if it doesn't know it. Open the email from Botmail, sign in with
GitHub or Google and accept. Unapproved mailboxes are deleted after 24 hours.

## 2. Add Botmail to VS Code

For every workspace, run **MCP: Open User Configuration** from the Command
Palette and add:

```json
{
  "servers": {
    "botmail": { "type": "http", "url": "https://botmail.pro/mcp" }
  }
}
```

The same block works in `.vscode/mcp.json` for a single workspace. You can
also run **MCP: Add Server** for a guided flow.

VS Code also reads the portable format, which other Copilot tools share. Put
this in `.mcp.json` at the workspace root, or in `~/.copilot/mcp-config.json`
for your user:

```json
{
  "mcpServers": {
    "botmail": { "type": "http", "url": "https://botmail.pro/mcp" }
  }
}
```

Note the different top-level key: `servers` in VS Code's own format,
`mcpServers` in the portable one.

### Start it and sign in

Click **Start** above the botmail entry in `mcp.json`, or run
**MCP: List Servers**, select botmail and choose Start. If VS Code asks
whether you trust the server, review the URL and confirm. Servers in a
trusted workspace's config skip this prompt.

On the first connection VS Code opens your browser to sign in. It registers
itself with Botmail automatically, so it shouldn't ask you for a client ID.

In chat, select **Configure Tools** to see botmail's tools and switch
individual ones on or off. VS Code may ask you to confirm each tool call.

### Use an API key instead

VS Code can prompt for a secret once, store it securely, and put it in a
header. Use the key your agent saved when it claimed the mailbox:

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

VS Code doesn't forward servers that use `${input:...}` to sessions running on
the Agent Host, so use OAuth if you run Copilot there.

## 3. Approve access

The Botmail page asks you to sign in with GitHub or Google, then shows:

- **Permissions:** Read mail, Send mail and Manage (mailboxes, keys, webhooks
  and settings).
- **Mailboxes:** all of them, including ones you create later, or only the
  ones you tick.

Press Allow and return to VS Code. You can revoke access at any time.

## Prompts to try

```text
Check my Botmail inbox for the bug report from Priya, find the cause in this workspace, and draft a reply explaining the fix. Give me the review link.
```

```text
Run the test suite. If anything fails, email the failing test names to you@example.com.
```

```text
Reply to the latest message in the Acme thread to confirm our new webhook URL is https://example.com/hooks.
```

```text
Sign up for the Acme sandbox with your Botmail address, wait for the confirmation email and finish the sign-up.
```

Ask for drafts when writing to someone new. Mail to new recipients is
checked for spam and phishing, and new accounts can email 25 new recipients a
day.

## Optional: install Botmail as a skill

Copilot in VS Code loads personal skills from `~/.copilot/skills/`, and also
from `~/.claude/skills/` and `~/.agents/skills/`. Botmail's
[skill.md](https://botmail.pro/skill.md) begins with skill front matter, so it works as-is:

```sh
mkdir -p ~/.copilot/skills/botmail
curl -s https://botmail.pro/skill.md -o ~/.copilot/skills/botmail/SKILL.md
```

## Troubleshooting

- **See what went wrong.** Run **MCP: List Servers**, select botmail and
  choose Show Output.
- **Sign in again or switch accounts.** Open the Accounts menu (bottom left)
  and use **Manage Dynamic Authentication Providers**, or run
  **Authentication: Remove Dynamic Authentication Providers**, then start the
  server again.
- **The tool list looks out of date.** Run **MCP: Reset Cached Tools**.
- **You declined the trust prompt by mistake.** Run **MCP: Reset Trust**.

Other editors are covered in [Email MCP server](https://botmail.pro/guides/email-mcp-server). New
to Botmail? Read [Email for AI agents](https://botmail.pro/ai-agent-email).

## Questions

### How do I add a remote MCP server to VS Code?

Run MCP: Open User Configuration and add the server under servers with type http and its URL, for Botmail https://botmail.pro/mcp. Use .vscode/mcp.json for one workspace, or the portable .mcp.json and ~/.copilot/mcp-config.json files with an mcpServers key.

### Does VS Code support OAuth for MCP servers?

Yes. When a remote MCP server needs sign-in, VS Code opens the browser on the first connection and registers itself automatically with servers that support it, such as Botmail.

### How do I sign out of an MCP server in VS Code?

Open the Accounts menu and choose Manage Dynamic Authentication Providers, or run Authentication: Remove Dynamic Authentication Providers from the Command Palette, then start the server again.

---

Source: https://botmail.pro/guides/vscode-copilot-email
Agent instructions: https://botmail.pro/skill.md
All guides: https://botmail.pro/llms.txt
