Skip to main content
Glama
idea404

email-mcp-plus

by idea404

email-mcp-plus

Additive MCP server for Microsoft Graph email that fixes the broken $search limitation in the existing @marlinjai/email-mcp.

Problem

The existing email-mcp uses Microsoft Graph's $search parameter, which is incompatible with $orderBy. This means:

  • Filtered searches (by sender, subject, date) fail with "$orderBy is not supported with $search"

  • You can only paginate chronologically through thousands of emails

Related MCP server: Outlook Email MCP Server

Solution

email-mcp-plus uses Graph's $filter parameter instead, which works with $orderBy. It shares the same MSAL token cache as email-mcp, so:

  • No separate app registration needed

  • No separate OAuth flow

  • Just authenticate once with email-mcp, and email-mcp-plus reuses the refresh token

Setup

1. Install

cd ~/Projects/email-mcp-plus
uv sync

2. Authenticate with email-mcp first

Make sure @marlinjai/email-mcp is configured and you've completed the OAuth flow at least once. This populates ~/.email-mcp/msal-cache.json.

3. Add to opencode.json

{
  "mcp": {
    "emailmcpplus": {
      "type": "local",
      "command": ["uv", "run", "--directory", "/Users/dennis/Projects/email-mcp-plus", "python", "-m", "email_mcp_plus.server"],
      "enabled": true
    }
  }
}

Or run standalone:

uv run --directory ~/Projects/email-mcp-plus python -m email_mcp_plus.server

If the shared MSAL cache contains more than one Microsoft account, select the mailbox explicitly in the MCP environment:

"environment": {
  "EMAIL_MCP_ACCOUNT": "you@example.com"
}

The value can be the account's email address or MSAL home account ID. The server refuses to guess when multiple cached accounts exist, preventing message IDs from one mailbox from being used against another.

Tools

Tool

Description

search_emails

Filter by query (free-text KQL, e.g. from:klm.com, subject:flight), sender, subject, body, date range, folder using $filter/$search

list_folders

List all mail folders with IDs and item counts

get_sent_items

Search sent items by query/subject/date

get_email_body

Get full email body by message ID

list_attachments

List attachments for a message

get_attachment

Get attachment content (base64)

send_email

Send email with optional attachments (local path or inline contentBase64)

create_draft

Create a draft in the Drafts folder (never sends) with optional attachments — same params as send_email

update_draft

Edit a draft: change to/subject/body/cc/bcc, add attachments, remove attachments by id (from list_attachments)

delete_draft

Delete a draft (refuses to delete non-draft messages)

Unknown parameters are rejected with an error listing the valid ones, so a model that guesses a wrong argument name gets a loud, self-correcting failure instead of silently unfiltered results.

How it works

email-mcp (existing)     →  OAuth wizard → populates ~/.email-mcp/msal-cache.json
email-mcp-plus (this)    →  reads msal-cache.json → acquires silent token → calls Graph API

The refresh token in the MSAL cache is long-lived (90 days of inactivity). email-mcp-plus uses msal.acquire_token_silent() to get fresh access tokens without any browser interaction.

Requirements

  • Python 3.11+

  • uv for dependency management

  • @marlinjai/email-mcp configured and authenticated at least once

License

MIT

Available Tools

6 tools
get_attachmentA

Get attachment content (base64).

ParametersJSON Schema
NameRequiredDescriptionDefault
message_idYes
attachment_idYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the base64 encoding format, which is useful, but does not explicitly state that it is a read-only operation or describe any side effects, errors, or limitations. The 'Get' verb implies safety, but more could be expected.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence of five words, direct and front-loaded. Every word earns its place with no unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple getter tool, the description adequately covers the core behavior. It does not describe return value details or error handling, but given the simplicity and the fact that the output is base64 content, it is reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not explain the meaning or usage of message_id and attachment_id. While parameter names are self-explanatory, the description adds no value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses specific verb 'Get' and resource 'attachment content' with format 'base64', clearly distinguishing it from siblings like list_attachments and get_email_body. It precisely states what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It does not mention prerequisites such as obtaining attachment_id from list_attachments, nor does it state when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_email_bodyA

