← ClaudeAtlas

mcp-reauthlisted

Re-authenticate the Teams MCP server with Claude driving the Microsoft device-code flow end to end — background-runs `teams-mcp auth`, scrapes the device code, stages and drives the login page in the browser, and leaves the user only the final biometric. Use when Teams MCP tools fail with auth or disconnect errors, when the user asks to "log in to Teams MCP", "re-auth MCP", "fix Teams auth", or when a pre-drafting health probe fails.
jgbright/mcp-dotnet · ★ 0 · AI & Automation · score 73
Install: claude install-skill jgbright/mcp-dotnet
# MCP re-auth, browser-driven Converts the Teams MCP re-auth from a manual context-switch into a mostly-automated flow where the user's only action is a biometric or MFA approval. `teams-mcp` signs in as a public client against the tenant and app registration named by `TEAMS_MCP_TENANT_ID` and `TEAMS_MCP_CLIENT_ID` (environment variables — the server refuses to start the flow without them). The resulting record and token cache persist under `%LOCALAPPDATA%\teams-mcp\`, so this flow is needed once per machine and then only when the record dies. ## Step 0 — probe before you authenticate Call a cheap Teams tool first (`list_chats` with `limit: 1`), or from a shell run `teams-mcp selftest`, which does a silent-auth Graph round-trip and prints raw errors. **Only run the flow below if the probe fails.** An existing token cache does NOT short-circuit `teams-mcp auth` — it runs the full interactive flow regardless, so re-running it against healthy auth costs the user an entire sign-in for nothing. ## The flow 1. **Start the sign-in in the background** (`run_in_background: true`): ``` teams-mcp auth ``` Device-code is the default. (`TEAMS_MCP_AUTH=browser` switches to a browser pop-up flow — that variant needs no driving at all beyond the user completing the pop-up, so the rest of this skill is about the device-code path.) 2. **Scrape the device code from the task output.** Azure.Identity prints the standard Microsoft instruction line — a URL (typically `https://m