Connect an app

Add Postyard to your assistant, editor or platform, sign in, then choose the mailboxes it may use.

On this page
  1. Before you start
  2. Claude
  3. ChatGPT
  4. Cursor
  5. VS Code
  6. Vercel Connect
  7. n8n
  8. Other apps
  9. After you sign in

Before you start

Every app uses the same MCP server:

Text
https://api.postyard.dev/mcp
  • The transport is Streamable HTTP. The older SSE transport isn't supported.
  • Sign in with OAuth, or send an API key as Authorization: Bearer py_live_.... With OAuth the app registers itself, so there is no client ID or secret to create.
  • A new OAuth connection starts as Read and draft with no mailboxes. You choose them after you sign in.
  • No mailbox yet? Connect anyway. An account that isn't set up works on the demo mailbox, except in some clients.
AppWhereOAuth sign-inAPI key
Claude (web, desktop, mobile)Customize > ConnectorsYesLimited beta
Claude Codeclaude mcp addYesYes
ChatGPT (web)Plugins > Add custom MCP serverYesNo
Cursormcp.jsonYesYes
VS Code (Copilot).mcp.jsonYesYes
Vercel ConnectConnect > Create ConnectorYesNot for a server added by URL
n8nMCP Client nodeYesYes

Claude

On a Free, Pro, Max or Ultra plan (Claude's docs):

  1. Open Customize > Connectors.
  2. Select Add, then Add custom connector.
  3. Enter the name Postyard and the URL above, then click Continue.
  4. Keep the options marked Detected and click Add.
  5. If the connector shows Connect, click it and sign in with your Postyard account.

The Free plan allows one custom connector. On Team and Enterprise, an Owner adds it under Organization settings > Connectors (Add, then Custom), and each member clicks Connect.

Claude Code

Shell
claude mcp add --transport http postyard https://api.postyard.dev/mcp

Then type /mcp in Claude Code and sign in. With an API key instead:

Shell
claude mcp add --transport http postyard https://api.postyard.dev/mcp \
  --header "Authorization: Bearer py_live_..."

More options are in the Claude Code docs.

ChatGPT

On chatgpt.com, in a browser (OpenAI's help article):

  1. Open Plugins, select the plus button, then Add custom MCP server.
  2. Enter a name. Under Connection, enter the URL above.
  3. For authentication, choose OAuth.
  4. Review the risk warning, tick I understand and want to continue, and select Create as a plugin.
  5. Install the plugin, start a new chat, type @ and pick it.

OpenAI documents full MCP support, with write tools, for Business, Enterprise and Edu workspaces. Pro users can connect with read and fetch permissions only. In a Business workspace only admins and owners can create these plugins. ChatGPT has no field for an API key.

If your organization isn't set up, ChatGPT may show a message to finish setting up instead of the demo (setup_required).

Cursor

Add the server to ~/.cursor/mcp.json for every project, or to .cursor/mcp.json for one project (Cursor's docs):

JSON
{
  "mcpServers": {
    "postyard": {
      "url": "https://api.postyard.dev/mcp"
    }
  }
}

Cursor asks you to sign in. To use an API key from your environment instead, add a header:

JSON
{
  "mcpServers": {
    "postyard": {
      "url": "https://api.postyard.dev/mcp",
      "headers": { "Authorization": "Bearer ${env:POSTYARD_API_KEY}" }
    }
  }
}

Turn the server on or off from Customize in the sidebar.

VS Code

For the Copilot harness, put this in .mcp.json at the workspace root, or in ~/.copilot/mcp-config.json for every workspace (VS Code's docs):

JSON
{
  "mcpServers": {
    "postyard": {
      "type": "http",
      "url": "https://api.postyard.dev/mcp",
      "tools": ["*"]
    }
  }
}

Use Authenticate in the server's actions to sign in. For an API key, add "headers": { "Authorization": "Bearer ${POSTYARD_API_KEY}" } and set the variable in your environment. Don't put the key itself in a shared file. To start the guided set-up, run MCP: Add Server from the Command Palette.

Vercel Connect

Vercel Connect keeps the sign-in for each of your users and gives your deployed code a short-lived token. Vercel reads our OAuth metadata and registers the client for you.

  1. In the Vercel dashboard, open Connect from your project and select Create Connector.
  2. Choose OAuth, keep Managed selected, and enter https://api.postyard.dev/mcp as the server URL.
  3. Name the connector postyard and note its UID.
  4. If you didn't open Connect from your project, run vercel connect attach with the UID, so your deployments can request tokens.
  5. Put the UID in the environment variable POSTYARD_CONNECTOR, and install @vercel/connect, ai and @ai-sdk/mcp.

This route lists the tools for one user. It follows Vercel's AI SDK and MCP guide. If the user hasn't signed in to Postyard yet, it sends them there.

TypeScript
import { createMCPClient } from '@ai-sdk/mcp';
import { connectAuthProvider, ConsentRequiredError } from '@vercel/connect/ai-sdk';

const connector = process.env.POSTYARD_CONNECTOR!; // the UID Vercel shows for your connector

export async function GET(request: Request) {
  const userId = 'user_demo_123'; // take it from your own signed-in session
  let client: Awaited<ReturnType<typeof createMCPClient>> | undefined;
  try {
    client = await createMCPClient({
      transport: {
        type: 'http',
        url: 'https://api.postyard.dev/mcp',
        authProvider: connectAuthProvider(
          connector,
          {
            subject: { type: 'user', id: userId },
            scopes: ['profile', 'email', 'user:org:read'],
            resources: ['https://api.postyard.dev/mcp'],
          },
          { redirectUrl: new URL('/', request.url).toString() },
        ),
      },
    });
    const tools = await client.tools(); // pass these to streamText or generateText
    return Response.json(Object.keys(tools));
  } catch (error) {
    if (error instanceof ConsentRequiredError) return Response.redirect(error.url, 303);
    throw error;
  } finally {
    await client?.close();
  }
}

OAuth tokens work on the MCP server only. To call the REST API from a deployment, create a Postyard API key and store it as an environment variable.

n8n

Add the MCP Client node, enter the URL above as the MCP Endpoint URL, and sign in with the MCP OAuth2 credential or use a Bearer credential with an API key. The n8n guide has the steps, the AI Agent node, and a webhook trigger for new mail.

Other apps

After you sign in

  1. In Postyard, open Agents & API > Connections.
  2. Find the app and click Choose mailboxes. Until you do, it reaches no mail.
  3. Ask the app to list your mailboxes.

To let it send, an admin clicks Edit on the connection and picks Read, draft and send. Set a daily cap for it on the Quotas and limits page.

If something doesn't work, see troubleshooting or write to support.