MailOKF MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MAILOKF_DATA_DIR | No | Legacy split mode: data directory override | |
| MAILOKF_ROOT_DIR | No | The local storage root directory for MailOKF state (default ./lcl_data) | ./lcl_data |
| MAILOKF_CONFIG_DIR | No | Legacy split mode: config directory override | |
| MAILOKF_RETAIN_RAW_MIME | No | Set to true to retain raw .eml files for debugging or legal-retention requirements | |
| MAILOKF_MAX_ATTACHMENT_BYTES | No | Maximum per-file attachment size in bytes | |
| MAILOKF_ATTACHMENT_IMPORT_ROOTS | No | Platform PATH-separated list of authorized outbound attachment import roots | |
| MAILOKF_DANGEROUSLY_ALLOW_ARBITRARY_ATTACHMENT_PATHS | No | Set to true to allow arbitrary outbound attachment paths (with confirmed=true) |
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 |
|---|---|
| email_list_accountsB | List all configured email accounts and their connection status |
| email_add_accountC | Add a new IMAP or iCloud email account (Gmail and Outlook require the setup wizard for OAuth) |
| email_remove_accountC | Remove an email account |
| email_test_accountC | Test an email account connection |
| email_list_foldersC | List all email folders for an account |
| email_searchB | Search emails with filters. By default returns compact results without full body content to save context. Set returnBody=true to include full email bodies. |
| email_getC | Get a single email by ID |
| email_get_threadC | Get an email thread by thread ID |
| email_get_attachmentC | Get an email attachment by ID, returns base64 encoded data |
| email_sendA | Send exactly one email after explicit confirmation. confirmed=true and a nonblank idempotencyKey are required safety inputs. Reuse synchronized mail with {messageId, attachmentId} from mail_attachment_list; use {stagedId} from mail_attachment_stage/mail_attachment_create for local or agent-created files; or use {localPath, confirmed:true} for an authorized workspace/import file. |
| email_replyC | Reply to an existing email |
| email_forwardC | Forward an email to new recipients |
| email_draft_createA | Create exactly one provider draft with optional retained, staged, or confirmed local attachments. A nonblank idempotencyKey is required; reuse it only for the identical draft so retries return the durable prior result without creating a duplicate. |
| email_draft_listC | List email drafts |
| email_moveC | Move an email to a different folder |
| email_transferB | Move or copy emails between accounts while preserving raw MIME |
| email_deleteC | Delete an email (moves to trash by default, or permanently deletes) |
| email_markC | Mark an email as read/unread, starred, or flagged |
| email_labelC | Add or remove labels on an email (Gmail only) |
| email_folder_createC | Create a new email folder |
| email_get_labelsC | List all labels for an email account (Gmail only) |
| email_get_categoriesB | List all categories for an email account (Outlook only) |
| email_batch_deleteC | Delete multiple emails at once. Much faster than individual deletes. |
| email_batch_moveC | Move multiple emails to a folder at once. Much faster than individual moves. |
| email_batch_markC | Mark multiple emails at once (read/unread, starred, flagged). Much faster than individual marks. |
| mail_sync_initialC | Perform a full initial mailbox synchronization and reconciliation. |
| mail_sync_nowA | Run an incremental sync, or force a full reconciliation. |
| mail_sync_allC | Synchronize every enabled account. |
| mail_sync_statusB | Return freshness, cursor status, and local object counts. |
| okf_validate_bundleA | Validate OKF frontmatter and attachment references for one account. |
| okf_rebuild_bundleC | Regenerate the OKF projection from the canonical SQLite records. |
| knowledge_searchC | Search the local knowledge corpus with keyword, semantic, or hybrid retrieval. |
| knowledge_getC | Retrieve a source-backed knowledge record for a message. |
| vector_index_updateC | Apply CocoIndex incremental changes from OKF files into sqlite-vec. |
| vector_searchB | Run account-isolated semantic similarity search over the OKF vector index. |
| mail_attachment_stageC | Stage an authorized file and return |
| mail_attachment_listC | List retained metadata reusable as |
| mail_attachment_createA | Create an agent-generated text/base64 file for later send or draft attachment. |
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 38 tools
Most mail_* and email_* tools have clear purposes, but there is notable overlap in the sync tools (mail_sync_initial, mail_sync_now, mail_sync_all) which could confuse an agent choosing which to invoke. The 'okf_' and 'vector_' prefixed tools are also conceptually related to mail syncing/indexing, creating some boundary ambiguity between mail_sync_* and okf_rebuild_bundle/vector_index_update.
The naming is mixed: email_* tools use verb_noun (email_add_account, email_get, email_send), but there are inconsistencies like email_add_account vs email_list_accounts (verb prefix on some, noun prefix on others), and mail_* tools use a different prefix entirely (mail_sync_*, mail_attachment_*). The verb placement varies (email_get before email_get_thread, email_send vs email_reply). Also tool names like 'email_add_account' have a noun in the middle rather than a resource at the end.
38 tools is well beyond the ideal 3-15 range and leans heavy. While email operations naturally need many actions, the apparent scope includes network/auth (add_account, remove_account, test_account), lifecycle (get/get_thread/delete/batch_delete), organization (move/batch_move/label/folder), drafts/send (send/reply/forward/draft_create), attachments (three mail_attachment_* tools), plus a parallel OKF/vector knowledge system. This feels like 2-3 servers' worth of functionality compressed into one.
The surface is fairly complete for the email domain: CRUD on accounts, full email lifecycle (get/search/send/reply/forward/delete), batch operations, folders, labels, drafts, and attachments are all covered. There are minor gaps like missing undo/save-draft operations and no unread-count summary, but these are workable. The addition of OKF and vector indexing extends completeness beyond basic email into knowledge management, though it arguably over-scopes the server.