bes-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MAILATTIC_DB | Yes | Path to the local SQLite mailattic database that the global `bes` CLI and MCP server query (e.g. C:\path\to\mailattic.db). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| mail_searchA | Find message candidates by keyword and structured filters, returning a bare list of summary items or full-body items. Use mail_show for one stored id and mail_thread for a whole conversation or an RFC822 Message-ID string. keyword syntax: terms separated by spaces are ANDed; uppercase AND / OR / NOT, parentheses, and double-quoted phrases are honoured, and lowercase and/or/not are ordinary search terms. Results with a keyword are ordered by relevance, not by date, and each item reports match_field (subject, body, or null when the hit is in an indexed field this item does not show, such as recipients or attachment names) and match_in (new or quoted -- whether the hit the snippet shows is in the message's own new content or in its quoted history). snippet is centred on the hit when there is one, on the position covering the most of what was asked for. |
| mail_showA | Return one stored message object by integer stored id, including bounded body and collection fields. Use mail_search to find valid ids and mail_thread when the identifier is an RFC822 Message-ID string or the full conversation is needed. |
| mail_threadA | Return one conversation object with messages plus total/returned counts, using either a stored id or an RFC822 Message-ID string. Use mail_search to find identifiers and mail_show when you only need one stored message. |
| mail_contact_historyA | Return one aggregated correspondence-summary object for exactly one contact address or one domain. This is not a message search or thread tool; use mail_search, mail_show, or mail_thread for individual messages. |
| mail_attachmentsA | Return one attachment-metadata result object with attachment rows, totals, and bounded carrying-message summaries. This tool never returns attachment content bytes; use mail_search or mail_show for message content. |
| mail_sync_statusA | Report the state of the most recent synchronization run together with the timestamp of the newest stored message, in one response. Accepts no parameters and never starts or affects a synchronization run. The four fields -- last_sync_started_at, last_sync_ended_at, last_sync_status (never_synced, running, completed, or failed), and latest_message_at -- are always present; a field whose value is unknown is null rather than omitted. Reports facts only: no freshness verdict, staleness duration, or composite score is computed. |
| mail_attachment_exportA | Copy stored attachments into a host directory and report where each one landed. attachment_ids are the attachment_id values from mail_attachments (or attachments[].id from mail_show / mail_thread), 1 to 50 per call; a repeated id is reported once. dest_dir must be an absolute host path of at most 200 characters, inside a folder you can read back; it is created if missing. Never overwrites: a file already at the destination is left untouched and reported as skipped-existing. Never exports a file type Windows runs when opened (.exe, .bat, .cmd, .lnk, .vbs, .js, .ps1, .msi, ...): those are reported as skipped-blocked-type and the user must save them from Outlook. A dest_dir inside the Startup folder or an Office startup folder is refused. Each item reports status exported, skipped-existing, skipped-non-exportable (no stored payload, metadata only), skipped-blocked-type, or failed, with the absolute dest_path. Returns paths, never file content. |
| mail_draft_replyA | Generate an RFC5322 reply-all draft for a stored message and write it to the MCP-dedicated draft folder. message_id is the RFC Message-ID (e.g. 'abc@example.com') from mail_show, not the numeric id from mail_search. Returns its draft_id, content fingerprint (SHA-256), and full draft text for review. The draft is NOT sent. Present the complete draft (Subject, To, Cc, Bcc, body, attachments, draft_id, and fingerprint) to the user for conversational review before calling mail_send. |
| mail_sendA | Send a reviewed draft from the MCP-dedicated draft folder. Requires the draft_id and the matching SHA-256 fingerprint obtained from mail_draft_reply. Requires MAILATTIC_SMTP_ENV_FILE environment variable to point to a valid SMTP configuration file. Only call this after the user has reviewed the draft and explicitly confirmed to send. status='partial' means SMTP refused some recipients (see refused: address/code/reason): the message WAS sent to the accepted ones, so never call mail_send again for the same draft; create a new draft for the refused recipients only. An error does not always mean the mail was not sent: when it says the outcome is unknown or that the mail may already be delivered, verify delivery status before sending again; never re-draft and resend on your own. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Each tool targets a distinct resource and action: search vs. single-message show vs. whole-thread, plus separate tools for contact aggregation, attachment metadata, attachment export, drafting, sending, and sync status. The descriptions even cross-reference each other (e.g. 'use mail_show for one stored id', 'use mail_search for message content'), eliminating boundary confusion.
All nine tools share a uniform mail_ snake_case prefix with predictable descriptive suffixes (mail_search, mail_show, mail_thread, mail_draft_reply, mail_send, mail_attachment_export). The few noun-only names like mail_attachments and mail_sync_status still fit the same readable convention.
Nine tools is well-scoped for an email server spanning sync status, retrieval, attachments, contacts, and a gated draft/send workflow. Each tool earns its place with no redundant capabilities.
Read/search/thread/attachment/contact coverage plus a safe reply-and-send lifecycle is solid, but the surface only drafts replies and offers no compose-new-message, delete, move/folder, or read-state management. These are workable gaps rather than blocking ones for the stated reading-plus-reply purpose.