Metadata-Version: 2.4
Name: mareana-outlook-mcp-server
Version: 0.1.1
Summary: Microsoft Outlook MCP Server for sending emails with attachments via Microsoft Graph API
Project-URL: Homepage, https://github.com/mareana/outlook-mcp-server
Project-URL: Repository, https://github.com/mareana/outlook-mcp-server
Project-URL: Documentation, https://github.com/mareana/outlook-mcp-server/blob/main/README.md
Project-URL: Issues, https://github.com/mareana/outlook-mcp-server/issues
Author-email: Shashanka G <shashanka.g@mareana.com>
License: MIT
License-File: LICENSE
Keywords: attachments,email,mail,mcp,microsoft-graph,outlook
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Email
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: mcp>=1.0.0
Requires-Dist: msal>=1.26.0
Requires-Dist: requests>=2.31.0
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: build>=0.10.0; extra == 'dev'
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: twine>=4.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# 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)
