New: the MailCraft MCP server is live β€” connect your AI agent in one line. Connect your agent β†’
AI agents

GitHub Copilot

GitHub Copilot can use MailCraft in two places: Copilot Chat in your editor, and the Copilot coding agent that works on issues in your repository.

Prerequisites

  • A GitHub Copilot plan
  • Admin access to the repository (for the coding agent)
  • A MailCraft API key with the scopes you want the agent to have β€” create one under Settings β†’ API keys.

Setup

  1. 1

    In your editor

    Copilot Chat in VS Code, JetBrains IDEs, Visual Studio and Xcode reads the same MCP configuration. In VS Code, follow the VS Code guide; in other IDEs, add this to the Copilot MCP settings:

    mcp.json
    {
      "servers": {
        "mailcraft": {
          "type": "http",
          "url": "https://mcp.mailcraft.host",
          "headers": {
            "Authorization": "Bearer sk_live_your_api_key"
          }
        }
      }
    }
  2. 2

    For the coding agent: store the key as a secret

    In the repository go to Settings β†’ Environments β†’ copilot and add a secret named COPILOT_MCP_MAILCRAFT_API_KEY holding your key.

  3. 3

    For the coding agent: add the server

    Go to Settings β†’ Copilot β†’ Coding agent β†’ MCP configuration and add:

    MCP configuration
    {
      "mcpServers": {
        "mailcraft": {
          "type": "http",
          "url": "https://mcp.mailcraft.host",
          "headers": {
            "Authorization": "Bearer $COPILOT_MCP_MAILCRAFT_API_KEY"
          },
          "tools": ["*"]
        }
      }
    }

    The coding agent runs unattended, so give its key only the scopes it needs β€” "tools" can also list individual tool names, such as ["list_templates", "send_email"].

  4. 4

    Verify the connection

    In Copilot Chat’s agent mode, or in an issue assigned to Copilot, ask:

    copilot
    List all my MailCraft domains

Example prompts

Once connected, try asking GitHub Copilot:

  • Add an order-confirmation email using the "Receipt" template when checkout succeeds
  • Check our MailCraft templates and update the welcome email copy in the repo to match
  • List the webhooks registered on our MailCraft workspace

See every tool the agent can use in the MCP server reference.