M365 Connector

v1.2.4 · Updated Mar 23, 2026

Browser extension + MCP server that lets AI agents search, read, and interact with your Microsoft 365 data. Works with Claude Code, Claude Desktop, and any MCP-compatible client.

Install the Chrome extension, start the MCP server, and your AI agent gets full access to M365 — emails, files, Teams chats, calendar events, and people directory. No API keys, no app registrations. Tokens are captured passively from the browser.

MCP Tools

Five tools exposed to any MCP client:

ToolDescription
searchSearch across emails, files, Teams chats, calendar events, and external connectors
openRead best-effort content for a search result (via opaque read handle)
whoamiQuery current signed-in user profile via Microsoft Graph /me
find_peopleFind directory people with multi-field filters
count_peopleCount directory people matching filters

Architecture

MCP Client MCP Server (daemon) Browser Extension (Claude Code) (Node.js) (Chrome/Edge MV3) HTTP :52366 WebSocket :52365 ───────────► ◄──────────────────► Streamable HTTP IPC bridge Captures tokens, transport (localhost) executes API calls

The MCP server runs as a long-lived process. The browser extension connects to it over WebSocket and handles all M365 API calls using tokens passively captured from the browser.

LayerDetails
ExtensionChrome/Edge Manifest V3, captures Substrate + Graph tokens
MCP ServerNode.js, Streamable HTTP transport on port 52366
IPCWebSocket on port 52365 (localhost only)
AuthPassive token capture from browser sessions — no app registration needed
APIsMicrosoft Substrate + Microsoft Graph

Install

1. Install the browser extension

Install from the Chrome Web Store:

Chrome Web Store → M365 Connector

Works on Chrome and Edge. After installing, the extension automatically captures auth tokens from your M365 session. Click the extension icon to verify — Substrate should show Valid.

2. Start the MCP server

Run with npx (no install needed):

npx m365connector

Or install globally:

npm install -g m365connector && m365connector

You should see:

[m365connector/ws] listening on ws://127.0.0.1:52365
[m365connector] MCP HTTP listening on http://127.0.0.1:52366/mcp

3. Configure your MCP client

Add to your MCP config (e.g. ~/.claude/mcp.json):

{
  "mcpServers": {
    "m365-connector": {
      "type": "http",
      "url": "http://127.0.0.1:52366/mcp"
    }
  }
}

Restart your MCP client to pick up the config.

Prerequisites

Usage

Once connected, ask your AI agent to search M365 naturally:

> Search my email for messages about the quarterly review
> Find files related to Project Alpha
> Look up John in the company directory
> Search Teams chats about the deployment issue
> What meetings do I have tomorrow?

The agent uses search to find results, then open with a result's _readHandle to fetch full content. It can also call whoami, find_people, and count_people for directory and profile lookups.

Tools reference

Search across M365 data sources.

ParameterTypeRequiredDefaultDescription
querystringyesSearch query
conversation_idstringyesIdentifier for grouping related requests
sourcestringnoallall, email, files, chat, events, external
connectorstringnoExternal connector name (when source=external)
sizeintegerno10Results per page (1–25)
fromintegerno0Pagination offset

open

Read the content of a search result.

ParameterTypeRequiredDescription
read_handlestringyesOpaque handle from a search result's _readHandle field
conversation_idstringyesSame conversation ID used in the originating search

Returns content with a completeness field: full, partial, or snippet.

whoami

Get the current signed-in user's basic profile from Graph.

ParameterTypeRequiredDefaultDescription
conversation_idstringyesConversation identifier
direct_reports_sizeintegerno30Max direct reports to return (1–100)

Returns display name, alias, email/UPN, title, department, office, phones, and best-effort manager and directReports info when directory scopes are available.

find_people

Find people via Graph directory query.

ParameterTypeRequiredDefaultDescription
conversation_idstringyesConversation identifier
querystringnoFree-text query across person fields
aliasstringnoFilter by alias (mailNickname)
principalNamestringnoFilter by user principal name
displayNamestringnoFilter by display name
departmentstringnoFilter by department (prefix match)
officestringnoFilter by office location (prefix match)
titlestringnoFilter by job title (prefix match)
sizeintegerno20Max people to return (1–50)
include_direct_reportsbooleannofalseInclude direct reports for each result
direct_reports_sizeintegerno30Max direct reports per result (1–100)

At least one filter parameter is required. Returns { filters, results, total }.

count_people

Count people matching directory filters without returning full results.

ParameterTypeRequiredDescription
conversation_idstringyesConversation identifier
querystringnoFree-text query across person fields
aliasstringnoFilter by alias
principalNamestringnoFilter by user principal name
displayNamestringnoFilter by display name
departmentstringnoFilter by department (prefix match)
officestringnoFilter by office location (prefix match)
titlestringnoFilter by job title (prefix match)

Returns { filters, count }.

Using as a Claude Code skill

M365 Connector ships with a Research skill that combines M365 search with web search (Lumina) to answer questions comprehensively. The skill gives Claude full knowledge of all 5 MCP tools plus a parallel dual-backend search strategy.

  1. Install the extension + server — follow the install steps above.
  2. Install the skill — use Claude Code's plugin system:
    /plugin marketplace add ttthree/m365connector-docs
    /plugin install research@m365connector-docs

    Or manually download SKILL.md:

    mkdir -p .claude/skills/research
    curl -fsSL https://raw.githubusercontent.com/ttthree/m365connector-docs/main/skills/research/SKILL.md \
      -o .claude/skills/research/SKILL.md
  3. Use it — Claude Code discovers the skill automatically. Just ask:
    > What emails did I get from my manager today?
    > Summarize what's been happening on Project Alpha
    > Who is Alice Smith? What team is she on?
    > Find files related to the quarterly report
Dual-backend search. The Research skill always searches both M365 (internal data) and Lumina (public web) in parallel, then synthesizes a comprehensive answer. Use --high for exhaustive research mode.

Environment variables

VariableDefaultDescription
M365C_MCP_PORT52366HTTP port for MCP clients
M365C_WS_PORT52365WebSocket port for extension IPC

Security

Limitations

Troubleshooting

IssueFix
Extension shows "No token"Open any M365 page (e.g. outlook.office.com) and wait a few seconds for the extension to capture tokens
MCP server won't startCheck that port 52366 is available: lsof -i :52366
Claude Code can't connectVerify MCP config in ~/.claude/mcp.json and restart Claude Code
Search returns no resultsEnsure the extension shows valid tokens — click the extension icon to check
WebSocket connection refusedMake sure the MCP server is running (npx m365connector)