New: campaigns, automations and product emails in the same account. Meet Postal
Sign in Create account
EditorTested by usChecked on 10/28/2026

Connect GitHub Copilot to Postal

Use Postal in GitHub Copilot: in VS Code via OAuth, in the Copilot CLI and in the Copilot cloud agent with an API key.

How you sign in
Account or key
Transport
HTTP
Recommended access
Read and send
1

Before you start

Check these points before opening the GitHub Copilot setup. They prevent most connection failures.

  • A team with the "MCP server" plan feature (mcp_access); without it the server responds 403 plan_limit_reached.
  • To send emails, the team needs at least one verified domain.
  • If you will use an API key: create the key in the dashboard, under API keys. It starts with ps_; a send-only key is enough if you will only send.
  • Each connection acts on a single team. To use another team, connect again and pick the other one.
  • Connections are listed under Settings › AI connections in the dashboard, where they can be revoked at any time.

What GitHub Copilot requires

VS Code 1.99 or later with Copilot Chat in Agent mode (Visual Studio 17.14+, JetBrains, Xcode and Eclipse use an mcp.json with "url" and headers). In Copilot Business/Enterprise organizations the "MCP servers in Copilot" policy is disabled by default: an administrator must enable it. The cloud agent only uses tools (not resources or prompts) and does not support remote OAuth.

2

Connect

Follow the steps in order. The server address is always https://api.postal.so/mcp. Recommended path: sign in with your account (OAuth). The API key is the alternative. Wherever ps_... appears, use your own API key: the value shown is only an example.

  1. 1

    VS Code (Copilot Chat): create .vscode/mcp.json in the project (or run the "MCP: Add Server" command and choose HTTP) with the first block.

  2. 2

    Click Start above the server in the file; VS Code opens the Postal OAuth login. Choose the team and click Allow.

  3. 3

    In Copilot Chat, select Agent mode and check the tool list (MCP: List Servers).

  4. 4

    With an API key in VS Code, use the second block: VS Code asks for the key when it starts the server.

  5. 5

    Copilot CLI: run the command in the third snippet. Copilot cloud agent (GitHub): under the repository's Settings > Copilot > MCP servers, paste the JSON from the fourth snippet and create the secret (or variable) COPILOT_MCP_POSTAL_API_KEY in the repository's Agents settings (only names starting with COPILOT_MCP_ are available); this agent does not support remote servers with OAuth.

VS Code (OAuth)

.vscode/mcp.json
{
  "servers": {
    "postal": {
      "type": "http",
      "url": "https://api.postal.so/mcp"
    }
  }
}

VS Code (API key)

.vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "postal-api-key",
      "description": "Postal API key",
      "password": true
    }
  ],
  "servers": {
    "postal": {
      "type": "http",
      "url": "https://api.postal.so/mcp",
      "headers": {
        "Authorization": "Bearer ${input:postal-api-key}"
      }
    }
  }
}

Copilot CLI (API key)

Terminal
copilot mcp add --transport http --header "Authorization: Bearer ps_..." postal https://api.postal.so/mcp

Copilot cloud agent (API key)

Repository › Settings › Copilot › MCP servers
{
  "mcpServers": {
    "postal": {
      "type": "http",
      "url": "https://api.postal.so/mcp",
      "tools": [
        "list_domains",
        "get_domain",
        "list_emails",
        "get_email",
        "get_usage"
      ],
      "headers": {
        "Authorization": "Bearer $COPILOT_MCP_POSTAL_API_KEY"
      }
    }
  }
}
3

Access the tool needs

Postal splits access into three levels, explained in the scopes table. For GitHub Copilot:

Required
Read your datamcp:read

View emails, domains, contacts, segments, topics, templates, broadcasts, automations, forms, inbox conversations, metrics and usage.

Recommended
Send emails and eventsmcp:send

Send and schedule emails from verified domains and record events for automations.

Only if you want
Manage everythingmcp:full

Everything above, plus creating, changing and deleting contacts and templates, creating and sending broadcasts (send_broadcast requires confirm: true), canceling scheduled emails and working in inboxes (organize, reply, create drafts).

In VS Code, Copilot requests the scopes Postal announces (all three). For the cloud agent, which uses an API key, prefer a full_access key with the tools list restricted to read-only tools (the cloud agent uses tools without asking for approval) or a sending_access key if it only needs to send test emails.

4

How to confirm it worked

The simplest proof is to ask for something read-only inside GitHub Copilot itself. The connection also shows up under Settings › AI connections in the Postal dashboard, with the app, the team and the last use.

Illustrative example

List my domains on Postal.
I found 2 domains on the Aurora Cosméticos team: exemplo.com.br (verified) and loja.exemplo.com.br (verifying).

For those who want the technical proof

Terminal: tool list with an API key
npx @modelcontextprotocol/inspector --cli https://api.postal.so/mcp \
  --transport http \
  --header "Authorization: Bearer ps_..." \
  --method tools/list
34Tools expected with a full-access key

The Inspector proves that the Postal server responds. It does not test GitHub Copilot itself. The full walkthrough is in Validate the connection.

5

If something goes wrong

Go through the list in order. Then read what we know (and what we don't know) about GitHub Copilot.

Check

  • The address is exactly https://api.postal.so/mcp, with /mcp at the end.
  • The connection type is HTTP (Streamable HTTP). Postal does not offer SSE: if the tool gives you the choice, use HTTP.
  • The team has the "MCP server" feature on its plan. Without it, the server responds 403 plan_limit_reached.
  • To send emails, the team has at least one verified domain.
  • Each connection acts on a single team. To use another one, connect again and pick the other.
  • 429 response (rate_limit_exceeded): the plan's requests-per-second limit was reached. Wait a moment and try again.
  • If the tool complains about the response size, ask for smaller lists (at most 100 items per call; the default is 20).
  • To start over from scratch, revoke the connection under Settings › AI connections and connect again.

What was tested and what was not

Tested by usChecked on 10/28/2026

We ran Postal's automated tests with the real documents and callback addresses the app publishes, and with the official MCP SDK client. It is not a test inside the real application. Below is the full note on what was and was not verified.

Test details

Verified by test (VS Code): VS Code's real metadata document (https://vscode.dev/oauth/client-metadata.json, which also lists the device_code grant) is accepted, with the redirects http://127.0.0.1:33418 and https://vscode.dev/redirect; before 2026-10-28 this document was rejected because of the device_code grant (fix applied). API key in a header verified with the SDK and the Inspector (Copilot CLI and the cloud agent use the same path). The cloud agent JSON was built from the rules in GitHub's documentation (the page has no example with a secret in a header) and the VS Code one with inputs follows the VS Code documentation; neither was run in the real product.

Frequently asked questions

Do I need an API key to connect GitHub Copilot?

Not required. GitHub Copilot can sign in with your Postal account (OAuth) or with an API key. Recommended path: sign in with your account (OAuth). The API key is the alternative. The send-only key (sending_access) exposes only send_email and track_event.

Can I limit what GitHub Copilot does on my account?

In VS Code, Copilot requests the scopes Postal announces (all three). For the cloud agent, which uses an API key, prefer a full_access key with the tools list restricted to read-only tools (the cloud agent uses tools without asking for approval) or a sending_access key if it only needs to send test emails. You can revoke the connection at any time under Settings › AI connections.

Ready to use Postal in GitHub Copilot?

Create your account and connect. If you need help, talk to us through the contact form.