outlook_mcp
Provides tools for searching, reading, and managing emails in Gmail, including invoice detection, attachment handling, label management, and draft creation.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@outlook_mcpfind invoice emails from last month"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Email MCP Server
A remote MCP (Model Context Protocol) server that connects Claude to Microsoft 365 Outlook and Google Gmail via their respective APIs. Deployed on Vercel with Claude Connector OAuth - Anthropic handles all authentication.
Architecture
┌─────────────┐ ┌──────────────┐ ┌─────────────────┐
│ Claude │────►│ Anthropic │────►│ Microsoft/ │
│ Client │ │ (OAuth) │ │ Google OAuth │
└─────────────┘ └──────────────┘ └─────────────────┘
│
▼
┌──────────────┐
│ Email MCP │ ◄── Bearer token on every request
│ (Vercel) │
└──────────────┘Key points:
Users connect via Claude Settings → Connectors
Anthropic handles the OAuth flow (authorization, token refresh, secure storage)
MCP server receives
Authorization: Bearer <token>with each requestServer is stateless - no token storage, no auth tools, no database
Related MCP server: ClaudePost
Features
Microsoft 365 (Outlook)
Search emails by date, sender, subject, attachments, read status
Invoice detection with multi-language keywords (English + Hebrew)
Read full email content
Download attachments with PDF text extraction
Folder management (list, create, find)
Move emails between folders (single or batch)
Create drafts
Google (Gmail)
Search with Gmail query syntax
Invoice detection with keyword matching
Read emails and full conversation threads
Download attachments
Label management (list, create, delete, modify)
Create drafts
Shared Features
Session-based short IDs - Uses 1, 2, 3... instead of long API IDs
Invoice keyword detection - invoice, receipt, billing, payment, חשבונית, חשבוניות
Provider extraction - Extracts vendor names from email domains
PDF text extraction - Extracts text from PDF attachments
Image vision - Returns images for Claude to analyze
Session-Based Short IDs
The MCP uses short IDs instead of long Graph/Gmail IDs:
Graph ID: AAMkADQ5NWE3...longstring...AAAA=
↓
Short ID: 1Benefits:
Reduces token usage
Easier to reference in follow-up commands
Works with messages, folders, attachments, and labels
Note: Short IDs are stored in-memory and reset when the session ends.
Setup
Prerequisites
Vercel account - vercel.com
Azure AD App Registration (for Microsoft 365)
Google Cloud OAuth credentials (for Gmail)
Azure AD Setup
Go to Azure Portal → Azure Active Directory → App registrations
Create new registration
Add API permissions:
Mail.ReadWrite,User.Read,offline_accessAdd redirect URI:
https://claude.ai/api/mcp/auth_callbackCopy the Application (client) ID and Directory (tenant) ID
Google Cloud Setup
Go to Google Cloud Console
Enable the Gmail API
Configure OAuth consent screen
Create OAuth 2.0 credentials
Add redirect URI:
https://claude.ai/api/mcp/auth_callbackAdd scopes:
https://www.googleapis.com/auth/gmail.readonlyhttps://www.googleapis.com/auth/gmail.modifyhttps://www.googleapis.com/auth/gmail.labels
Deployment
Clone the repository
Link to Vercel:
vercel linkSet environment variables in Vercel Dashboard:
AZURE_CLIENT_ID- Azure app client IDAZURE_TENANT_ID- Azure tenant ID
Deploy:
vercel deploy --prod
Note: Client secrets are NOT stored in the MCP server - Anthropic handles OAuth securely.
Connecting to Claude
After deployment:
Go to Claude.ai → Settings → Connectors
Add your Vercel deployment URL
Authorize with Microsoft and/or Google when prompted
Start using email tools in Claude
Available Tools
Microsoft 365 (Outlook)
Tool | Description |
| Search emails with flexible filtering |
| Find invoice emails with keyword detection |
| Read full email content |
| List attachments of an email |
| Download a specific attachment |
| Download attachment by filename |
| Batch download invoice attachments |
| List mail folders |
| Find folder by path or name |
| Get complete folder hierarchy |
| Create a new mail folder |
| Move a single email |
| Move multiple emails |
| List vendors from invoice emails |
| Create a draft (does not send) |
Google (Gmail)
Tool | Description |
| Search with Gmail query syntax |
| Find invoice emails |
| Read full message content |
| Read entire conversation thread |
| List attachments of a message |
| Download attachment by filename |
| List all Gmail labels |
| Get label details |
| Create a new label |
| Delete a label |
| Add/remove labels from messages |
| List vendors from invoice emails |
| Create a draft (does not send) |
Example Workflows
Organize Invoices (Microsoft 365)
1. m365_search_invoice_emails(year: 2024) → Find invoices
2. m365_create_folder(displayName: "Invoices") → Create folder
3. m365_move_emails(messageIds: [...], destinationFolderName: "Invoices")Search and Label (Gmail)
1. google_search_emails(query: "from:amazon.com has:attachment")
2. google_search_invoice_emails(year: 2024)
3. google_modify_labels(messageIds: [...], addLabelIds: ["Label_123"])Read Conversation
1. google_search_emails(sender: "support@company.com")
2. google_read_thread(threadId: ...)Tool Parameters
General Email Search
Parameter | Type | Description |
| string | Start date (ISO format) |
| string | End date (ISO format) |
| number | Year to search |
| number | Month (1-12) |
| string | Sender email address |
| string | Subject contains |
| boolean | Filter by attachments |
| boolean | Filter by read status |
| string | Search within folder/label |
| number | Maximum results |
| string | "full", "summary", "minimal", "ids" |
Invoice Search
Parameter | Type | Description |
| number | Required. Year to search |
| number | Month (1-12) |
| string | Sender email address |
| string[] | Custom search keywords |
| number | Maximum results |
Move Emails (M365)
Parameter | Type | Description |
| string/string[] | Email ID(s) to move |
| string | Folder ID or well-known name |
| string | Folder display name |
| boolean | Create folder if missing |
Well-known folders: inbox, drafts, sentitems, deleteditems, archive, junkemail, outbox
Development
Local Testing
npm run dev # Start local Next.js server
# Connect MCP Inspector to http://localhost:3000/api/mcpBuild
npm run build # Build for productionInvoice Detection
The server searches for emails containing these keywords:
English: invoice, receipt, bill, payment, billing, statement, order confirmation, tax invoice
Hebrew: חשבונית, קבלה, תשלום, חשבונית מס, אישור הזמנה
Attachment Filtering
Only downloads invoice-relevant files:
PDF files
Images (PNG, JPG, JPEG, TIFF)
Skips:
Calendar files (.ics)
Contact files (.vcf)
HTML files
Signature images (files containing "signature", "logo", "banner")
License
MIT
This server cannot be installed
Maintenance
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/megedtal/outlook_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server