HEXUXIU

    HEXUXIU/M365-Copilot2API

    #50 this week

    Microsoft 365 Copilot → OpenAI / Anthropic 兼容 API 网关。

    api
    Go
    NOASSERTION
    557 stars
    190 forks
    557 GitHub watchers
    Updated Oct 13, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    Ranks #50 of 2,503 repositories GStars tracks this week (top 2%).

    5 releases in the last 90 days, the latest 6 days ago, with 7 contributors on GitHub.

    Use Cases & Benefits

    • Provides a self-hosted Go API gateway translating Microsoft 365 Copilot's private ChatHub WebSocket protocol into OpenAI and Anthropic compatible APIs.
    • Enables seamless use of Microsoft 365 Copilot services through standard OpenAI/Anthropic API formats with multi-account management and automatic failover.
    • Use for integrating Microsoft 365 Copilot capabilities into existing OpenAI-compatible client applications without protocol changes.
    • Use for managing multiple Microsoft 365 accounts with automatic load balancing and fault tolerance in a private API gateway setup.
    • Use for deploying a local web console to control API keys, proxy pools, usage statistics, and cloud conversation management for personal or research use.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    Other

    GitHub could not identify this license; read the LICENSE file before depending on it.

    Community files

    • README: present
    • Contributing guide: present

    Watch-outs

    • License not identified by GitHub; read the LICENSE file before depending on it.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    Microsoft 365 Copilot → OpenAI / Anthropic 兼容 API 网关

    M365 Copilot2API 是一个用 Go 编写的自托管网关,把微软 365 Copilot 商业订阅背后的 ChatHub 私有协议(WebSocket)翻译成标准的 OpenAI / Anthropic 兼容 API。Claude Code、OpenCode、Cursor 以及任何 OpenAI 客户端都可以直接用熟悉的格式调用 M365 Copilot。

    工作原理概括:ChatHub 私有协议 ⇄ OpenAI / Anthropic 兼容 API。连接握手、心跳保活、事件流解析、工具调用转换全部封装在 internal/chathub 层,对外只暴露 /v1/chat/completions、/v1/messages 等标准端点。

    项目自带完整 Web 管理控制台,覆盖账号授权(OAuth/PKCE)、API Key 管理、代理池、云端对话管理、用量统计与模型测试,适合个人自部署、自托管使用。

    ⚠️ 免责声明(请务必阅读)

    • 本项目不是微软官方产品,与 Microsoft、OpenAI、Anthropic 及其关联公司均无任何从属或合作关系。
    • 使用第三方账号池、代理转发等方式接入 M365 服务可能违反服务商服务条款,由此产生的一切后果由使用者自行承担。
    • 请遵守当地法律法规与目标平台的服务条款(ToS)。
    • 本项目仅供个人学习与研究,禁止用于商业转售或规模化运营。
    • 账号被封禁、数据丢失等任何损失,本项目维护者与贡献者概不负责。
    Excerpt from the HEXUXIU/M365-Copilot2API README on GitHub (NOASSERTION license). © its authors.Read the full README on GitHub

    Compared with peers in API

    Fastest-growing repositories GStars tracks in this cohort for the week of Oct 11, by 7-day star growth

    HEXUXIU/M365-Copilot2API compared with API repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    vxcontrol/pentagi30.5K+5.1K7510 days ago
    NdoleStudio/httpsms6.0K+6697548 days ago
    palemoky/chinese-poetry-api3.4K+40032103 days ago
    public-apis/public-apis488.0K+075—
    hasura/graphql-engine32.1K+07536 days ago
    HEXUXIU/M365-Copilot2API557+0386 days ago
    Category median30.5K+40075—

    Discover Repositories

    Search across tracked repositories by name or description