Disconnect Microsoft 365 from AI on Mac

Use AI to disconnect your Microsoft 365 account and wipe stored tokens on your Mac. Local, private, no cloud. Works with Claude, ChatGPT, Cursor and more.

L
LMCP··5 min read

The disconnect_m365_account tool lets your AI assistant sign you out of Microsoft 365 and permanently remove the stored access and refresh tokens from your Mac. It's the clean way to revoke LMCP's access to your Outlook mail, calendar, OneDrive, Teams and other Graph-backed services — no digging through settings menus required. You just ask in plain language: "Disconnect my Microsoft 365 account from LMCP and delete the saved tokens." The AI runs the tool, the tokens are wiped locally, and the connection is gone.

This is useful when you're switching work accounts, handing off a machine, troubleshooting a stale login, or simply tightening up what an AI can reach. Because LMCP is a free, native macOS MCP server with 150+ tools, everything happens on your Mac — there's no server-side copy of your credentials to chase down.

Which AI agents work?

LMCP exposes disconnect_m365_account to every MCP-capable assistant:

  • Desktop clients — Claude Desktop, Cursor, VS Code (GitHub Copilot), Windsurf and Zed auto-configure over local stdio. They talk to LMCP directly on your Mac, so the tool is available the moment you restart the client.
  • Web AIs — ChatGPT, Claude.ai (web), Grok and Perplexity connect through the LMCP Cloud Relay connector, which securely tunnels back to the server running on your machine.

The same tool, the same local execution, whichever assistant you prefer.

Automation

This tool chains naturally with the rest of LMCP's Microsoft 365 toolkit. A typical lifecycle: connect_m365_account to sign in, then everyday tools like m365_list_mail, m365_send_mail, m365_list_events or m365_list_files for real work — and finally disconnect_m365_account to revoke access cleanly. You can script a full reset by asking your AI to "disconnect my Microsoft 365 account and then reconnect using my other tenant," letting it run the disconnect, confirm the tokens are gone, and walk you through a fresh login in one conversation.

Context

Because LMCP runs on your actual Mac, the AI is working with your real Microsoft 365 session — the exact account that's signed in, not a sandboxed copy. When you ask it to disconnect, it operates on the genuine stored tokens in your local LMCP data, so the change is immediate and real. The assistant can confirm which account it just removed and tell you what to do next, all grounded in your live machine state rather than guesswork.

Productivity

Manually revoking an OAuth grant usually means hunting through Microsoft's account portal, Azure app permissions, or your client's connection settings — minutes of clicking for something that should take seconds. With disconnect_m365_account you say one sentence and it's done. For anyone juggling multiple tenants or regularly cleaning up test connections, that's a small daily friction removed and one less reason to leave stale credentials lying around.

Privacy & GDPR

Your Microsoft 365 tokens are stored locally on your Mac and never copied to any LMCP server. Disconnecting deletes them on-device, so nothing lingers in the cloud — there's nothing to delete remotely because there was never a remote copy. This local-first design is GDPR-friendly by default: see GDPR-compliant by architecture for the full picture. Download LMCP and keep your AI's access to Microsoft 365 entirely under your own control.

Ready to try it?

Works with Claude, Cursor, VS Code, ChatGPT and any MCP client

Download LMCP (.dmg)
FreemacOS 12+ · Apple Silicon & Intel

✦ llms.txt