Get full email body by message ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
message_idYesMessage ID from search results

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavioral disclosure. It mentions 'full email body' which suggests the return is complete, not a snippet, but does not clarify error behavior, authentication requirements, or response format. This is a minor gap given the simplicity of the operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one concise sentence with no redundant information. Every word earns its place, succinctly conveying the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and no output schema, the description is nearly complete. It clearly states what is retrieved and how to identify the target. A brief note about return format or edge cases would be helpful, but it is sufficiently complete for effective tool selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already provides 100% coverage for the single parameter, including 'Message ID from search results'. The description adds no additional semantic detail beyond restating 'by message ID', so it does not improve upon the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: retrieving the full email body using a message ID. It uses a specific verb (Get) and resource (email body), and the 'by message ID' distinguishes it from sibling tools like list_attachments or search_emails.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context by indicating the tool operates on a message ID, implying it should be used after obtaining an ID from search results or similar. It does not explicitly state exclusions or alternatives, but the purpose is distinct enough among siblings that usage is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_sent_itemsC

Search sent items by subject/date.

ParametersJSON Schema
NameRequiredDescriptionDefault
toNoRecipient (search in body)
limitNoMax results
sinceNoISO date (YYYY-MM-DD)
subjectNoSubject keyword

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It only says 'search' and does not disclose return format, sorting order, or the fact that the 'to' parameter searches in the body. This minimal disclosure does not go beyond what the name implies.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no wasted words. It is appropriately concise, though it under-specifies some capabilities.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given four optional parameters, no output schema, and no annotations, the description is insufficiently complete. It does not explain what the tool returns, does not mention the 'to' parameter, and provides no context on how it relates to sibling tools like 'get_email_body' or 'list_attachments'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers 100% of parameters with descriptions, so the baseline is 3. The description mentions 'subject/date' (mapping to 'subject' and 'since') but adds no new meaning beyond the schema and omits 'to' and 'limit' entirely.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action 'Search' and the resource 'sent items', which distinguishes it from the sibling 'search_emails' tool. However, it omits the 'to' recipient search parameter, so it only partially captures the full searchable criteria.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool vs. alternatives like 'search_emails'. There are no exclusions, prerequisites, or context indicating the best use case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_attachmentsB

List attachments for a message.

ParametersJSON Schema
NameRequiredDescriptionDefault
message_idYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description must carry full behavioral disclosure. It only states the action without indicating what is returned (metadata? full attachments?), whether it is read-only, pagination behavior, or any prerequisites. This leaves significant gaps for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence with no wasted words. It follows the pattern of stating the action and object, making it easy to parse. Size is appropriate for the tool's apparent simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has one parameter, no output schema, and no annotations, the description is too thin for an agent to understand what the result looks like or what side effects (if any) exist. A complete description would mention that it returns a list of attachment metadata and perhaps note that it does not download contents.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must clarify parameter meaning. The phrase 'for a message' helps infer that message_id identifies a message, but it does not explain the format, source, or constraints beyond the name. Minimal added value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List attachments for a message' has a specific verb ('list') and resource ('attachments'), clearly distinguishing it from sibling tools like 'get_attachment' which likely retrieves a single attachment. It also scopes the operation to a message, which is clear and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus alternatives. It does not mention conditions like 'use this to enumerate attachments before fetching specific ones' or contrast with 'get_attachment'. The context is implied but not explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_foldersA

List all mail folders with IDs and item counts.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavioral disclosure. 'List' implies a non-destructive read operation, but the description does not explicitly mention side effects, authentication, pagination, or any unusual behavior. It is adequate but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence that includes the action, scope, and output. Every word earns its place, and the structure is immediately scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with no output schema, the description adequately covers the operation and return value (IDs and item counts). It could add a note about scope (e.g., whether system folders are included), but the core usage is fully conveyed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so per the rubric the baseline is 4. The description adds no param syntax, but none is needed. It effectively communicates that no configuration is required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List'), the resource ('all mail folders'), and the output ('IDs and item counts'). It distinguishes itself from sibling tools that deal with emails and attachments, making it unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies a read-only listing operation for folders, which logically precedes email-specific actions like search or attachment retrieval. However, it provides no explicit when-to-use or when-not-to-use guidance, nor does it name any alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_emailsA

