janusmcp — MCP server for Claude Code: multi-account
A local credential broker that sits in front of your MCP servers and keeps several accounts for the same service. Useful when one agent has to act as different clients.
claude mcp add janusmcp -- npx -y @bayway/janusmcpWhat janusmcp does
Most MCP clients hold a single identity per connector. Switching means disconnecting, redoing the OAuth login and editing config again. janusmcp takes the other path: accounts are registered once, and the active one changes on demand.
Three control tools do the work — janus_list_accounts, janus_use_account, janus_whoami. Only the active account's tools are exposed, so the context stays small instead of carrying every account's definitions. There is a CLI route as well: janusmcp tools, janusmcp schema and janusmcp call reach upstream tools from a terminal with no MCP session at all.
Credentials live in the OS keychain, not in config.json; you write them with janusmcp vault set and reference them as vault:supabase_client_a. CLI and MCP modes read the same config and remember the same active account. For clients that speak HTTP, start it with JANUS_TRANSPORT=http JANUS_HTTP_PORT=7332 ./bin/janusmcp serve and point the client at http://127.0.0.1:7332/mcp.
What it helps with
- keep several Supabase or GitHub accounts in one agent
- switch client identity without a fresh OAuth login
- call upstream tools from the shell without loading every schema
- keep tokens in the OS keychain instead of a config file
- avoid context bloat from inactive accounts' tools
Example prompts for the agent
- List my accounts and switch to client_b
- Which account is active right now?
- Call list_tables for the public schema through janusmcp
How to install janusmcp
Platform CLI
claude mcp add janusmcp -- npx -y @bayway/janusmcpPlatform CLI
codex mcp add janusmcp -- npx -y @bayway/janusmcpConfig file
{
"mcpServers": {
"janusmcp": {
"command": "npx",
"args": [
"-y",
"@bayway/janusmcp"
]
}
}
}Config file
{
"servers": {
"janusmcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@bayway/janusmcp"
]
}
}
}Platform CLI
gemini mcp add janusmcp npx -y @bayway/janusmcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about janusmcp
How do I install janusmcp in Claude Code?
Run claude mcp add janusmcp -- npx -y @bayway/janusmcp. The server then shows up in Claude's MCP server list.
What does janusmcp do?
It is a local account broker placed in front of real MCP servers, exposing only the active account's tools to the agent. You move between accounts without reconnecting or logging in again.
Where are the credentials stored?
In the OS keychain. The config holds a reference such as vault:supabase_client_a, and the value itself goes in through janusmcp vault set.