email-mcp-plus

email-mcp-plus

An MCP server for Microsoft Graph email that uses $filter instead of $search, allowing filtered email searches with sorting. It reuses the existing email-mcp authentication and provides tools for searching, listing folders, and retrieving email content.

Category
Visit Server

README

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

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured