prawnwire Developers

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 Code
claude mcp add --transport http prawnwire https://mcp.prawnwire.com/mcp

In Cursor, add it to mcp.json:

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 401 and a WWW-Authenticate header whose resource_metadata points at its protected resource metadata (RFC 9728). That names the authorization server, https://accounts.prawnwire.com, whose metadata is at https://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 says client_id_metadata_document_supported. The document’s client_id must be its own URL exactly, token_endpoint_auth_method must be none or left out, and redirect_uris lists where codes may go. The server fetches it over https on the default port without following redirects, and keeps a copy for the document’s max-age, between one minute and a day.
  • Or register with dynamic client registration (RFC 7591).
  • Clients are public: no secret, and PKCE with S256 is required. Redirect URIs may be https, http on a loopback address, or your app’s own scheme. A loopback http redirect may use any port.
  • Scopes are mail:read, mail:compose, mail:write, calendar:read and calendar:write. Asking for a write scope also asks for its read scope, mail:write includes mail:compose, every connection reads mail, and asking for nothing asks for all five. The person may grant less than you asked for, so check the scope in the token response. Send the server URL as the resource parameter.
  • 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_health and explain_dns_check. With mail:compose as well: create_draft, update_draft and delete_draft. With mail: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_folder and delete_folder.
  • When a client initializes, the server sends instructions written for that connection’s access, under 2,048 characters. Its skills are served three ways: the list_skills and get_skill tools, with any scope; an MCP prompt named after each skill; and a text/markdown resource at prawnwire://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 a conversationId, which survive moves. Tools that take a folder and uid take a messageId instead, and the action tools also take a conversationId to act on every message of a conversation.
  • search_messages, search_conversations and list_drafts take 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: and in:, with OR, { }, - and parentheses. Without in: they search all mail but Trash and Junk. An operator Prawnwire cannot honour, such as is:important, is refused by name. Results page with nextCursor.
  • read_message and read_conversation take format (metadata, summary or full) and html: true for the HTML body, sanitized with remote content removed. Results that carry mail content say untrustedContent: true.
  • Sender tools: list_subscriptions with mail:read; unsubscribe, block_sender and unblock_sender with mail:write. unsubscribe uses 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. unsubscribe and block_sender ask the person to confirm first, and neither archives nor moves mail unless you pass archive or moveExisting.
  • Calendar tools: list_calendars, list_events, get_event and find_free_time with calendar:read; create_event, update_event, delete_event and respond_to_event with calendar:write as 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 org slug): 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_segments and get_newsletter_segment_count with mail:read; draft_newsletter_campaign with mail:write as 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 an Mcp-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 on DELETE /mcp; a 404 for a session means start a new one. The question arrives on the tool call’s own stream.

Search documentation

Type to search the documentation.