Skip to content
MCP server

Microsoft 365 Mail

Outlook mail through Microsoft Graph: read, search, reply, draft and manage attachments

Runs locally

Microsoft 365 Mail is an MCP server for communication. It runs locally on your machine and is started by your AI client.

Platforms
CLI, API
Runs
Locally
What it can do
Can change data (2 tools)
Version
0.4.3
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add mcp-server-microsoft-mail --env MS_CLIENT_ID='<MS_CLIENT_ID>' --env MS_CONFIG_DIR='<MS_CONFIG_DIR>' -- npx -y @mindstone/mcp-server-microsoft-mail

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "mcp-server-microsoft-mail": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add mcp-server-microsoft-mail --env MS_CLIENT_ID='<MS_CLIENT_ID>' --env MS_CONFIG_DIR='<MS_CONFIG_DIR>' -- npx -y @mindstone/mcp-server-microsoft-mail

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.mcp-server-microsoft-mail]
command = "npx"
args = ["-y", "@mindstone/mcp-server-microsoft-mail"]
env = { MS_CLIENT_ID = "<MS_CLIENT_ID>", MS_CONFIG_DIR = "<MS_CONFIG_DIR>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "mcp-server-microsoft-mail": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-microsoft-mail"
          ],
          "env": {
            "MS_CLIENT_ID": "<MS_CLIENT_ID>",
            "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e MS_CLIENT_ID='<MS_CLIENT_ID>' -e MS_CONFIG_DIR='<MS_CONFIG_DIR>' mcp-server-microsoft-mail npx -- -y @mindstone/mcp-server-microsoft-mail

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "mcp-server-microsoft-mail": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-microsoft-mail"
          ],
          "env": {
            "MS_CLIENT_ID": "<MS_CLIENT_ID>",
            "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "mcp-server-microsoft-mail": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-microsoft-mail"
          ],
          "env": {
            "MS_CLIENT_ID": "<MS_CLIENT_ID>",
            "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "mcp-server-microsoft-mail": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-microsoft-mail"
          ],
          "env": {
            "MS_CLIENT_ID": "<MS_CLIENT_ID>",
            "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "mcp-server-microsoft-mail": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-microsoft-mail"
          ],
          "env": {
            "MS_CLIENT_ID": "<MS_CLIENT_ID>",
            "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "mcp-server-microsoft-mail": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-microsoft-mail"
          ],
          "env": {
            "MS_CLIENT_ID": "<MS_CLIENT_ID>",
            "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "mcp-server-microsoft-mail": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-microsoft-mail"
          ],
          "env": {
            "MS_CLIENT_ID": "<MS_CLIENT_ID>",
            "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "mcp-server-microsoft-mail": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-microsoft-mail"
          ],
          "env": {
            "MS_CLIENT_ID": "<MS_CLIENT_ID>",
            "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • MS_CLIENT_IDMicrosoft Entra (Azure AD) application client IDRequired
  • MS_CONFIG_DIRPath to the per-user Microsoft config directory (credentials/, accounts.json)Required
  • MS_ACCOUNT_EMAILAccount email when running in multi-account per-instance mode (falls back to the first account in accounts.json)
  • MS_MCP_PACKAGE_IDLogical package ID surfaced in error responses
  • MICROSOFT_REQUEST_TIMEOUT_MSOverride the upstream Microsoft Graph request timeout in milliseconds (max 300000 = 5 min)
  • MCP_WORKSPACE_PATHWorkspace root where download_attachment saves files (falls back to the OS temp directory when unset)

About Microsoft 365 Mail

This is one of five Microsoft 365 connectors from the same maintainers (mail, calendar, files, teams, SharePoint) that share one OAuth surface and one library for token storage and timeouts. The mail connector owns the sign-in tool; the host runs the OAuth flow and writes per-account token files, and every tool returns a structured auth_required response until they exist.

It has 22 tools covering messages, folders, drafts, attachments, threads and settings, including out-of-office replies and read or flag triage. A compose tool opens an editable draft in an interactive view and nothing is sent until the user clicks Send. Search uses Microsoft Search syntax, and conversations list oldest first.

The maintainers say they ported it in May 2026 because Microsoft's own server lineup lacked a stand-alone Outlook mail server. Attachment downloads go to a configured workspace folder, and multiple accounts are supported. It needs Node.js 20 or newer and a Microsoft Entra application client ID.

Tools this server provides (10)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 2 of 10 tools change data; 2 names don't say.

From the server's own tool labels and tool names; not verified by us.

authenticate_microsoft_account
Starts the host-run Microsoft 365 OAuth handoff.
list_emailsName suggests: reads
Lists emails in a folder, most recent first.
get_emailName suggests: reads
Reads one email by message ID.
list_attachmentsName suggests: reads
Lists attachment metadata for a message.
download_attachmentName suggests: reads
Saves a file attachment into the workspace.
send_emailName suggests: changes
Sends a new email with CC and BCC.
compose_email
Opens an editable draft; nothing sends until you click Send.
search_emailsName suggests: reads
Searches mail using Microsoft Search syntax.
get_conversationName suggests: reads
Lists the messages in a thread, oldest first.
reply_to_emailName suggests: changes
Replies or replies to all.

What it does

22 mail tools
Messages, folders, drafts, attachments, threads and settings.
Compose with approval
An editable draft opens in a view and sends only when you click Send.
Microsoft Search syntax
Searches mail with queries such as sender and unread filters.
Multiple accounts
Account tokens live in per-account files indexed by accounts.json.
Out-of-office
Manages automatic replies.
Workspace downloads
Attachments save to a configured directory.

Good for

  • Reply to the latest unread message from a colleague
  • Search mail with sender and read-state filters
  • Draft an email for review
  • Save an attachment to a workspace folder

Microsoft 365 Mail FAQ

Who handles Microsoft sign-in?

The host application runs OAuth and writes token files; the server only reads them.

What is required?

A Microsoft Entra client ID, a config directory and Node.js 20 or newer.

Can Microsoft 365 Mail send without me?

Yes, send and reply tools send directly; the compose tool waits for you to click Send.

How many tools does Microsoft 365 Mail have?

The README lists 22.

How do I add Microsoft 365 Mail to Claude Code?

Run this command in your terminal: claude mcp add mcp-server-microsoft-mail --env MS_CLIENT_ID='<MS_CLIENT_ID>' --env MS_CONFIG_DIR='<MS_CONFIG_DIR>' -- npx -y @mindstone/mcp-server-microsoft-mail

What are the best alternatives to Microsoft 365 Mail?

The closest alternatives to Microsoft 365 Mail are TrendRadar, Ha MCP, Concord MCP, TryPost and Open Sunsama.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers