Connect an AI agent
Let Claude, ChatGPT, Cursor or another MCP client read and send mail from one Prawnwire mailbox.
Prawnwire runs a hosted Model Context Protocol server at https://mcp.prawnwire.com/mcp. An agent connects to it like any remote MCP server and signs in through your Prawnwire account, so you never give the agent your password.
Add the server
Add the server URL wherever your client adds a remote MCP server. In Claude, that is a custom connector. In ChatGPT, open Plugins, choose +, then Add custom MCP server, enter the URL and choose OAuth for authentication; your plan or workspace admin decides whether custom MCP servers are allowed. In Claude Code:
claude mcp add --transport http prawnwire https://mcp.prawnwire.com/mcp In Cursor, add it to mcp.json:
{
"mcpServers": {
"prawnwire": {
"url": "https://mcp.prawnwire.com/mcp"
}
}
} Sign in and choose access
The client opens Prawnwire in your browser. Sign in with the mailbox the agent should use, check the app name and where it returns to, then choose what it can do with your mail and, if the app asked for it, your calendar. Both start at Read only.
Mail:
- Read only: list folders and tags; list, search and read messages and conversations; list drafts; download attachments; check DNS health.
- Read and draft: everything in Read only, plus write, change and delete drafts for you to review and send from Inbox. It can’t send, move or delete messages.
- Read and act: everything in Read and draft, plus send and reply, send drafts, answer invites, mark, tag, move and delete messages and whole conversations, report spam, and create, rename, move and delete folders.
Calendar:
- Off: the app cannot see your calendar.
- Read only: list your calendars and events, read an event with its guests, and find free time.
- Read and act: everything in Read only, plus create, change and delete events and answer invitations. Guests get invitations, updates and cancellations from your mailbox, marked as sent by an agent.
A connection reaches only the mailbox you signed in with and its calendar. If the app asked only to read, Read only is the one choice offered. A connection made before calendar access existed keeps mail only; connect the app again to give it calendar access. App names are supplied by the apps themselves: if the name or the address looks wrong, choose Cancel. Apps such as ChatGPT, Claude Code and VS Code publish their details on their own site, and Prawnwire shows that site, for example claude.ai. When an app returns to an app on this computer, connect only if you started the connection there.
What the agent learns
When an agent connects, Prawnwire tells it that this is your email and calendar, and more: which mailbox it works on, and what the connection can and cannot do. The agent then reaches for Prawnwire when you ask about your mail, your meetings or your schedule, even if you don’t say Prawnwire.
Prawnwire also gives the agent skills: short guides for common jobs, such as catching up on your inbox, finding mail, writing replies, scheduling meetings, unsubscribing, preparing a newsletter and checking your domain’s DNS. They come from the server, so they always match its tools, and an agent sees only the skills its access can use. Clients that show MCP prompts list them too; in Claude Code they are slash commands.
Limits
Three rules apply on top of the permission you chose:
- Attachments are sent inline as base64, up to 25 MB per message. A file path is refused.
- If your organization’s sending is paused or its sign-in is suspended, the agent is refused the same way Inbox is.
- Each connection may make 120 requests a minute.
Confirmations and untrusted mail
Apps that can show a confirmation ask you before the agent sends mail or a draft, answers an invitation, deletes messages, empties Trash or Junk, deletes a folder or a draft you wrote, or reports spam. If you decline, nothing changes. Apps that cannot ask run these actions straight away, as they always have; to send everything yourself, choose Read and draft.
Mail is written by its senders, and a message can carry instructions meant to mislead an agent that reads it. Prawnwire never fetches remote content for an agent and tells the agent that mail content is not a request from you, but give an agent the least access it needs.
Disconnect
Open Sign-in and security and choose Disconnect beside the app under Connected apps. Disconnecting stops future access; it cannot remove mail the app has already read.
A connection also ends when you sign out everywhere, change your password, or turn two-step sign-in on or off; when the same app connects again, since the new connection replaces the old one; and after 30 days without use. Apps that publish their details on their own site, such as ChatGPT, Claude Code and VS Code, keep each connection instead, so one app can be connected from several computers.
For client developers
- The server answers an unauthenticated request with
401and aWWW-Authenticateheader whoseresource_metadatapoints at its protected resource metadata (RFC 9728). That names the authorization server,https://accounts.prawnwire.com, whose metadata is athttps://accounts.prawnwire.com/.well-known/oauth-authorization-server(RFC 8414). - Identify your client with a Client ID Metadata Document: publish a JSON document at an https URL and use that URL as your
client_id. The authorization server metadata saysclient_id_metadata_document_supported. The document’sclient_idmust be its own URL exactly,token_endpoint_auth_methodmust benoneor left out, andredirect_urislists where codes may go. The server fetches it over https on the default port without following redirects, and keeps a copy for the document’smax-age, between one minute and a day. - Or register with dynamic client registration (RFC 7591).
- Clients are public: no secret, and PKCE with
S256is required. Redirect URIs may be https, http on a loopback address, or your app’s own scheme. A loopbackhttpredirect may use any port. - Scopes are
mail:read,mail:compose,mail:write,calendar:readandcalendar:write. Asking for a write scope also asks for its read scope,mail:writeincludesmail:compose, every connection reads mail, and asking for nothing asks for all five. The person may grant less than you asked for, so check thescopein the token response. Send the server URL as theresourceparameter. - Mail tools with
mail:read:list_folders,list_tags,list_messages,search_messages,search_conversations,read_message,read_conversation,download_attachment,list_drafts,check_dns_healthandexplain_dns_check. Withmail:composeas well:create_draft,update_draftanddelete_draft. Withmail:write:send_draft,send_message,reply_to_message,respond_to_invite,mark_message,tag_message,move_message,delete_message,mark_spam,mark_not_spam,empty_folder,create_folder,rename_folder,move_folderanddelete_folder. - When a client initializes, the server sends
instructionswritten for that connection’s access, under 2,048 characters. Its skills are served three ways: thelist_skillsandget_skilltools, with any scope; an MCP prompt named after each skill; and atext/markdownresource atprawnwire://skills/<name>. A connection is offered only the skills its scopes can use. - Every message a tool returns carries its
messageId(its Message-ID) and aconversationId, which survive moves. Tools that take afolderanduidtake amessageIdinstead, and the action tools also take aconversationIdto act on every message of a conversation. search_messages,search_conversationsandlist_draftstake a Gmail-style query:from:,to:,cc:,bcc:,subject:,deliveredto:,list:,rfc822msgid:,after:,before:,newer_than:,older_than:,is:unread,is:read,is:flagged,is:answered,tag:,has:attachment,larger:,smaller:,category:andin:, withOR,{ },-and parentheses. Withoutin:they search all mail but Trash and Junk. An operator Prawnwire cannot honour, such asis:important, is refused by name. Results page withnextCursor.read_messageandread_conversationtakeformat(metadata,summaryorfull) andhtml: truefor the HTML body, sanitized with remote content removed. Results that carry mail content sayuntrustedContent: true.- Sender tools:
list_subscriptionswithmail:read;unsubscribe,block_senderandunblock_senderwithmail:write.unsubscribeuses the best way the message offers (one-click, then email) and remembers it on the account as Inbox does; when the message only offers a web page, it answers with the page for a person to open.unsubscribeandblock_senderask the person to confirm first, and neither archives nor moves mail unless you passarchiveormoveExisting. - Calendar tools:
list_calendars,list_events,get_eventandfind_free_timewithcalendar:read;create_event,update_event,delete_eventandrespond_to_eventwithcalendar:writeas well. Every tool carries MCP annotations (readOnlyHint,destructiveHint,openWorldHint). - Newsletters tools, for people who are admins of an organization with Newsletters turned on (each takes the organization’s
orgslug):list_newsletter_orgs(the organizations you can use these tools for, with their slugs),list_newsletter_lists,list_newsletter_campaigns,get_newsletter_campaign_report,list_newsletter_segmentsandget_newsletter_segment_countwithmail:read;draft_newsletter_campaignwithmail:writeas well. It only creates or edits a draft: a person reviews and sends it in the Console. - Access tokens last one hour. Refresh tokens last 30 days and rotate on every use. A used refresh token presented again within a minute (a retry after a lost reply) gets a new pair as the first use did; a minute or more later it ends the connection.
- The transport is Streamable HTTP at
POST /mcp. A client that does not declare elicitation is served statelessly with JSON responses. A client that declares form elicitation when it initializes gets anMcp-Session-Id: its tool calls answer as an event stream, so the server can ask the person to confirm in the middle of a call. A session ends after 30 minutes without use or onDELETE /mcp; a404for a session means start a new one. The question arrives on the tool call’s own stream.