Microsoft Outlook MCP Server for sending emails with attachments via Microsoft Graph API
Project description
Outlook MCP Server
A Model Context Protocol (MCP) server for sending emails via Microsoft Outlook using the Microsoft Graph API.
Features
- Send emails with To, CC, and BCC recipients
- Attach files (up to 3MB each)
- Secure authentication using OAuth 2.0 client credentials flow
- Easy deployment - runs with Python or uvx
Installation
Using pip
pip install mareana-outlook-mcp-server
Using uvx
uvx mareana-outlook-mcp-server
From source
git clone https://github.com/mareana/outlook-mcp-server.git
cd outlook-mcp-server
pip install -e .
Configuration
Set the following environment variables:
| Variable | Description |
|---|---|
MS_CLIENT_ID |
Azure AD Application (client) ID |
MS_CLIENT_SECRET |
Azure AD client secret |
MS_TENANT_ID |
Azure AD Directory (tenant) ID |
MS_FROM_EMAIL |
Email address to send from |
Example
export MS_CLIENT_ID="your-client-id"
export MS_CLIENT_SECRET="your-client-secret"
export MS_TENANT_ID="your-tenant-id"
export MS_FROM_EMAIL="neptune.ai@mareana.com"
Usage
Running the Server
With Python:
mareana-outlook-mcp-server
With uvx:
uvx mareana-outlook-mcp-server
From source:
python -m outlook_mcp_server.server
MCP Client Configuration
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"outlook": {
"command": "uvx",
"args": ["mareana-outlook-mcp-server"],
"env": {
"MS_CLIENT_ID": "your-client-id",
"MS_CLIENT_SECRET": "your-client-secret",
"MS_TENANT_ID": "your-tenant-id",
"MS_FROM_EMAIL": "sender@yourdomain.com"
}
}
}
}
Or using Python directly:
{
"mcpServers": {
"outlook": {
"command": "python3",
"args": ["-m", "outlook_mcp_server.server"],
"env": {
"MS_CLIENT_ID": "your-client-id",
"MS_CLIENT_SECRET": "your-client-secret",
"MS_TENANT_ID": "your-tenant-id",
"MS_FROM_EMAIL": "sender@yourdomain.com"
}
}
}
}
Available Tools
send_email
Send an email with optional CC, BCC, and attachments.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
to |
array[string] | Yes | Recipient email addresses |
subject |
string | Yes | Email subject |
body |
string | Yes | Email body content |
body_type |
string | No | "text" or "html" (default: "text") |
cc |
array[string] | No | CC recipients |
bcc |
array[string] | No | BCC recipients |
attachments |
array[string] | No | File paths to attach (max 3MB each) |
save_to_sent_items |
boolean | No | Save to Sent Items (default: true) |
Example:
{
"to": ["recipient@example.com"],
"subject": "Hello from MCP",
"body": "This is a test email sent via the Outlook MCP server.",
"cc": ["cc@example.com"],
"attachments": ["/path/to/document.pdf"]
}
License
MIT License - see LICENSE for details.
Author
Shashanka G - shashanka.g@mareana.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mareana_outlook_mcp_server-0.1.1.tar.gz.
File metadata
- Download URL: mareana_outlook_mcp_server-0.1.1.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0479ca93477e4c2906dfb3a7e4de38f6671bc86e3a04481cac42def11239c1d2
|
|
| MD5 |
95c0c90d2d31309a16f8e81418394e4a
|
|
| BLAKE2b-256 |
feb6699d96770f7b5a251464ba333f4240f1e16e56f3bb6211ef2b79d1931e63
|
File details
Details for the file mareana_outlook_mcp_server-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mareana_outlook_mcp_server-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d87a6752bf4558894a67874cb9ccb9ebcf439a45a4d2713dd1862cc4c776bf9e
|
|
| MD5 |
08a61958fb809237dc2b8163221075b1
|
|
| BLAKE2b-256 |
2c7b0cc36589d887d76690150a8fbe0760b88c561d1ea8e114c50384b9ebb94a
|