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-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 sender, subject, date range, attachments, folder using $filter

list_folders

List all mail folders with IDs and item counts

get_sent_items

Search sent items by 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)

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

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

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