Thunderbird MCP
Give your AI assistant full access to Thunderbird -- search mail, compose messages, manage filters, and organize your inbox. All through the Model Context Protocol.
Inspired by bb1/thunderbird-mcp. Rewritten from scratch with a bundled HTTP server, proper MIME decoding, and UTF-8 handling throughout.
Why?
Thunderbird has no official API for AI tools. Your AI assistant can't read your email, can't help you draft replies, can't organize your inbox. This extension fixes that -- it exposes 49 tools over MCP so any compatible AI (Claude, GPT, local models) can work with your mail the way you'd expect.
Compose sends and event/task creation require review by default because Block skipReview starts enabled. skipReview: true is honored only after you explicitly disable that safety setting. The same block refuses saveDraft with sendAt for scheduled delivery through Send Later; plain drafts remain available. Re-enabling the block does not cancel already scheduled drafts. While enabled, meetings with attendees other than the calendar user are read-only through MCP, and adding attendees is blocked: calendar servers can email invitations, updates, or cancellations without review. Automatic Forward/Reply filter actions have a separate opt-in, disabled by default.
How it works
stdio HTTP (localhost:8765-8774)
MCP Client <-----------> Bridge <---------------------> Thunderbird
(Claude, etc.) mcp-bridge.cjs Extension + HTTP Server
The Thunderbird extension embeds a local HTTP server with session-scoped auth tokens. The Node.js bridge translates between MCP's stdio protocol and HTTP, discovering the port and token automatically via a connection file. The bridge handles MCP lifecycle methods (initialize, ping) locally, so clients can connect even before Thunderbird is fully loaded.
The bridge starts when executed directly or loaded by a desktop client's Node bootstrap. Tests or library consumers that only need its exports must set THUNDERBIRD_MCP_NO_AUTOSTART=1 before requiring mcp-bridge.cjs.
What you can do
| Tool | Description |
|---|---|
listAccounts |
List all email accounts and their identities |
listFolders |
Browse folder tree with message counts and isFavorite in object or table format. Filter by account, subtree, or favoritesOnly: true; favorites nested under ordinary folders are included. |
searchMessages |
Search by subject, sender, recipient, body preview, date range, or tags. Multi-word queries are AND-of-tokens (every word must appear somewhere). Prefix with from:, subject:, to:, or cc: to restrict to one field. Set searchBody: true for full-text body search via Thunderbird's Gloda index. Supports includeSubfolders, countOnly, and offset-based pagination. Results include threadId and preview snippet. By default, dedupByMessageId collapses the same RFC Message-ID found in multiple folders/labels into one row and reports the other folder paths in dupLocations; set dedupByMessageId: false to return every location. Rows show the first 3 recipients and first 3 Cc addresses, each followed by (+N more) when shortened; fullRecipients: true returns the full lists. |
getMessage |
Read full email content -- bodyFormat: markdown (default), text, or html. Set rawSource: true for the complete RFC 2822 source (all headers + MIME parts). Optional attachment saving. Set includeInlineImages: true to append supported inline CID images as MCP image blocks (PNG, JPEG, GIF, or WebP; max 1 MiB base64 per image and 4 MiB total). Skipped images are reported in attachment metadata. |
getMessages |
Read full email content for up to the configured batch limit in one call (default 10, max 20). Uses the same bodyFormat, rawSource, and attachment options as getMessage; each item supplies messageId and folderPath. |
getMessageHeaders |
Read one message's headers by messageId and folderPath, without parsing its body. Includes decoded Cc, raw references, parsed parent inReplyTo, size, numeric threadId, read/flagged state, and tags. |
batchGetMessageHeaders |
Read headers for up to 200 IDs in one folder. Returns an ID-keyed headers map with per-ID errors; incomplete lookups carry notScanned rather than establishing absence. |
searchAttachments |
Find messages by attachment filename substring and/or Content-Type prefix. Searches complete local messages up to 16 MiB of raw MIME within structure and work limits, never decrypts, and reports omissions. Returns messages with shared headers, folderPath, and matching attachment names, declared types, decoded sizes and dispositions. |
getRecentMessages |
Get recent messages with date, unread, and tag filtering. Supports pagination. Results include threadId and preview; recipient lists are capped like searchMessages rows unless fullRecipients: true. |
refreshFolder |
Refresh an individual IMAP, built-in Exchange (EWS/Graph), or Owl folder. Reports counts, completion status, and whether a successful server update was confirmed. Account roots are refused. |
displayMessage |
Open a message in Thunderbird's GUI -- 3pane (default), tab, or window mode |
updateMessage |
Mark read/unread, flag/unflag, add/remove tags, move or copy between folders, or trash -- supports bulk via messageIds. copyTo preserves the source and can add a Gmail label. |
deleteMessages |
Delete messages -- drafts are safely moved to Trash |
createFolder |
Create new subfolders to organize your mail |
createVirtualFolder |
Create a saved search over accessible real folders without moving or copying mail. Existing folder names or storage aliases, Windows short-name patterns, special root names, hidden servers, and unsuitable parents are refused. |
listVirtualFolders |
List saved searches with account keys, scope, and conditions. Omit the entire view if any scope is inaccessible, hidden, wildcard, unresolved, or unreadable. |
deleteVirtualFolder |
Detach a saved-search view and clean inspected storage nonrecursively. Refuse real folders, subfolders, own headers, regular backing files, shared, linked, nonempty or unreadable storage. Partial results list retained paths and persistence status. |
renameFolder |
Rename an existing mail folder |
deleteFolder |
Delete a folder (moves to Trash, or permanently deletes if already in Trash) |
moveFolder |
Move a folder to a new parent within the same account |
emptyTrash |
Permanently delete all messages in Trash (including subfolders) |
emptyJunk |
Permanently delete all messages in Junk/Spam (including subfolders) |
getMessage and getMessages read messages up to 50 MiB, retrieving IMAP messages online when no complete offline copy is available. Other providers need readable local message content. Each request has a 120-second budget, shared by all items in a batch; synchronous Thunderbird operations can delay timeout handling. Raw-source batches have a 50 MiB aggregate source limit; structured batches have a 50 MiB output limit. Results explicitly identify messages that timed out, exceeded the remaining output budget, or were not attempted. Unreadable or oversized messages return an error rather than partial content.
searchAttachments accepts nameContains and contentType, both case-insensitive; provide at least one, and both must match when supplied. Omit folderPath to search accessible accounts' Inboxes. maxResults defaults to 50 and is capped at 200; scanCap defaults to 5,000 and is capped at 50,000 messages per folder. The attachment flag is a heuristic: messages without it are not inspected. Collection visits native message keys in reverse order, keeps at most maxResults × 4 candidates per folder, then selects at most that many across folders by date. Returned matches are sorted by date within that inspected subset, which need not include the mailbox's newest messages.
Attachment searches use a shared 20-second budget and yield between candidates. Each candidate must have a complete local snapshot and pass strict raw MIME checks; attachment metadata is extracted from those same bytes without Gloda, a message URI or another stream. Snapshots over 16 MiB of raw MIME, including encoded attachments, are skipped as tooLarge. A cheap structural preflight runs before classification; tooComplex counts candidates exceeding 256 MIME entities (including the root and embedded-message roots), nesting depth 10, 64 KiB of headers per entity and 256 KiB total, 300,000 logical line breaks, or 32 MiB of aggregate traversal/decoding work. Each entity charges its full raw length, so nested bodies count repeatedly; quoted-printable bodies charge three additional lengths to bound decoding cost. These limits can omit complex messages below 16 MiB. Extraction also yields while walking parts and counting encoded payload sizes.
Remote messages without Thunderbird's Offline flag are counted in notOffline and never downloaded. Enable offline use and sync the folder before retrying. getMessage can separately fetch an individual uncached IMAP message within its own limits; doing so does not make an attachment search complete. Native database, storage and synchronous classification work can delay the best-effort deadline.
Search never decrypts, even with encrypted-message access enabled. Encrypted, opaque-signed, ambiguous or otherwise unverifiable contents are withheld. Top-level signed mail is also withheld while the opt-in is off; with it on, strictly verified clear-signed mail may be searched. No later native MIME tree can replace the checked contents. Access, message identity and privacy settings are rechecked before publishing.
Matching attachments are MIME leaf parts with a filename or attachment disposition, plus whole attached messages (message/rfc822, message/news, or message/global). Named inline images and named text parts qualify, including singlepart messages. Attached-message contents are not flattened; detached signatures inside multipart/signed and unnamed inline parts are omitted. MIME defaults apply when a type is absent. Unlike Gloda, search uses declared/default MIME types and decoded header filenames only: it does not infer types or names, invent names for unnamed attachments, or discover uuencoded/BinHex/yEnc attachments in body text. matchingAttachments entries have name (possibly empty), contentType, size (decoded bytes), and disposition (empty when absent). External-attachment stubs have size: null; their targets are never fetched.
The response always includes messages, totalScanned, candidates and truncated. Any observed omission sets truncated: true with an explanation. Nonzero counts distinguish protectedWithheld, tooLarge, tooComplex, notParsed (unavailable, failed, timed-out or unattempted candidates), notOffline, and scanFailures (failed or inaccessible folder scans). scanCapHit and candidateLimitHit identify collection limits; overflow counts inspected matches omitted by maxResults. A timeout is explained in the message. truncated: false means the flagged candidates in the scanned local snapshot were covered, not that every attachment in the mailbox was found. Attachment search was contributed by @JordanRO2 in #149.
Starting in 0.10.0, searchMessages and getRecentMessages shorten each recipient list by default to help choose which messages to read. Pass fullRecipients: true when enumerating participants or otherwise using complete address lists; omitted, false, or null values select summaries. getMessage, getMessages, getMessageHeaders, and batchGetMessageHeaders continue to return complete lists. Matching still uses the full headers, so a to: or cc: query can find an address beyond the three shown. A summary containing (+N more) is display text, not a complete address list.
Lists with at most three mailboxes and full-mode output keep their previous text, including any encoded Cc names. Longer lists are parsed from the original headers and rendered with decoded names; quoting and group labels may change. If parsing or rendering fails, that field keeps its full text and the message remains in the results. The cap therefore limits recipient count in successfully formatted summaries, not bytes in every response.
refreshFolder returns status: "loaded" when Thunderbird reports loading; updateConfirmed: true additionally means a folder-update URL reported success. An unconfirmed first load, including a native busy update or synchronous "No update ran" notification, gets one trailing update within the caller's remaining timeout. Concurrent callers share that update without extending their individual deadlines. The final outcome can still be unconfirmed, fail or time out; generic providers that expose only loaded events cannot confirm server success. netMessageDelta is the net count change during this call, not a count of arrivals. Account roots, saved searches and no-select folders are refused; individual local, POP, RSS and news folders are skipped.
getMessageHeaders and batchGetMessageHeaders accept the id returned by getMessage or searchMessages, with optional surrounding angle brackets. Returned id values preserve Thunderbird's stored spelling and case, normally without brackets; batch map keys preserve the caller's input. inReplyTo is the last parsed reference without brackets, or an empty string when there is no parent. Thunderbird stores In-Reply-To in its references field when a References header is absent. To pass a non-empty parent ID to saveDraft, wrap it in angle brackets; References must be space-separated bracketed IDs within saveDraft's limits. To draft a reply to the fetched message itself, use <id> as inReplyTo and append <id> to its returned references chain. The raw references string is preserved, so malformed or oversized chains may need correction before saveDraft accepts them.
Header lookups first use the folder's Message-ID index. Misses share one cooperative fallback scan with a best-effort 20-second budget, including when an index entry is missing for a surviving duplicate. A completed scan can establish "not found in this folder"; an incomplete scan reports notScanned, and batch results also include truncated: true and a message. Verify folderPath before retrying: an ID may belong to another folder, and requesting fewer IDs does not generally reduce the work for an absent ID. Batch total counts requested IDs including duplicates, while failed counts distinct error keys. Account access is rechecked after yields; disabling encrypted-message access during the scan also withholds previously collected protected subjects. These tools do not parse message bodies, but may read up to 16 KiB of stored outer headers per protected subject. Native database/index operations and key snapshots are synchronous, so the budget cannot interrupt them.
A saved search is a live view in Thunderbird's folder pane. Its message counts populate after it is first opened. MCP message tools read folder storage, not saved-search results; use searchMessages on the source folders for retrieval. Saved searches cannot be move/copy destinations or parents for createFolder/moveFolder.
deleteVirtualFolder checks both the database and raw storage. An mbox backing path must be absent or Thunderbird's empty directory placeholder with no entries at all; a maildir may contain only empty cur/tmp directories; the folder's .sbd directory must be absent or empty. Regular backing files, even zero-byte files, are refused because nonrecursive file removal could still discard mail appended after inspection. Storage shared with another registered folder is refused, including hidden and restricted accounts. Ownership checks also refuse unreadable storage and links in registered storage paths or their ancestors. Unexpected contents, unsupported storage types, and the experimental Panorama backend are refused.
Deletion detaches the view once without deleting storage, saves the updated saved-search list, and removes only inspected items with nonrecursive removal. A directory that gains contents is retained. A complete result has viewRemoved: true, persisted: true, cleanupComplete: true, and partial: false. A failure after detaching returns partial: true, viewRemoved: true, persistence status, and leftoverStorage paths; an unreadable final state lists paths that could not be verified as absent. Do not retry deletion after the view has been removed. Review retained storage manually: it may be rediscovered as a folder after restart, and a persistence failure may restore the saved search itself.
createVirtualFolder uses the same condition vocabulary as createFilter. booleanAnd: true means AND with the previous term; false means OR (default true). Use the same value for all conditions when editing the view through Thunderbird's single all/any choice. Supply individual real folders, not account roots or other saved searches; duplicate folders are searched once. Names containing ~ followed by a digit are refused on every platform because they can address existing folders through Windows short-name aliases. Storage identities are also checked before configuring the view. Address-book conditions (isInAB/isntInAB) require Allow all address books while account restrictions are active. A failed native creation can leave an empty folder; the tool never deletes a folder to undo a failed creation.
searchMessages scans cooperatively with a best-effort 20-second budget. Header searches collect and sort matches before pagination, including those beyond 10,000; only the returned page loads full result fields. countOnly returns a best-effort count of currently resolvable, non-expunged collected candidates, respecting dedupByMessageId and including candidates beyond the requested page. It rechecks candidates cooperatively without loading result content. If the deadline cuts that recheck short, only validated candidates count and the response reports truncated: true; the count can be zero if collection already used the budget. Counts need not equal a page's length or totalMatches, which describes collected candidates before page hydration. Folders can change during a search, even if no truncation is reported. Opening a native database and taking its key snapshot are synchronous and cannot be interrupted by this budget.
Scoped header searches may wait up to 5 seconds for the named folder's sync, within the same 20-second search budget. This wait applies only to the explicitly named, selectable IMAP folder; account roots, saved-search (virtual) folders, no-select folders and non-IMAP folders do not wait. Each page or count request has one bounded wait, which can include one shared trailing update after an unconfirmed load, as with refreshFolder. A native update already in progress may have an older server snapshot; searches await the trailing update before scanning, while their budget allows. Unscoped searches and descendant scans keep their background IMAP refresh and use the locally available cache. searchBody uses Gloda without requesting or awaiting a folder refresh; a folder sync does not establish Gloda index freshness.
Count and paginated responses can include folderRefresh, containing the final refresh outcome: status (loaded, timeout or error), joinedInFlight, and optional updateConfirmed, warning and error fields. Only updateConfirmed: true confirms a successful server update. Offline calls still return promptly with cached results. A trailing update that cannot finish in time or again reports "No update ran" does not claim freshness. Unconfirmed refreshes retain the usual background refresh fallback. This freshness outcome is separate from scan completeness: a complete scan of the cache need not be truncated because its refresh was unconfirmed. Plain-array responses remain unchanged and carry no refresh metadata.
Message results remain a plain array when offset is omitted or null, including incomplete searches and searchBody: true. To receive completeness information, provide offset: 0 (or another offset) for a paginated object. Only object responses can include truncated: true and a message explaining why; countOnly retains its existing object response and can also include these fields. Partial counts and totalMatches cover only observed matches, and date ordering covers only that subset. hasMore describes additional pages within the collected results and becomes false at their end, even if truncated is true; an empty returned page also sets it false. To improve coverage, narrow the folder, date range, or query (or set includeSubfolders: false).
For searchBody: true, object responses are conservatively marked truncated: true: Gloda returns candidates ranked by relevance and exposes no reliable completeness indicator. It applies its limit before removing stale index rows, so even a short result can omit other matches. Plain-array responses carry no completeness information. Narrowing the text query improves coverage; use header search when header/preview matching is sufficient.
updateMessage takes tag keys, not display labels: for example, addTags: ["my=20project"] uses a key generated for a label with a space. Keys must be non-empty printable ASCII without spaces, parentheses, brackets, braces, %, *, double quotes, backslashes, <, >, or ;. This follows Thunderbird's keyword handling, including its extra restrictions beyond RFC 3501 atoms. = and legacy modified UTF-7 keys containing & are accepted. Invalid entries in either addTags or removeTags fail the entire call with an error naming those entries before any messages are changed.
Use copyTo: "<destination folder URI>" to copy without removing the original. On Gmail, copying from Sent Mail to a project folder adds that label while preserving Sent Mail and existing labels. copyTo, moveTo, and trash: true are mutually exclusive. Both source and destination must be accessible. Copies and moves within or across accounts use the same Thunderbird native copy service call. On IMAP, completion is asynchronous and later failures are not reported back; success means only that the operation was submitted, so verify the destination. Tags applied together with a copy or move may not transfer on IMAP; verify the destination tags as well.
Message body formats (getMessage and getMessages):
markdown(default) converts HTML to visible structure, allowing onlyhttp:,https:, andmailto:link destinations. Other HTML links become their visible text. HTML images become alt text (or nothing); their source URLs are omitted. Text nodes and alt text escape backslashes, backticks, brackets, angle brackets, and!before[to prevent literal links, images, or raw HTML. A literal!immediately before a generated link is also escaped, including across element boundaries. Other punctuation (including underscores, asterisks, hashes, pipes, and tildes) is preserved; HTML code spans and blocks use code formatting.- For plain-text MIME bodies,
markdownescapes Markdown image openers (![) while preserving the rest of the text, apart from the existing invisible-character removal. This also applies to coerced text and raw-MIME recovery. Other Markdown, links, and literal HTML in plain-text bodies are not sanitized; clients must disable raw HTML and remote-content loading when rendering untrusted message text. textextracts visible text. Both text formats remove hidden HTML content and invisible control characters.- For
textandmarkdown, HTML input over 2 MiB (UTF-8) is truncated at a Unicode character boundary before being parsed with the same HTML privacy rules. The output ends with[Message body truncated at 2 MiB]. Content after the cut is omitted; retained content keeps the normal formatting and link rules. Oversized compose fragments use the same capped parsing path. Encryption checks inspect the full source: oversized HTML containing-----BEGIN PGP MESSAGE-----anywhere is withheld unless encrypted-message access is enabled, even when the marker is only quoted in prose. htmlreturns the original HTML unchanged. It is untrusted and may contain hidden content, scripts, unsafe links, and remote images; clients must sanitize it before rendering.rawSource: truealso remains unchanged.
Structured MIME extraction keeps the first body's representation outside multipart/alternative and joins later fragments of that same type in message order, including after inline attachments. A footer of another type cannot replace the main body. Alternatives select the requested representation; attached text files are excluded using Thunderbird's attachment metadata. Encryption checks also classify the joined content before exposing it.
includeInlineImages: true is a separate opt-in for supported inline CID images as MCP image blocks; it does not add image URLs to the Markdown body.
Compose
| Tool | Description |
|---|---|
sendMail |
Compose a new email -- opens a review window; direct sending requires explicitly disabling the skipReview safety block |
dryRunCompose |
Read-only sendMail preflight with the same arguments and first refusal: resolves identity, counts effective recipients, inspects attachments, and assesses encoded size. Requires sendMail enabled |
saveDraft |
Save a new or replacement draft without opening a window; supports threading headers, optional delayed delivery through Send Later (sendAt), and reports an accessible Drafts folder |
replyToMessage |
Reply with quoted original and proper threading -- skipReview is subject to the same safety block; saveAsDraft saves the threaded reply to Drafts without sending |
forwardMessage |
Forward with all original attachments preserved -- skipReview is subject to the same safety block |
sendMail, replyToMessage, and forwardMessage open a window for you to review and edit before sending by default. The Block skipReview preference is on by default, so skipReview: true is rejected until you explicitly disable the preference. The block also rejects saveDraft with sendAt. Direct sends and scheduled drafts are subject to the identity encryption checks under Send Safety. Attachments can be file paths or inline base64 objects.
Direct sends go through Thunderbird's compose pipeline without opening a window, so provider senders such as Owl apply. The selected identity's Reply-To, automatic Cc/Bcc, return receipt, delivery status notification (DSN), and vCard settings apply too. Automatic Cc/Bcc addresses are not echoed; dryRunCompose includes them in its recipient counts.
Use dryRunCompose before sendMail to check the add-on's preparation without sending, saving, opening a window, creating native attachments, or writing/removing files. It takes the same arguments (including identity-based isHtml defaults) and reports the same first preflight refusal. This is not an SMTP or provider delivery check and does not predict other Thunderbird prompts or later changes to settings/files.
The report includes resolvedIdentity: { id, email, name }, effective parsed-mailbox counts in recipients (including enabled automatic Cc/Bcc; empty groups do not count), and metadata for caller attachments only in attachments. inputBodyLength counts UTF-16 code units in the supplied body. estimatedEncodedBytes, when available, is a conservative byte estimate including prepared formatting/signature, headers, identity-added content such as a vCard, and encoding overhead; it is not the input length or an exact MIME size. An unbounded estimate is null. Size concerns are blockers for a dry direct send and warnings for a dry review window. No subject or signature-setting echo is returned. sendAt remains exclusive to saveDraft.
Allowed unreviewed sends, including Send Later deliveries, are never encrypted or cryptographically signed, including for identities set to sign by default. The text signature controlled by includeSignature is separate from cryptographic signing. Use skipReview: false for the review window, where Thunderbird applies its own encryption and signing decisions.
Direct sends report success only after delivery succeeds, and Thunderbird marks originals replied or forwarded. If Thunderbird's 120-second send timeout expires, the outcome is unknown: check Sent and the Outbox before retrying. The bridge waits 150 seconds for direct sends, draft saves, getMessage, getMessages, and displayMessage, and 30 seconds for other calls. A timeout or lost connection after submitting a mail operation also reports an unknown outcome; check Sent/Outbox for sends or Drafts for saves before retrying.
An explicit isHtml: true or false selects HTML or plain-text composition. Omitted or null uses the identity's compose-format preference, treating the supplied body as plain text. Concurrent review calls keep their own bodies, recipients, and attachments. Native forward reviews open in sequence until each window is identified. If an opening fails or times out before identification, the queue recovers automatically when that window initializes or closes, or after a 15-second recovery period. Late windows are left untouched and cannot receive another call's content.
replyToMessage accepts saveAsDraft: true to build a native reply with quoted text, the identity's signature and threading headers, save it, and close the compose window without sending. This requires the saveDraft tool to be enabled and cannot be combined with skipReview. Protected or unverifiable originals require a review window, even with encrypted-message access enabled. Before saving, the current compose identity's configured destination must be accessible under account restrictions and carry the Drafts flag. A timeout or revoked access during saving returns saveOutcome: "uncertain": the outstanding save may still complete, so check Drafts before retrying. Failures and timeouts restore the window's prior close and save-dialog behavior.
saveDraft supports these optional parameters:
sendAt: schedule delivery through Send Later using an ISO 8601 date-time. RequiressendMailenabled and BlockskipReviewoff, and obeys the identity encryption checks. Omit it or passnullfor a plain draft. See Delayed delivery for prerequisites and cancellation.inReplyTo: one bracketed Message-ID such as<original@example.com>.references: up to 100 such IDs, oldest first, separated by single ASCII spaces. Each ID is limited to 998 characters and the full References value to 16,384. Missing brackets, extra tokens, whitespace inside IDs, and control characters (including CR/LF) are rejected, never repaired. References defaults toinReplyTowhen omitted, and may also be supplied independently. The caller supplies the subject and quoted text.replaceMessageIdandreplaceFolderPath: replace an existing draft with the supplied content. The folder must be accessible under account restrictions, carry Thunderbird's Drafts flag, and match the selectedfromidentity's configured drafts folder. Other folders and missing messages are rejected before saving. Supply all fields and attachments you want retained; content is not merged from the old draft.includeSignature: append the identity's signature, defaulting totruefor a new draft andfalsefor a replacement so re-saving a fetched draft does not duplicate its signature. Set it explicitly when needed.sendMailwithskipReview: trueaccepts the same option, defaulting totrue; review windows use Thunderbird's own signature preferences. The separator honors the identity's "suppress signature separator" setting and is omitted when a separator line already exists in the signature's plain-text rendition. Signature files are limited to 1 MiB; missing, unreadable, oversized, or image signature files are omitted without falling back to inline signature text.
On success, saveDraft returns folderPath when Thunderbird exposes the destination and that folder is accessible under account restrictions. Otherwise the save still succeeds without disclosing the folder URI. It does not return the saved message's ID; look up the draft in the returned folder when available.
Delayed delivery with Send Later
When the Send Later add-on is installed, saveDraft accepts sendAt, an ISO 8601 date-time (2027-02-01T10:00 is read as local time; Z or an explicit offset such as +02:00 are accepted). The draft carries the X-Send-Later-At and X-Send-Later-Uuid headers, and Send Later handles delivery without a review window. The result returns sendAt in UTC, at the same one-second precision as the saved header. Success confirms the draft was saved, not that it has been delivered.
Scheduling is refused before saving, signature processing or attachment preparation unless every condition holds:
- Block
skipReviewis off andsendMailis enabled. A scheduled draft is an unreviewed send. - At least one To, Cc or Bcc mailbox is supplied. Empty address groups are refused; Cc-only and Bcc-only schedules are supported.
- The selected identity passes the unreviewed-send encryption checks. Required encryption, automatic encryption for a configured key/certificate, or unreadable encryption settings refuse scheduling. Signing by default alone does not refuse it; scheduled deliveries remain unsigned. Omit
sendAtfor a plain draft, or usesendMailwithskipReview: falsefor Thunderbird's encryption and signing in the review window. - Send Later recently answered. Its readiness is refreshed at startup and every minute, with a ten-second timeout. Failed or timed-out refreshes clear readiness; superseded and late answers are ignored. Information older than three minutes is unavailable for scheduling.
- Send Later's delivery options are on: both "send scheduled drafts" and "send unsent messages", with a check interval above zero.
- The date is valid and at most 366 days ahead. Impossible calendar dates and local times in daylight-saving gaps are refused. Supply an explicit offset to distinguish repeated fall-back times. A one-minute past-time tolerance accommodates clock skew; such a draft can be sent on the next check.
Thunderbird and Send Later must be running for delivery. After a restart, overdue drafts are subject to Send Later's late-delivery limit (48 hours by default); older drafts are held for rescheduling. Drafts in accounts deactivated in Send Later are not sent. Thunderbird MCP cannot detect that account setting through Send Later's external API. Servers that strip custom headers (Exchange through its IMAP gateway, Proton Mail Bridge) can prevent scheduling.
Before Send Later processes the draft, delete it to cancel, or replace it through replaceMessageId and replaceFolderPath with a new sendAt to reschedule. A replacement with omitted or null sendAt removes its scheduling headers. A preflight refusal leaves an existing draft unchanged, including its previous schedule. Re-enabling Block skipReview does not cancel already scheduled drafts. Disabling sendMail or changing identity preferences afterward also does not revoke them; these checks run when saving the schedule.
A timeout or lost connection after submitting the save has an unknown outcome. Check Drafts, Outbox and Sent before retrying a scheduled save to avoid duplicate delivery.
Compose tools validate the from identity strictly -- if the specified sender doesn't match any configured Thunderbird identity, the tool returns an error instead of silently substituting another account.