Skip to main content
Glama

MCP Outlook Server

MCP Outlook Server

FastMCP server for sending Outlook mail via Microsoft Graph. This project exists because the Agent Builder Outlook connector does not provide a send-email capability; the MCP server delivers that missing tool by exposing a single send_outlook_mail entry point that validates payloads, obtains access tokens, and calls the Graph sendMail endpoint.

Prerequisites

  • Python 3.10+

  • Microsoft Outlook/Graph account with Mail.Send permission (delegated token or app registration)

  • uv (recommended) or pip

Installation

uv pip install .

Environment Variables

Set the following in .env (create from .env.example):

  • GRAPH_USER_ACCESS_TOKEN – Optional delegated bearer token (e.g., from Graph Explorer) for quick testing.

  • GRAPH_DEFAULT_SENDER – Mailbox to send from, e.g., user@outlook.com.

  • GRAPH_TENANT_ID, GRAPH_CLIENT_ID, GRAPH_CLIENT_SECRET – Required only for app-only client credentials flow.

Load them before running:

set -a; source .env; set +a

Local Usage

Dry run (no email sent):

python3 - <<'PY' from server import send_outlook_mail_impl result = send_outlook_mail_impl( subject="Dry Run", body="Payload preview only.", to=["recipient@example.com"], dry_run=True, ) print(result) PY

Send a live message (dry_run=False) once configuration is confirmed. To expose the MCP tool to clients:

fastmcp run server.py

Testing

uv pip install .[dev] pytest

Unit tests cover token acquisition and payload construction.

Deployment Notes

  • fastmcp.json is configured for fastmcp run and FastMCP Cloud.

  • Secrets should be supplied via environment variables on the target platform.

  • See todo.md for remaining tasks and deployment checklist.

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables sending emails through Microsoft Outlook using the Microsoft Graph API. Provides the missing send-email capability for Agent Builder's Outlook connector with support for both delegated and app-only authentication flows.

  1. Prerequisites
    1. Installation
      1. Environment Variables
        1. Local Usage
          1. Testing
            1. Deployment Notes

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/jayozer/agentbuilder-outlook-mcp'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server