Unified Microsoft 365 MCP Stack: Outlook, OneNote & SharePoint/OneDrive in Rust
Wire 62 Microsoft 365 MCP tools (78 with Teams) into Claude Code, Cursor, or Codex using standalone Rust binaries: Outlook (:3939, 24 tools), OneNote (:8793, 18 tools, scoped data-id edits), and SharePoint & OneDrive (:8790, 20 tools, ETag-safe uploads).
1. Architecture: Four Non-Conflicting Microsoft 365 Rust Binaries
Engineering work inside Microsoft 365 rarely lives in one silo: specifications sit in SharePoint document libraries, meeting decisions live in OneNote sections, schedule constraints and stakeholder threads sit in Outlook, and active incident chatter runs in Teams. Rather than routing sensitive corporate data through a hosted third-party SaaS connector, BiteFoundry runs each M365 surface as a standalone native Rust binary on your workstation talking directly to Microsoft Graph.
Every binary stores OAuth tokens in your OS keychain (Windows Credential Manager, macOS Keychain, Linux Secret Service), maintains its own local SQLite WAL + FTS5 cache, and reserves a distinct default loopback port so all four run side by side without collision.
| App & Package | Binaries | MCP Tools | Default HTTP | Signature Safety / Efficiency Feature |
|---|---|---|---|---|
| Outlook (@bitefoundry/outlook@0.8.0) | outlook | 26 tools | 127.0.0.1:3939 | 60s smart cache TTL, full draft lifecycle, selective fields:[...] projection; Mail, Calendar, Contacts & To Do unified. |
| OneNote (@bitefoundry/onenote@0.8.0) | onenote | 18 tools | 127.0.0.1:8793 | Scoped data-id PATCH updates & legal absolute-div outlines edit a single paragraph/table/checklist without clobbering the page; native Linux support. |
| SharePoint & OneDrive (@bitefoundry/sharepoint@0.8.0) | sharepoint, bitefoundry-onedrive | 20 tools | 127.0.0.1:8790 | HTTP ETag concurrency guards block silent upload overwrites; 6-stream parallel discovery + indexed SQLite path lookup. |
| Teams (@bitefoundry/teams@0.14.0) | teams | 16 tools | 127.0.0.1:8788 | Compact --json + conditional ETag edits + Shift+Y / confirm:true destructive friction (~33 MB RAM vs 1,240 MB Desktop). |
2. One-Command Install & Unified M365 MCP Registration
Install the Microsoft 365 trio (or include @bitefoundry/teams for all 78 Microsoft Graph tools), sign in once per binary, and register them together in Claude Code, Cursor, or OpenAI Codex.
# Install via npm (or use brew install bitefoundry/tap/{outlook,onenote,sharepoint,teams})
npm i -g @bitefoundry/outlook @bitefoundry/onenote @bitefoundry/sharepoint @bitefoundry/teams
# Authenticate each binary once (tokens saved in OS keychain)
outlook auth login
onenote auth login
sharepoint auth login
teams login
{
"mcpServers": {
"outlook": { "command": "outlook", "args": ["mcp"] },
"onenote": { "command": "onenote", "args": ["mcp"] },
"sharepoint": { "command": "sharepoint", "args": ["mcp"] },
"teams": { "command": "teams", "args": ["mcp"] }
}
}
claude mcp add outlook -- outlook mcp
claude mcp add onenote -- onenote mcp
claude mcp add sharepoint -- sharepoint mcp
claude mcp add teams -- teams mcp
3. Outlook (24 Tools, :3939): Defeating HTML Email Bloat with fields:[...]
Raw HTML emails routinely contain 20–80 KB of inline CSS, tracking pixels, and nested quote chains that instantly saturate an AI coding agent's context window. @bitefoundry/outlook exposes 24 stdio MCP tools covering Mail (list_messages, get_message, send_mail, reply_mail), Calendar (list_events, create_event), Contacts, and Microsoft To Do (list_tasks), with selective fields:[...] projection and pure-Rust HTML-to-clean-text extraction.
# Query inbox as deterministic JSON
outlook mail list --json
# Read a single message in compact JSON (add --full for complete fields)
outlook read MESSAGE_ID --json
# Archive returns message_id and previous_message_id for script chaining
outlook archive MESSAGE_ID --json
4. OneNote (18 Tools, :8793): Scoped data-id Patching & Native Linux TUI
Microsoft ships no native Linux desktop client for OneNote, and generic API scripts often overwrite entire XHTML pages when toggling a single task. @bitefoundry/onenote ships native Windows, macOS, and Linux binaries with a live WYSIWYG terminal canvas editor (Ctrl+M toggles Rendered / Live / Source) and 0ms optimistic local writes.
Over MCP (18 tools including list_notebooks, list_sections, list_pages, get_page, patch_page_element, search_pages), AI agents target specific paragraphs, tables, or checklist items by OneNote data-id—preserving every surrounding section untouched.
# Search cached notebooks and pages offline via SQLite FTS5
onenote search "Q4 roadmap" --json
# Read a specific page in compact JSON
onenote read "Meeting notes" --section "Work/Planning" --json
Frequently Asked Questions
Can all four Microsoft 365 BiteFoundry HTTP servers run simultaneously on the same machine?
Yes. Their default loopback ports are intentionally non-overlapping: Outlook on `127.0.0.1:3939`, Teams on `127.0.0.1:8788`, SharePoint & OneDrive on `127.0.0.1:8790`, and OneNote on `127.0.0.1:8793`.
How does OneNote MCP avoid overwriting an entire page during edits?
Instead of replacing the full XHTML document, `patch_page_element` targets individual OneNote elements by their `data-id` attribute, modifying only the targeted paragraph, table row, or checklist item.
How does SharePoint MCP prevent upload conflicts when teammates edit the same document?
`@bitefoundry/sharepoint` enforces HTTP ETag concurrency checks on uploads and updates, rejecting stale writes instead of silently overwriting newer remote revisions.
Does this Microsoft 365 MCP stack require a hosted cloud relay or third-party backend?
No. Every binary runs locally on your machine, stores OAuth credentials in your native OS keychain, and communicates exclusively with official Microsoft Graph endpoints.
Related BiteFoundry Product Pages
More Technical Guides
Microsoft Teams MCP for Claude Code, Cursor & Codex
Connect Claude Code, Cursor, and Codex to Microsoft Teams via native Rust MCP & CLI (@bitefoundry/teams@0.14.0, ~33 MB RAM vs 1,240 MB Desktop, 16 stdio & Streamable HTTP MCP tools, --json compact reads, -p ANSI print, HTTP :8788, Shift+Y and confirm:true delete safety).
Atlassian Jira & Confluence MCP & Terminal Client (Zero Docker)
Unified Atlassian Jira & Confluence MCP server and Rust terminal client without Docker or Node (@bitefoundry/atlassian@0.12.0, 37 MCP tools / 15 --read-only tools, ADF <-> Markdown, cross-linking, j/cf aliases, HTTP :8789 + POST /mcp).
Read Public & Private Google Docs and Drive URLs from Terminal & MCP
Read public and private Google Docs and Drive URLs from the terminal and AI agents (@bitefoundry/gdocs@0.4.0, zero-login gdocs <url>, -p ANSI print, UTF-16 optimistic-locked editing + replace_doc_markdown, 11 stdio & Streamable HTTP MCP tools + --read-only, HTTP :8794, 5.4 MiB binary).