# OWA Exchange MCP Server

Connects LLM assistants to Microsoft Exchange via Outlook Web Access. Helpful for processing inbox messages, scheduling meetings, and querying company directories from editor chats.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 11
- Author: nhype
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/nhype/owa-exchange-mcp
- Updated: 2026-02-16
- HTML: https://affpapa.org/en/nevibecode/mcp/owa-exchange-mcp-server

## What it does

This server exposes 30 tools to inspect mailboxes, manage calendar events, and search company directories via Active Directory. An agent can list folder contents, reply to threads, download email attachments, and move messages between folders. It also includes analytics tools to review meeting frequencies and find common open slots across several attendees.

The runtime relies on `uvx` and requires the `EXCHANGE_OWA_URL` environment variable. Sensitive session cookies and saved credentials remain encrypted at rest using AES-256 with PBKDF2 key derivation. Cookies default to `session-cookies.txt`.

The built-in login script targets mobile push 2FA approvals with a 90-second timeout. If your Exchange deployment relies on SSO, TOTP authenticator codes, or SMS verification, authentication fails out of the box. You will need to rewrite the login logic to match your corporate setup.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `EXCHANGE_OWA_URL`, `EXCHANGE_COOKIE_FILE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env EXCHANGE_OWA_URL=<EXCHANGE_OWA_URL> --env EXCHANGE_COOKIE_FILE=<EXCHANGE_COOKIE_FILE> --transport stdio owa-exchange-mcp-server -- uvx exchange-mcp-server
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from exchange-mcp-server <command>

### Codex

**Platform CLI**
```bash
codex mcp add owa-exchange-mcp-server --env EXCHANGE_OWA_URL=<EXCHANGE_OWA_URL> --env EXCHANGE_COOKIE_FILE=<EXCHANGE_COOKIE_FILE> -- uvx exchange-mcp-server
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from exchange-mcp-server <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "owa-exchange-mcp-server": {
            "command": "uvx",
            "args": [
                "exchange-mcp-server"
            ],
            "env": {
                "EXCHANGE_OWA_URL": "<EXCHANGE_OWA_URL>",
                "EXCHANGE_COOKIE_FILE": "<EXCHANGE_COOKIE_FILE>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from exchange-mcp-server <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "owa-exchange-mcp-server": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "exchange-mcp-server"
            ],
            "env": {
                "EXCHANGE_OWA_URL": "<EXCHANGE_OWA_URL>",
                "EXCHANGE_COOKIE_FILE": "<EXCHANGE_COOKIE_FILE>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from exchange-mcp-server <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e EXCHANGE_OWA_URL=<EXCHANGE_OWA_URL> -e EXCHANGE_COOKIE_FILE=<EXCHANGE_COOKIE_FILE> owa-exchange-mcp-server uvx exchange-mcp-server
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from exchange-mcp-server <command>

## When to use it
- triage unread inbox messages and extract email attachments
- find matching open slots across multiple colleague calendars
- look up staff contact information in Active Directory
- track meeting volume and frequent contacts from calendar history

## Example prompts
- Check my unread emails from this morning and download attachments from the latest invoice thread.
- Look up free calendar slots for tomorrow afternoon and invite the engineering team.
- Search Active Directory for the DevOps lead email address.

## Similar
- [outlook](https://affpapa.org/en/nevibecode/mcp/outlook.md) — MCP server · ★ 21
- [Outlook Assistant](https://affpapa.org/en/nevibecode/mcp/outlook-assistant.md) — MCP server · ★ 39
- [Gate Exchange MCP](https://affpapa.org/en/nevibecode/mcp/gate-exchange-mcp.md) — MCP server · ★ 44
- [outlook-calendar](https://affpapa.org/en/nevibecode/mcp/outlook-calendar.md) — MCP server · ★ 9
- [outlook-email](https://affpapa.org/en/nevibecode/plugins/outlook-email.md) — plugin · ★ 7604
- [calendar-automation](https://affpapa.org/en/nevibecode/skills/calendar-automation.md) — skill · 6100 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
