---
title: "GitHub Copilot"
description: "Use the Unitpost MCP server with VS Code agent mode / Copilot MCP."
url: https://www.unitpost.com/guides/mcp/copilot
section: MCP
updated: 2026-07-24
---
# GitHub Copilot

## Connection settings

- **Server URL**: https://mcp.unitpost.com/mcp
- **Transport**: Streamable HTTP
- **Auth header**: Authorization: Bearer pk_live_YOUR_KEY (production key from www.unitpost.com)
- **Tools**: one per API operation (emails_send, campaigns_send, …)

## GitHub Copilot

> Use the Unitpost MCP server with VS Code agent mode / Copilot MCP.

Paste into `.vscode/mcp.json`. VS Code will prompt for the key at runtime (not stored in the file).

### 1. Create a production API key

Open https://www.unitpost.com → Settings → API keys → create a scoped key. Copy the full `pk_live_…` value (shown once). In every snippet below, replace `pk_live_YOUR_KEY` with that value.

> Must be production. Keys from unitpost.dev only work on the dev API. This MCP URL is production (`mcp.unitpost.com`) — a .dev key returns 401 Invalid API key on tool calls even if the server appears connected.

### 2. Open the MCP config

Create or edit `.vscode/mcp.json` in your workspace (or MCP: Add Server from the Command Palette for a user-level entry).

### 3. Paste this config

When VS Code prompts for the key later, paste only the `pk_live_…` value — not `Bearer ` (the config already adds it).

```json
{
  "inputs": [
    {
      "id": "unitpost-key",
      "type": "promptString",
      "description": "Unitpost API key (pk_live_…)",
      "password": true
    }
  ],
  "servers": {
    "unitpost": {
      "type": "http",
      "url": "https://mcp.unitpost.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:unitpost-key}"
      }
    }
  }
}
```

> Grant only the scopes the agent needs (e.g. `emails:send` for `emails_send`). Prefer a revocable key dedicated to the agent.

### 4. Start the server

Open the MCP view, start unitpost, enter your production key when prompted, and confirm tools are listed.

### 5. 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): Register Unitpost as an MCP server for the Gemini CLI.
- [Windsurf](https://www.unitpost.com/guides/mcp/windsurf): Register Unitpost as an MCP server in Windsurf (Cascade).
- [Generic / custom client](https://www.unitpost.com/guides/mcp/custom): Connect any MCP-compatible client or your own agent to Unitpost.
