---
title: "GitHub Copilot"
description: "Connect VS Code agent mode to Unitpost with OAuth — approve in the browser. API key as fallback."
url: https://www.unitpost.com/guides/mcp/copilot
section: MCP
updated: 2026-08-28
---
# GitHub Copilot

## Connection settings

- **Server URL**: https://mcp.unitpost.com/mcp
- **Transport**: Streamable HTTP
- **Auth (recommended)**: OAuth 2.1 — add the URL, approve in the browser (scopes match API capabilities; tokens refresh automatically)
- **Auth (legacy)**: Authorization: Bearer pk_live_YOUR_KEY (workspace API key from Settings → API keys; for clients that can only paste a key)
- **Tools**: one per API operation (email_send, email_campaigns_send, …)

## GitHub Copilot

> Connect VS Code agent mode to Unitpost with OAuth — approve in the browser. API key as fallback.

Add the server URL and approve in the browser. If your setup needs a static key, VS Code prompts for it at runtime (never stored in the file).

### 1. Connect with OAuth (recommended)

Create or edit `.vscode/mcp.json` in your workspace (or MCP: Add Server from the Command Palette for a user-level entry) with the server URL below, then start it. No key to copy. Your client opens Unitpost in the browser — pick a workspace, approve the scopes, and you're connected. Tokens refresh automatically.

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

> VS Code tries HTTP streamable first, then OAuth on 401 (DCR). Official redirects we allow: `https://vscode.dev/redirect` and `http://127.0.0.1:33418`.

### 2. Start the server

Open the MCP view and start unitpost. Complete the browser approval, then confirm tools are listed. If it disconnects later, restart it here.

### 3. Send a test

In Copilot agent mode, ask it to send a test email from a verified domain and confirm in Unitpost Activity.

## Related

- [Gemini CLI](https://www.unitpost.com/guides/mcp/gemini): Connect the Gemini CLI to Unitpost — OAuth in the browser, or a key block.
- [Windsurf](https://www.unitpost.com/guides/mcp/windsurf): Connect Windsurf (Cascade) to Unitpost — OAuth in the browser, or a key block.
- [OpenCode](https://www.unitpost.com/guides/mcp/opencode): Connect OpenCode with OAuth — add the remote URL, approve in the browser.
