Outlook Mail
Local MCP server to read, search, send and tidy Outlook.com and Microsoft 365 mail
The repository was last updated 16 days ago and is published under MIT.
Outlook Mail is an open-source MCP server for communication. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, macOS, Windows
- Runs
- Locally
- GitHub stars
- 0
- Last commit
- Language
- TypeScript
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add outlook-mcp -- npx -y @pepebits/outlook-mcpAdd --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": {
"outlook-mcp": {
"command": "npx",
"args": [
"-y",
"@pepebits/outlook-mcp"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"outlook-mcp": {
"command": "npx",
"args": [
"-y",
"@pepebits/outlook-mcp"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"outlook-mcp": {
"command": "npx",
"args": [
"-y",
"@pepebits/outlook-mcp"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"outlook-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@pepebits/outlook-mcp"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add outlook-mcp -- npx -y @pepebits/outlook-mcpOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.outlook-mcp]
command = "npx"
args = ["-y", "@pepebits/outlook-mcp"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"outlook-mcp": {
"command": "npx",
"args": [
"-y",
"@pepebits/outlook-mcp"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "outlook-mcp": { "command": "npx", "args": [ "-y", "@pepebits/outlook-mcp" ] } } }Or run: gemini mcp add -s user outlook-mcp npx -- -y @pepebits/outlook-mcp
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "outlook-mcp": { "command": "npx", "args": [ "-y", "@pepebits/outlook-mcp" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "outlook-mcp": { "command": "npx", "args": [ "-y", "@pepebits/outlook-mcp" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "outlook-mcp": { "command": "npx", "args": [ "-y", "@pepebits/outlook-mcp" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "outlook-mcp": { "command": "npx", "args": [ "-y", "@pepebits/outlook-mcp" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "outlook-mcp": { "command": "npx", "args": [ "-y", "@pepebits/outlook-mcp" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "outlook-mcp": { "command": "npx", "args": [ "-y", "@pepebits/outlook-mcp" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "outlook-mcp": { "command": "npx", "args": [ "-y", "@pepebits/outlook-mcp" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
OUTLOOK_CLIENT_IDYour own Azure app (client) ID. Leave unset to use the shared app for personal accounts.OUTLOOK_TENANTconsumers (default), organizations, common or a tenant ID.OUTLOOK_READ_ONLYSet to true to expose only read-only tools.OUTLOOK_TOKEN_STOREauto (default), keychain or file: where the token cache is stored.
About Outlook Mail
This server talks to Microsoft Graph directly from your machine over stdio, so no mail passes through the author's servers. Sign-in uses the OAuth device code flow: ask the assistant to log in, open the URL it returns, enter the one-time code and accept. The refresh token goes into the macOS Keychain or Linux Secret Service when available, otherwise into a file readable only by you.
By default it uses a shared Azure app that supports personal accounts such as Outlook.com, Hotmail and Live; work or school accounts need your own Azure app registration, configured through OUTLOOK_CLIENT_ID and OUTLOOK_TENANT. Setting OUTLOOK_READ_ONLY=true removes every sending, moving, deleting and flagging tool entirely.
Beyond basic mail, it can find newsletters, unsubscribe from them and block senders through inbox rules, retry on throttling responses, and send attachments up to 150 MB using chunked upload. It requires Node.js 24 or newer and is MIT licensed.
Tools this server provides (4)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 2 of 4 tools read data; 2 names don't say.
From the server's own tool labels and tool names; not verified by us.
- login
- Returns a URL and one-time code to sign in to Microsoft.
- auth_statusName suggests: reads
- Reports whether you are signed in, waiting or signed out.
- logout
- Removes the cached account and token cache.
- get_messageName suggests: reads
- Reads a message body as sanitized plain text.
What it does
- Read and search mail
- Browse folders and search with KQL, with bodies returned as sanitized plain text.
- Send and reply
- Send, draft, reply, reply-all and forward, with local attachments up to 150 MB.
- Bulk organising
- Move, flag, mark read or delete messages one at a time or in bulk.
- Newsletter cleanup
- Find newsletters, unsubscribe and block senders with inbox rules.
- Read-only mode
- One setting removes all mutating tools from the server.
- Keychain token storage
- Refresh tokens are kept in the OS keychain where available.
Good for
- Triage an inbox and archive old messages in bulk
- Draft replies to emails from chat
- Clean out newsletters and block unwanted senders
- Download attachments into a set folder
- Give an assistant safe read-only access to a mailbox
Pricing
Open source
Free, MIT licence
Outlook Mail FAQ
Does Outlook Mail work with work or school accounts?
Yes, but you must register your own Azure app and set OUTLOOK_CLIENT_ID and a tenant; the shared app supports personal accounts only.
Where are my tokens stored?
In the OS keychain on macOS and Linux when available, otherwise a 0600 file under ~/.config/outlook-mcp.
Can I stop Outlook Mail from sending mail?
Yes. OUTLOOK_READ_ONLY=true means send, move, delete, flag and mark tools are not registered.
What Node version is needed?
Node.js 24 LTS or newer.
Is Outlook Mail free?
Yes. Outlook Mail is open source, so you can use and self-host it for free.
How do I add Outlook Mail to Claude Code?
Run this command in your terminal: claude mcp add outlook-mcp -- npx -y @pepebits/outlook-mcp
What are the best alternatives to Outlook Mail?
The closest alternatives to Outlook 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.

