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

m365-api

v0.1.6

Published

Local API adapter for Microsoft 365 Copilot Code models and reasoning effort

Readme

简体中文

m365-api

Connect Microsoft 365 Copilot Code to Claude CLI, Claude Desktop, and OpenAI-compatible clients.

Quick start (Windows PowerShell)

Install Node.js 24+, Edge, and your preferred Claude client. Your work account must have access to the Microsoft 365 Copilot Code page.

npm install -g m365-api --allow-scripts=m365-api

Global installation automatically runs setup: choose a port, initially 8787; a saved port is reused without asking. It configures the discovered Claude clients, enables Windows sign-in startup, starts the gateway, and prints the absolute configuration paths. To rerun setup or change the port:

m365-api setup --port 8787

If your network cannot reach npmjs, install the same package with its bundled dependencies from the distribution site:

npm install -g https://m365api.claxlink.top/releases/latest.tgz --allow-scripts=https://m365api.claxlink.top/releases/latest.tgz --no-audit --no-fund --foreground-scripts

The first startup attempts silent Microsoft sign-in. If interaction or MFA is required:

m365-api login --headed
m365-api start

Installation behavior

Global Windows npm installation deploys the runtime and command, then automatically runs setup. Runtime deployment does not scan or change old source PATH registrations, discover or back up legacy startup targets, or automatically migrate old deployments. Existing managed data is retained. Setup writes the current VBS startup entry directly.

If client configuration or first-use sign-in needs attention, the command stays installed and the console explains how to finish with m365-api setup. npm installs using --ignore-scripts require m365-api setup afterwards. Portable mode (M365_API_PORTABLE=1), local dependency installs, and non-Windows installs skip automatic host setup. Explicit source migration is available separately with m365-api migrate --legacy-root <path>; it is never run automatically.

Usage

claude --model opus --effort max
claude --model sonnet --effort max

In Claude Desktop, restart and use the selected m365-api profile, displayed as M365APP. Open Code and select a local project.

| Interface | Default address | |---|---| | Web interface / Claude base URL | http://127.0.0.1:8787 | | OpenAI base URL | http://127.0.0.1:8787/v1 |

Use the address shown by setup or status if you selected another port. Upload files through the web interface or compatible Claude / Anthropic file APIs; see reference.

Common commands

| Action | Command | |---|---| | Configure clients and start | m365-api setup | | Start / stop / restart | m365-api start / m365-api stop / m365-api restart | | Show status and configuration paths | m365-api status | | Check for an update | m365-api update --check-only | | Download, verify and apply an update | m365-api update | | Run in the foreground | m365-api start --foreground | | Preview client configuration | m365-api setup --check-only | | Enable / disable startup | m365-api startup / m365-api startup:remove | | Sign in interactively | m365-api login --headed |

Stopping interrupts active requests and does not disable startup. Setup enables Windows sign-in startup automatically; use m365-api startup:remove to disable it. Development-only command registration and test commands are available from Git checkouts.

With startup enabled, npm installations check the saved distribution address at each Windows sign-in, apply a verified update if available, then start the gateway. If the check or update fails, the preserved runtime still starts. Results are saved in .local/startup-update.log. Upgrading an older package also upgrades its existing startup launcher at the next start.

Updates and data

npm installations keep data under %LOCALAPPDATA%\m365-api on Windows. The saved settings are in .env; credentials, conversations and attachments are under .local. M365_API_HOME selects another data directory. Setup and status show the actual absolute configuration path.

m365-api update downloads a complete runtime from m365api.claxlink.top, verifies its SHA-512 digest, stages it alongside the current version and performs a self-check before switching. It requires no Git or npm-registry access. A running gateway is restarted and health-checked; failure attempts to restore the previous version and service. User data is shared across runtime versions. Interactive updates ask for y/n confirmation before interrupting connected clients. Unattended login updates preserve the running gateway when clients are connected. Preview does not change files or stop the gateway.

To use another distribution source, run m365-api update --source <HTTPS URL>. Package installation inherits your npm registry settings; the runtime distribution address is configured separately. Node.js and Edge remain system prerequisites.

For source development, configuration, file APIs and limitations, see the reference and contribution guide.