# Shared MCP servers (SaneCode docs)

> SaneCode is a Windows app that runs several Claude desktop accounts in one window. Each account is the official, unmodified Claude desktop app with its own data folder; SaneCode starts one per account and docks their windows beside its sidebar, so every account stays signed in. Free for 2 accounts; Pro ($29 once) for more. Not affiliated with Anthropic.

Page: https://sanecode.co/docs/share-mcp-servers-across-claude-accounts/
Markdown: https://sanecode.co/docs/share-mcp-servers-across-claude-accounts.md

## All SaneCode docs pages
- [Let Claude use SaneCode (MCP) and failover](https://sanecode.co/docs/let-claude-use-sanecode-mcp-failover/): SaneCode's own MCP server lets Claude see your accounts and their usage limits, carry a conversation on in another account when one runs out, schedule Continue after the reset, and report what happened while you were away. (Markdown: https://sanecode.co/docs/let-claude-use-sanecode-mcp-failover.md)
- [Use SaneCode from ChatGPT, Claude.ai and other AI apps](https://sanecode.co/docs/use-sanecode-from-chatgpt-claude-and-other-ai-apps/): Connect SaneCode's remote MCP server (mcp.sanecode.co) to ChatGPT, Claude.ai, Claude Code, Cursor, VS Code and other AI apps, so they can check your Claude accounts and move or schedule work on your PC. (Markdown: https://sanecode.co/docs/use-sanecode-from-chatgpt-claude-and-other-ai-apps.md)
- [Overview](https://sanecode.co/docs/): What SaneCode is and how it fits with Claude desktop. (Markdown: https://sanecode.co/docs/index.md)
- [How SaneCode works](https://sanecode.co/docs/how-sanecode-runs-multiple-claude-instances/): How SaneCode runs several Claude desktop accounts at once on Windows, where each account's data lives, what every account shares, what SaneCode changes on your PC, and how its settings connect. (Markdown: https://sanecode.co/docs/how-sanecode-runs-multiple-claude-instances.md)
- [Install and first run](https://sanecode.co/docs/install-sanecode-on-windows/): Install SaneCode and bring in the Claude you already use. (Markdown: https://sanecode.co/docs/install-sanecode-on-windows.md)
- [Add Claude accounts and sign in](https://sanecode.co/docs/add-claude-accounts-and-sign-in/): Add a second (or fifth) Claude account to SaneCode, sign in once with the built-in guide, and fix sign-ins that land in your other Claude. (Markdown: https://sanecode.co/docs/add-claude-accounts-and-sign-in.md)
- [Switching and windows](https://sanecode.co/docs/switch-claude-accounts-without-signing-out/): Shortcuts, popping out, chat tabs, and what happens when SaneCode closes. (Markdown: https://sanecode.co/docs/switch-claude-accounts-without-signing-out.md)
- [Layouts: Split, Grid and Canvas](https://sanecode.co/docs/claude-desktop-side-by-side-layouts/): See several Claude accounts or chats at once in SaneCode. Split and Grid are free, Canvas is Pro. Every control, what it does, and the limits. (Markdown: https://sanecode.co/docs/claude-desktop-side-by-side-layouts.md)
- [Continue a Claude conversation in another account after a usage limit](https://sanecode.co/docs/continue-claude-session-in-another-account/): When a Claude account hits its usage limit, move the Claude Code conversation to another of your accounts and keep going with the full context, no new chat, no re-explaining. (Markdown: https://sanecode.co/docs/continue-claude-session-in-another-account.md)
- [Continue after reset (Automations)](https://sanecode.co/docs/continue-claude-after-usage-limit-resets/): Send “Continue” or your own prompt to any Claude account's window, or to Codex, when its usage limit resets. Several at once, logged, without keeping the window in front. (Markdown: https://sanecode.co/docs/continue-claude-after-usage-limit-resets.md)
- [Shared MCP servers](https://sanecode.co/docs/share-mcp-servers-across-claude-accounts/): Set up an MCP server once in SaneCode and every Claude account gets it, instead of configuring it in each account. (Markdown: https://sanecode.co/docs/share-mcp-servers-across-claude-accounts.md)
- [Claude in Chrome for every account](https://sanecode.co/docs/claude-in-chrome-for-every-account/): Use Claude in Chrome from every Claude desktop account in one Chrome profile, without signing the extension out and in when you switch. (Markdown: https://sanecode.co/docs/claude-in-chrome-for-every-account.md)
- [Claude desktop and Claude Code themes](https://sanecode.co/docs/claude-desktop-and-claude-code-themes/): Change the theme of Claude desktop's Code tab in every account at once. SaneCode applies a Claude Code theme (colours and a background) with one setting, in light or dark mode, without modifying Claude. (Markdown: https://sanecode.co/docs/claude-desktop-and-claude-code-themes.md)
- [Claude Code plugins, skills, mods and MCP with several accounts](https://sanecode.co/docs/claude-code-plugins-and-skills-in-every-account/): Plugins and skills added in Claude desktop belong to one account; Claude Code's own .claude folder is one per PC. Which extensions every account shares, which stay per account, and how to set them up. (Markdown: https://sanecode.co/docs/claude-code-plugins-and-skills-in-every-account.md)
- [Settings](https://sanecode.co/docs/sanecode-settings/): Every setting and exactly what it changes. (Markdown: https://sanecode.co/docs/sanecode-settings.md)
- [Invite friends: $5 off Pro each](https://sanecode.co/docs/invite-friends-get-pro-discount/): Share your SaneCode referral link. Every friend who signs up and signs in from SaneCode takes $5 off your Pro, and gets $5 off theirs. Six friends make Pro free. (Markdown: https://sanecode.co/docs/invite-friends-get-pro-discount.md)
- [Claude updates and repair](https://sanecode.co/docs/claude-desktop-updates-and-repair/): What happens when Claude desktop updates, resets or is reinstalled. (Markdown: https://sanecode.co/docs/claude-desktop-updates-and-repair.md)
- [FAQ and troubleshooting](https://sanecode.co/docs/sanecode-faq-and-troubleshooting/): Common questions and fixes. (Markdown: https://sanecode.co/docs/sanecode-faq-and-troubleshooting.md)

## Questions people ask
- How do I add a second Claude account?
- How do I continue a Claude Code session in another account after a usage limit?
- How do I share my MCP servers with every Claude account?
- Does SaneCode change the Claude app or my sign-ins?

---

# Shared MCP servers

If you use the same [MCP servers](https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop) in several Claude accounts (a filesystem server, a database, a
[Notion](https://developers.notion.com/docs/mcp) or GitHub server you run locally), you normally have to add each one to every account's
Claude config. SaneCode keeps **one shared list** and adds it to every account for you. Other ways to do it, compared: [How to share MCP servers across multiple Claude accounts](https://sanecode.co/blog/share-mcp-servers-across-claude-accounts/).

## Set it up

1. Open **Settings → Shared MCP servers → Edit shared list**. A file opens
   (`%APPDATA%\SaneCode\mcp.json`).
2. Add servers in the same format as [Claude desktop](https://claude.com/download)'s own config:

```json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "C:\\Users\\you\\Documents"]
    }
  }
}
```

3. Press **Apply to all accounts**. SaneCode also applies the list every time it starts.
4. A Claude that's already open loads the new servers after a **Restart** (title bar).

## What it changes, exactly

- Each account's `claude_desktop_config.json` gets the shared servers under their names.
- Servers an account had on its own are **left alone**.
- Remove a server from the shared list and SaneCode removes it from the accounts it added it to,
  and only those.

## Which accounts get a server?

Every account, unless you pick. Under **Settings → Shared MCP servers** each server in the list shows
your accounts: click one to take the server away from it or give it back, or press
**Every account**. SaneCode applies the change at once (an open Claude loads it after a restart).

![SaneCode Settings, Shared MCP servers: filesystem goes to every account, linear only to work and client](https://sanecode.co/shots/shared-mcp-servers-every-claude-account.png "Each shared server, with the accounts that get it.")

In the file it's one extra field, which SaneCode keeps for itself and never writes into Claude's
config: `"accounts": ["work@acme.com", "client@northwind.dev"]`. No field means every account,
including ones you add later.

## Is a shared server the same login in every account?

Yes. Signing in to an MCP server has nothing to do with your Claude account: you sign in to the
**service** (Linear, GitHub, Notion…), and the server only ever sees that service's token, never
which Claude account is asking. So a shared server acts as **the same login in every account it's
given to**: an issue created from your personal Claude shows up in Linear as the same user as one
created from your work Claude.

For a different login per account (your work Linear in the work account, a personal one in
another), give the server to one account here, or add it in that account's own Claude config,
which SaneCode never touches. Each account then signs in to the service on its own.

## How do servers that need a key or a sign-in work?

Every account gets the same entry, so every account uses the same credentials. Four kinds:

**1. API key or token for a server on this PC.** Put it in `env`, the way the
[MCP spec](https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization) asks local
servers to "retrieve credentials from the environment". SaneCode writes the entry as it is.

```json
"github": {
  "command": "npx",
  "args": ["-y", "@modelcontextprotocol/server-github"],
  "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_…" }
}
```

**2. Remote server that signs in with OAuth** (Linear, Atlassian, most hosted servers). Paste the
URL the provider documents, in the same shape Claude Code uses:

```json
"linear": { "type": "http", "url": "https://mcp.linear.app/mcp" }
```

Claude desktop only runs servers with a `command` from its config file (it skips a bare `url` with
"Some MCP servers couldn't be loaded"), so SaneCode writes each account an
`npx -y mcp-remote https://mcp.linear.app/mcp` entry. [mcp-remote](https://github.com/geelen/mcp-remote)
does the OAuth: the first time a Claude uses the server, your browser opens once to sign in. It
keeps the tokens in `%USERPROFILE%\.mcp-auth`, which every account on your Windows user shares, so
**one sign-in covers every account** and refreshes are coordinated between them. Use `"type": "sse"`
for an older SSE-only server. Needs [Node.js](https://nodejs.org/) (for `npx`).

If the provider gave you an OAuth client instead of letting apps register themselves, add
`"oauth": { "clientId": "…", "callbackPort": 9696 }` (the port you registered as the redirect).

**3. Remote server with an API key in a header.**

```json
"my-api": {
  "type": "http",
  "url": "https://mcp.example.com/mcp",
  "headers": { "Authorization": "Bearer sk-…" }
}
```

SaneCode passes the header to mcp-remote through `env` (`--header Authorization:${SANECODE_HEADER_1}`),
never on the command line: Claude on Windows doesn't escape spaces in `args`, which breaks
`Bearer …` values ([mcp-remote README](https://github.com/geelen/mcp-remote)).

**4. Connectors you add inside Claude** (Customize → Connectors: Notion, Slack, Google Drive…).
Claude connects to them "from Anthropic's cloud infrastructure, rather than from your local device"
and each account signs in to its own ([Anthropic](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp)).
They can't be shared from outside: connect them in each account, or list the same service here as
type 2 or 3 if it offers a remote MCP URL.

A common pattern is a single **MCP gateway** that connects to all your tools and is the only
server you list here; every account then reaches all of them through it.

## Where do my keys go?

Only into each account's own `claude_desktop_config.json`, which is where Claude reads them, and
into your shared list (`%APPDATA%\SaneCode\mcp.json`). SaneCode doesn't log them or send them
anywhere: its notes and diagnostic log name servers, never values.

## What if an entry is wrong?

- An entry Claude couldn't run (no `command` or `url`, a number in `env`, a `headersHelper`) isn't
  written to any account; SaneCode names it and says why.
- If `mcp.json` isn't valid JSON (a missing comma), SaneCode changes nothing and tells you, so a
  typo never takes servers out of your accounts.
- Want a server signed in to a **different** identity in each account (two Atlassian sites, say)?
  Add it in each account's own config instead: shared servers share one sign-in.

Related: [Accounts](https://sanecode.co/docs/add-claude-accounts-and-sign-in/) · [Settings](https://sanecode.co/docs/sanecode-settings/) · [Why native](https://sanecode.co/native/)
