← Back to guides

Set up AgentInbox with VS Code Copilot

Give your GitHub Copilot agent a real email address in under two minutes. Connect AgentInbox as an MCP server and start sending and receiving emails from Copilot Chat.

Prerequisites

  • 1. VS Code with the GitHub Copilot extension installed — version v1.250+ required for MCP support.
  • 2. Enable MCP in your VS Code settings:
"github.copilot.chat.mcp.enabled": true

Add via .vscode/mcp.json

Create a .vscode/mcp.json file in your project root:

.vscode/mcp.json

{
  "servers": {
    "agentinbox": {
      "type": "http",
      "url": "https://mcp.agentinbox.sh/mcp"
    }
  }
}

Save the file and reload VS Code. The server will be picked up automatically.

Or add via VS Code settings.json

Prefer a user-level configuration? Add the server to your VS Code settings.json:

settings.json

{
  "mcp": {
    "servers": {
      "agentinbox": {
        "type": "http",
        "url": "https://mcp.agentinbox.sh/mcp"
      }
    }
  }
}

This applies AgentInbox globally across all your projects.

Authentication

AgentInbox uses OAuth with auto-approve — no passwords, no signup forms.

  1. On first use, a browser tab opens briefly for OAuth authorization
  2. The authorization auto-approves instantly — no manual action needed
  3. The browser tab closes and VS Code stores the token locally
  4. Your agent is assigned a permanent email address (e.g. agent-b4a0@agent-mail.agentinbox.sh)
  5. All future connections reuse the stored credentials — fully automatic

Tip: Same credentials always map to the same agent identity and email address. No configuration needed.

Using AgentInbox with Copilot

Open Copilot Chat in Agent mode (@workspace) and ask your agent to use email. Here are some examples:

Send an email to hello@example.com

Check my inbox

What's my email address?

Copilot will automatically invoke the right AgentInbox tool — send_email, get_emails, or get_inbox_address — based on your prompt.

Alternative: API key

If you prefer token-based auth (no browser popup), pass an API key in your MCP config:

.vscode/mcp.json

{
  "servers": {
    "agentinbox": {
      "type": "http",
      "url": "https://mcp.agentinbox.sh/mcp",
      "headers": {
        "Authorization": "Bearer sk-your-api-key"
      }
    }
  }
}

Replace sk-your-api-key with your actual key. No browser popup required — fully headless.

Pricing

AgentInbox offers a generous free tier to get started.

PlanPriceEmails
FreeFree500 / month
Pro$5 / month10,000 / month