mareana-outlook-mcp-server 0.1.1
Microsoft Outlook MCP Server for sending emails with attachments via Microsoft Graph API
License: MIT
Requires Python: >=3.10
Keywords: attachments, email, mail, mcp, microsoft-graph, outlook

# 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

```bash
pip install mareana-outlook-mcp-server
```

### Using uvx

```bash
uvx mareana-outlook-mcp-server
```

### From source

```bash
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

```bash
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:**
```bash
mareana-outlook-mcp-server
```

**With uvx:**
```bash
uvx mareana-outlook-mcp-server
```

**From source:**
```bash
python -m outlook_mcp_server.server
```

### MCP Client Configuration

Add to your MCP client configuration (e.g., Claude Desktop):

```json
{
  "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:

```json
{
  "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:**

```json
{
  "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](LICENSE) for details.

## Author

Shashanka G - [shashanka.g@mareana.com](mailto:shashanka.g@mareana.com)