hexuxiu/m365-copilot2api — explained in plain English
Analysis updated 2026-05-18
Point existing OpenAI or Anthropic API client code at Microsoft 365 Copilot models instead.
Run an MCP tool server that lets compatible AI apps call external tools through the gateway.
Manage multiple Microsoft accounts and API keys from a single web admin console.
Get web connected answers to current-events questions through the built in search capable model.
| hexuxiu/m365-copilot2api | gastownhall/wasteland | thephw/claude-meseeks | |
|---|---|---|---|
| Stars | 75 | 76 | 76 |
| Language | Go | Go | Go |
| Last pushed | — | 2026-06-20 | — |
| Maintenance | — | Maintained | — |
| Setup difficulty | moderate | moderate | easy |
| Complexity | 3/5 | 3/5 | 1/5 |
| Audience | developer | developer | vibe coder |
Figures from each repo's GitHub metadata at analysis time.
Requires a Microsoft 365 Copilot account and Go or Docker, default admin password must be changed after first login.
M365 Copilot2API is a gateway written in Go that turns Microsoft 365 Copilot into an API you can call the same way you would call OpenAI or Anthropic. If you already have code, scripts, or tools built around the OpenAI or Anthropic chat APIs, you can point them at this gateway instead and reach Microsoft's Copilot models through the same familiar request format. It exposes endpoints that match the OpenAI chat completions format, the newer OpenAI responses format, and the Anthropic messages format, and it supports streaming replies so text appears word by word instead of all at once. It also runs its own MCP, or Model Context Protocol, server with endpoints for listing and calling tools, which lets compatible AI tools discover and use external functions through this gateway. Several Copilot backed models are available through it, including options tuned for everyday conversation, faster lightweight replies, web connected answers for things like current weather, and slower models meant for harder math or logical reasoning tasks. One of the models can search the web directly as part of answering a question. The project includes a web based admin console for managing accounts, generating and revoking API keys, adjusting settings, and reviewing logs. It supports multiple Microsoft accounts logged in through OAuth, and it can route requests through a pool of proxies that rotates and pauses ones that fail. To run it, you clone the repository and start it directly with Go, or you can run it through Docker Compose. By default it listens only on your local machine and ships with a default admin password that the README says should be changed immediately after first login. For anyone exposing it beyond their own computer, the README recommends adding TLS encryption and a reverse proxy in front of it. The project is released under the MIT License.
A Go based gateway that lets you call Microsoft 365 Copilot using the same request format as OpenAI or Anthropic APIs.
Mainly Go. The stack also includes Go, Docker, MCP.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.