Search emails using Microsoft Graph API. Uses KQL $search for text queries (from, subject, body) and $filter for date ranges. Works around the $search/$orderBy incompatibility in @marlinjai/email-mcp.

ParametersJSON Schema
NameRequiredDescriptionDefault
bodyNoSearch body text
fromNoFilter by sender (email or name fragment)
limitNoMax results (default 25, max 100)
sinceNoISO date (YYYY-MM-DD)
beforeNoISO date (YYYY-MM-DD)
folderNoinbox, sent, drafts, deleted, archive, junk
subjectNoFilter by subject (keyword)
include_bodyNoInclude full body

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the use of KQL $search and $filter and the workaround, which is useful implementation context. However, it does not describe the return format, ordering, pagination, or side effects (though a search is likely read-only), leaving some behavioral aspects unaddressed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose, and includes a relevant implementation note. Every sentence earns its place, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter search tool with no output schema, the description gives the essential purpose and mechanism but omits details about result shape, ordering, or the practical impact of the $search/$orderBy incompatibility. It is adequate for basic understanding but leaves gaps for a fully informed selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds minimal meaning by grouping parameters into text queries (from, subject, body) and date ranges, but it does not provide additional syntax or format details beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool as 'Search emails using Microsoft Graph API' and specifies the two main behaviors: KQL $search for text queries and $filter for date ranges. This distinguishes it from siblings like list_folders and get_sent_items, and the mention of the incompatibility workaround adds a unique, specific purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when to use this tool: when needing text-based or date-filtered email searches. It does not explicitly name alternative tools, but it implies this is the appropriate choice for search functionality, and the workaround note suggests it is preferred over other implementations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updatesv0.1.0
    • First observedget_attachment
    • First observedget_email_body
    • First observedget_sent_items
    • First observedlist_attachments
    • First observedlist_folders
    • First observedsearch_emails

TDQS

A3.6/5.0
Disambiguation4/5

Tools are mostly distinct, but search_emails and get_sent_items both perform searches with overlapping capabilities (subject/date queries). The descriptions clarify that get_sent_items is specific to the sent folder, but an agent could still confuse which to use. Other tools have clearly separate roles.

Naming Consistency4/5

Tool names generally follow a verb_noun pattern (search_emails, list_folders, get_email_body, list_attachments, get_attachment). However, get_sent_items is a search operation but uses 'get' instead of 'search', deviating from the pattern established by search_emails. Overall, naming is readable and predictable.

Tool Count5/5

With 6 tools, the server is well-scoped for email search and retrieval. Each tool covers a needed function without unnecessary overlap or bloat, making the count appropriate.

Completeness4/5

The server covers searching, folder listing, body retrieval, and attachment handling, which is solid for a read-oriented email tool. Missing operations like sending or moving emails are not necessarily required for the apparent scope. A minor gap is the lack of a direct 'list emails in a folder' tool, but search can work around it.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server for sending and managing Microsoft Outlook email via the Microsoft Graph API, including drafts, replies, contacts, and directory search.
    114
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    An MCP server that enables reading and managing Microsoft 365 / Outlook emails through Microsoft Graph API, allowing users to list, search, send, draft, and authenticate using device code flow.
    17
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server providing full control over Outlook.com, Hotmail, Live, or Microsoft 365 email via Microsoft Graph API, enabling reading, searching, sending, and managing messages and folders securely.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server for reading, searching, sending, and managing emails via IMAP/SMTP, with tools like list_emails, read_email, search_emails, send_email, get_attachment, get_account_info, and mark_email_read.
    48
    ISC

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/idea404/email-mcp-plus'

If you have feedback or need assistance with the MCP directory API, please join our Discord server