{
  "markdown": "<!-- mcp-name: io.github.nhype/owa-exchange-mcp -->\n\n# OWA Exchange MCP Server\n\nMCP (Model Context Protocol) server for any Microsoft Exchange / OWA (Outlook Web Access) deployment. Gives LLM agents access to email, calendar, directory search, folders, availability, and meeting analytics via 30 tools.\n\nWorks with any on-premise or hosted Exchange server that exposes OWA.\n\n## Quick Start\n\n```bash\n# Copy and edit the MCP config with your OWA URL\ncp .mcp.json.example .mcp.json\n\n# One-time: set up encrypted credentials\npython3 login.py --setup\n\n# Login (opens headless browser, 2FA approval required)\npython3 login.py\n\n# Install the MCP server\npip install -e .\n```\n\n## Install\n\nAdd to your MCP client config. Replace `https://owa.example.com` with your OWA URL.\n\n**Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"exchange\": {\n      \"command\": \"uvx\",\n      \"args\": [\"exchange-mcp-server\"],\n      \"env\": {\n        \"EXCHANGE_OWA_URL\": \"https://owa.example.com\"\n      }\n    }\n  }\n}\n```\n\n**Cursor** (`.cursor/mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"exchange\": {\n      \"command\": \"uvx\",\n      \"args\": [\"exchange-mcp-server\"],\n      \"env\": {\n        \"EXCHANGE_OWA_URL\": \"https://owa.example.com\"\n      }\n    }\n  }\n}\n```\n\n**Claude Code** (`.mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"exchange\": {\n      \"command\": \"uvx\",\n      \"args\": [\"exchange-mcp-server\"],\n      \"env\": {\n        \"EXCHANGE_OWA_URL\": \"https://owa.example.com\"\n      }\n    }\n  }\n}\n```\n\n## Configuration\n\n| Variable | Required | Description |\n|---|---|---|\n| `EXCHANGE_OWA_URL` | Yes | Base URL of your OWA instance |\n| `EXCHANGE_COOKIE_FILE` | No | Path to session cookies file (default: `session-cookies.txt`) |\n\n## Login\n\n### Option A: Via MCP tool (recommended)\n\nThe `login` tool handles credential setup and authentication within the MCP session — no separate terminal needed.\n\nFirst time (setup + login):\n```\nlogin(master_password=\"...\", username=\"user@example.com\", password=\"...\")\n```\n\nSubsequent logins (decrypts stored credentials):\n```\nlogin(master_password=\"...\")\n```\n\n### Option B: Via CLI\n\n```bash\npython3 login.py --setup   # First time: save encrypted credentials\npython3 login.py            # Login with 2FA\n```\n\nBoth methods:\n1. Open a headless browser to your OWA URL\n2. Submit credentials\n3. Wait for 2FA approval (up to 90 seconds)\n4. Save encrypted session cookies to `session-cookies.txt`\n\nCredentials and session cookies are encrypted at rest with AES-256 (PBKDF2 key derivation, 480k iterations).\n\n## Tools (30)\n\n### Email (10)\n| Tool | Description |\n|---|---|\n| `get_emails` | List emails from a folder with filtering |\n| `get_email` | Get full email content by ID |\n| `send_email` | Send a new email |\n| `reply_email` | Reply to an email |\n| `forward_email` | Forward an email |\n| `delete_email` | Delete an email |\n| `move_email` | Move email to another folder |\n| `mark_email_read` | Mark email as read/unread |\n| `download_attachments` | Download file attachments from an email |\n| `get_email_links` | Extract hyperlinks from an email body |\n\n### Calendar (7)\n| Tool | Description |\n|---|---|\n| `get_calendar_events` | Get events in a date range (supports recurring expansion) |\n| `create_meeting` | Create a meeting with attendees |\n| `update_meeting` | Update an existing meeting |\n| `cancel_meeting` | Cancel a meeting and notify attendees |\n| `respond_to_meeting` | Accept, decline, or tentatively accept |\n| `download_event_attachments` | Download file attachments from a calendar event |\n| `get_event_links` | Extract hyperlinks from an event description |\n\n### Directory (1)\n| Tool | Description |\n|---|---|\n| `find_person` | Search people in Active Directory |\n\n### Folders (7)\n| Tool | Description |\n|---|---|\n| `get_folders` | List mail folders with unread counts |\n| `create_folder` | Create a new mail folder |\n| `rename_folder` | Rename an existing folder |\n| `empty_folder` | Empty all items from a folder |\n| `delete_folder` | Delete a mail folder |\n| `move_folder` | Move a folder to a different parent |\n| `check_session` | Check if the OWA session is authenticated |\n\n### Availability (2)\n| Tool | Description |\n|---|---|\n| `find_free_time` | Find free slots in your calendar |\n| `find_meeting_time` | Find common free slots for multiple people |\n\n### Analytics (2)\n| Tool | Description |\n|---|---|\n| `get_meeting_stats` | Meeting count statistics for multiple people |\n| `get_meeting_contacts` | Connection matrix — who you meet with most |\n\n### Auth (1)\n| Tool | Description |\n|---|---|\n| `login` | Authenticate to OWA (credential setup + 2FA login) |\n\n## Files\n\n```\nlogin.py                  # Browser-based 2FA login (standalone CLI)\nexchange_mcp/\n  server.py               # FastMCP server entry point\n  owa_client.py           # OWA HTTP client\n  auth.py                 # Async login logic (shared by MCP tool)\n  tools/\n    email.py              # Email tools\n    calendar.py           # Calendar tools\n    people.py             # Directory search\n    folders.py            # Folder management & session check\n    availability.py       # Free time / meeting time\n    analytics.py          # Meeting stats & contacts\n    auth.py               # Login tool\npyproject.toml            # Package config\n```\n\n## Warning\n\nEvery Exchange / OWA deployment has its own authentication setup — some require 2FA (push notifications, TOTP, SMS), others use single-factor login or SSO. The login logic in this project (`login.py` and `exchange_mcp/auth.py`) is written for a specific 2FA flow (mobile push approval). If your OWA server uses a different 2FA method or no 2FA at all, you will need to modify or remove the login logic to match your environment.\n\n## Security\n\n- Credentials and session cookies encrypted with AES-256-Fernet\n- Master password never stored\n- PBKDF2 with 480,000 iterations for key derivation\n- Credential and cookie files have `0600` permissions\n- Cookies decrypted into memory only — never written to disk as plaintext (via MCP tool)\n- Session cookies never transmitted except to your OWA server\n",
  "bytes": 6107,
  "sha": "c3c9a4bd859bf74ecf75653c2847f66033aa2a4a69c8bbcad4605611c5d1e06c",
  "repo_slug": "nhype/owa-exchange-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_nhype_owa_exchange_mcp_41313255/readme"
}