npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

m365connector

v0.3.14

Published

MCP server for Microsoft 365 data via Edge CDP

Readme

m365connector

MCP server that lets AI agents search and read Microsoft 365 data through a local Edge browser profile and Chrome DevTools Protocol (CDP). No browser extension is required at runtime.

How It Works

MCP Client          m365connector              Microsoft Edge
(Claude Code)       (this package)             (user profile + CDP)

  HTTP :52366          CDP :52367
  ───────────►  ─────────────────►
  Streamable HTTP     Captures M365 tokens,
  transport           opens Office/OWA pages

The server starts or connects to Edge with a persistent user profile. It captures Substrate tokens from M365 pages for search. Graph tokens are acquired from Graph Explorer by opening developer.microsoft.com/en-us/graph/graph-explorer and, if needed, tryit.graphexplorer.microsoft.com, then selecting a valid https://graph.microsoft.com access token rendered by the page.

Prerequisites

  • Node.js 18+
  • Microsoft Edge
  • An M365 work or school account signed in within the configured Edge profile

Quick Start

npx m365connector

You should see:

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

Then add to your MCP client config:

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

Environment Variables

| Variable | Default | Description | |----------|---------|-------------| | M365C_MCP_PORT | 52366 | HTTP port for MCP clients | | M365C_EDGE_DEBUG_PORT | 52367 | Edge CDP port | | M365C_EDGE_PATH | auto-detected | Microsoft Edge executable path | | M365C_EDGE_USER_DATA_DIR | phantomwright ud-m365 profile when present, else ~/.m365connector/edge-profile | Persistent Edge user data directory | | M365C_EDGE_PROFILE_DIRECTORY | Default | Edge profile directory inside the user data dir | | M365C_ALLOW_BROWSER_FOCUS | unset | Set to 1 to allow MCP-driven Edge tabs to come to the foreground for any active-tab request. By default Edge stays in the background unless Microsoft 365 requires user login, MFA, or consent. | | M365C_NEVER_FOCUS_BROWSER | unset | Set to 1 to prevent MCP-driven Edge tabs from ever coming to the foreground. When user interaction is required, the operation will wait/fail instead of stealing focus. | | M365C_TOKEN_REFRESH_WINDOW_SECONDS | 600 | Tool calls refresh Substrate and Graph tokens before execution when either token has less than this many seconds remaining. | | M365C_WORK_ACCOUNT_HINT | unset | Optional comma-separated substring(s), e.g. @contoso.com, used to choose and validate the work/school account. Tokens from personal Microsoft accounts are rejected by default. | | M365C_ALLOW_PERSONAL_ACCOUNT | unset | Set to 1 to allow personal Microsoft accounts. Not recommended for work connectors. | | M365C_TOKEN_CACHE_PATH | ~/.m365connector/token-cache.json | Local token cache path; stores only current unexpired captured tokens |

Tools

  • search: Search emails, files, Teams chats, calendar events, and external connectors through Substrate.
  • open: Read a search result. Office files and protected email can fall back to Edge-driven Office Online or OWA extraction.
  • whoami: Read current user profile from Microsoft Graph.
  • find_people: Find directory users with Graph filters.
  • count_people: Count directory users with Graph filters.
  • token_status: Inspect cached Substrate and Graph token state without forcing refresh.
  • refresh_tokens: Force-refresh Substrate and Graph tokens by restarting the configured Edge profile, then capturing tokens from new browser tabs.

Security

  • The MCP server binds to 127.0.0.1.
  • The Edge CDP port is local-only and uses the configured local user profile.
  • Read handles are server-issued opaque UUIDs with 30-minute TTL.
  • Access tokens are kept in server memory, cached locally with 0600 permissions, and are not printed.