04 / MICROSOFT 365 STACK · 8 min read · UPDATED 2026-12-06

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).

64 M365 Tools (+16 Teams) OS Keychain Auth ETag & data-id Safe Native Linux/macOS/Win
Outlook (@0.8.0) 26 MCP tools · HTTP :3939
OneNote (@0.8.0) 18 MCP tools · HTTP :8793
SharePoint (@0.8.0) 20 MCP tools · HTTP :8790
Auth & Storage OS Keychain · SQLite WAL + FTS5

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 & PackageBinariesMCP ToolsDefault HTTPSignature Safety / Efficiency Feature
Outlook (@bitefoundry/outlook@0.8.0)outlook26 tools127.0.0.1:393960s smart cache TTL, full draft lifecycle, selective fields:[...] projection; Mail, Calendar, Contacts & To Do unified.
OneNote (@bitefoundry/onenote@0.8.0)onenote18 tools127.0.0.1:8793Scoped 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-onedrive20 tools127.0.0.1:8790HTTP ETag concurrency guards block silent upload overwrites; 6-stream parallel discovery + indexed SQLite path lookup.
Teams (@bitefoundry/teams@0.14.0)teams16 tools127.0.0.1:8788Compact --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 & Authenticate the M365 Stack
# 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
Unified M365 MCP Config (.cursor/mcp.json or Claude Desktop)
{
  "mcpServers": {
    "outlook":    { "command": "outlook",    "args": ["mcp"] },
    "onenote":    { "command": "onenote",    "args": ["mcp"] },
    "sharepoint": { "command": "sharepoint", "args": ["mcp"] },
    "teams":      { "command": "teams",      "args": ["mcp"] }
  }
}
Claude Code Registration (All 4 M365 Servers)
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.

Outlook CLI Quick Patterns
# 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.

OneNote CLI & Offline FTS5 Search
# 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

5. SharePoint & OneDrive (20 Tools, :8790): ETag-Safe Uploads & Custom Columns

@bitefoundry/sharepoint bundles two commands—sharepoint for corporate sites, document libraries, and custom metadata lists, and bitefoundry-onedrive for personal OneDrive drives—backed by parallel 6-stream discovery and local SQLite schema caching.

When uploading revised specifications or build artifacts via CLI or the 20 MCP tools (list_sites, list_drives, list_files, get_file_info, download_file, upload_file, search_items), every update checks the file's HTTP ETag so an agent never silently overwrites a teammate's newer version.

SharePoint & OneDrive CLI Patterns
# Open corporate SharePoint TUI or jump straight into personal OneDrive
sharepoint
bitefoundry-onedrive

# Instant SQLite FTS5 search across files and custom columns
sharepoint search "architecture spec" --json
sharepoint info FILE_ID --drive DRIVE_ID --json
End-to-End Cross-App M365 Agent Workflow

With all four servers registered, one prompt to Claude Code can: (1) search_items in SharePoint for the latest release spec, (2) list_events in Outlook to verify the maintenance window, (3) patch_page_element by data-id in OneNote to check off pre-flight verification, and (4) send_message in Teams—all locally via OS keychain tokens with zero browser tabs open.

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