Connect your agent
Connecting MCP clients
Agent apps that support remote (Streamable HTTP) MCP servers with OAuth sign-in connect to your server’s MCP endpoint:
https://mail.example.com/mcpThe client discovers the authorization server, identifies itself (with a
client metadata document at an https URL, or by registering) and opens
the sign-in page in your browser. There you sign in with your mailbox:
Sign in with Microsoft or Sign in with Google, or your iCloud,
Fastmail or Yahoo address and an app password (the page explains how to
create one). After you connect, the client receives its tokens and
the mail tools appear.
Client menus change often. Look for these entries:
- Claude (web, desktop, mobile): Customize → Connectors, add a custom connector, then paste the URL.
- ChatGPT: turn on developer mode, then create an app with the URL and OAuth. Write actions depend on your plan.
- Grok: add your server’s URL ending in
/mcpas a custom (remote MCP) connector. See xAI’s connectors documentation. - Cursor: add the server to
~/.cursor/mcp.json. - VS Code (GitHub Copilot agent mode): MCP: Add Server → HTTP, then paste the URL.
- MCP Inspector (for testing):
npx @modelcontextprotocol/inspector, choose Streamable HTTP, enter the URL and use the OAuth flow.
Tips
- Clients that only support local (stdio) servers can connect through a
bridge such as
mcp-remote:npx mcp-remote https://mail.example.com/mcp. - Ask the assistant to confirm before it sends, replies or permanently deletes. The tools are annotated, and many clients ask for approval on their own.
get_webhook_status,set_webhook_enabledandset_webhook_outbox_limitsreport the new-mail webhook, turn it on or off, and set how long events are kept and how many, for the mailbox you signed in. They cannot change the webhook URL or its secrets; set those on the account page. If the status isunreadable, enter the URL and auth header again there; turning the webhook on is refused until you do. Outbox limits can still be read and changed. By default events are kept for 7 days and at most 1000 (delivered or not), up to 30 days and 10000.- To disconnect, remove the connector in the client. To cut off mailbox access, revoke the credential at the provider: delete the app password there (for iCloud Mail, at account.apple.com; Fastmail and Yahoo have their own app-password settings). Microsoft doesn’t let apps remove their own access, so remove postkeep at account.live.com/consent/Manage (personal accounts) or myapps.microsoft.com (work or school). For Google, remove postkeep at myaccount.google.com/permissions. Deleting the account on postkeep’s account page also tries to revoke that access at Google.