Connect an app
Add Postyard to your assistant, editor or platform, sign in, then choose the mailboxes it may use.
On this page
Before you start
Every app uses the same MCP server:
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.
| App | Where | OAuth sign-in | API key |
|---|---|---|---|
| Claude (web, desktop, mobile) | Customize > Connectors | Yes | Limited beta |
| Claude Code | claude mcp add | Yes | Yes |
| ChatGPT (web) | Plugins > Add custom MCP server | Yes | No |
| Cursor | mcp.json | Yes | Yes |
| VS Code (Copilot) | .mcp.json | Yes | Yes |
| Vercel Connect | Connect > Create Connector | Yes | Not for a server added by URL |
| n8n | MCP Client node | Yes | Yes |
Claude
On a Free, Pro, Max or Ultra plan (Claude's docs):
- Open Customize > Connectors.
- Select Add, then Add custom connector.
- Enter the name Postyard and the URL above, then click Continue.
- Keep the options marked Detected and click Add.
- 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
claude mcp add --transport http postyard https://api.postyard.dev/mcpThen type /mcp in Claude Code and sign in. With an API key instead:
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):
- Open Plugins, select the plus button, then Add custom MCP server.
- Enter a name. Under Connection, enter the URL above.
- For authentication, choose OAuth.
- Review the risk warning, tick I understand and want to continue, and select Create as a plugin.
- 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):
{
"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:
{
"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):
{
"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.
- In the Vercel dashboard, open Connect from your project and select Create Connector.
- Choose OAuth, keep Managed selected, and enter
https://api.postyard.dev/mcpas the server URL. - Name the connector
postyardand note its UID. - If you didn't open Connect from your project, run
vercel connect attachwith the UID, so your deployments can request tokens. - Put the UID in the environment variable
POSTYARD_CONNECTOR, and install@vercel/connect,aiand@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.
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
- Automation tools: n8n, Zapier, Gumloop, Lindy
- App builders: Voiceflow, Lovable, Bolt
- Agent SDKs: OpenAI Agents SDK, Claude Agent SDK, Strands Agents
- Voice agents: LiveKit, Vapi
- Any other MCP client: use the URL above with OAuth or a Bearer token
After you sign in
- In Postyard, open Agents & API > Connections.
- Find the app and click Choose mailboxes. Until you do, it reaches no mail.
- 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.