How I run separate work & personal profiles in Claude Code (one command to switch)
I use Claude Code for both my personal projects and my day job. The problem: those are two totally different Microsoft environments with different rules. My work tenant is locked down and blocks third-party MCP servers. My personal setup has no such restriction and runs a bunch of MCPs. Cramming both into one config was messy โ and risky, because the wrong tool or the wrong account could fire in the wrong context. So I split it into two fully isolated profiles I switch between with a single command. The key trick: CLAUDE_CONFIG_DIR Claude Code loads its entire config from one directory โ MCP servers, plugins, memory, permissions, even its own login. Point an environment variable at a different folder and you get a clean, completely separate profile. Personal = the default ~/.claude (MCPs on) Work = ~/.claude-work (no Microsoft MCP โ CLI/REST only) Nothing leaks between them. Different memory, different plugins, different permissions, different sign-in. One command to switch I dropped two functions into my PowerShell profile: function claude-personal { $env:CLAUDE_CONFIG_DIR=$null; claude @args } function claude-work { $env:CLAUDE_CONFIG_DIR="$env:USERPROFILE\.claude-work"; claude @args } Now claude-work launches the locked-down work brain and claude-personal launches my normal one. That's the whole switch. Why the work profile uses CLI instead of MCP Since work won't allow MCP servers for Microsoft, the work profile's CLAUDE.md has a hard rule baked in: No Microsoft MCP. Use CLI/REST only: CLI for Microsoft 365, Azure CLI, Power Platform CLI, Graph. Here's the insight that made this click for me: first-party Microsoft CLIs are usually allowed by corporate Conditional Access even when third-party MCP connectors are blocked โ because you authenticate with Microsoft's own app IDs, not a third party's. So I didn't actually lose access to anything. I just reach it through the CLI/REST layer instead of an MCP tool. Same APIs underneath. Bonus: I built it "MCP-ready"