Janusmcp

io.github.Bayway由 GitHub 帳號 Bayway 發布v0.6.2更新於 Oct 27, 2026

Multi-account tool broker for AI agents — CLI and MCP.

概覽

AI 產生的概覽

本機多帳號工具代理,置於其他 MCP 伺服器之前,讓助理為同一服務保留多個身分並在不重新連線的情況下切換帳號。

可以做什麼
  • 列出、切換並檢視帳號與設定檔,確認目前生效的身分
  • 在不變更目前帳號的情況下,用另一個帳號執行單次工具呼叫
  • 從命令列按需探索工具、檢視單一工具的 schema 並呼叫
  • 從內建範本新增帳號、透過瀏覽器 OAuth 連線,並把密鑰存入作業系統鑰匙圈
  • 為支援的 LLM 用戶端寫入或移除設定,並可執行選用的本機常駐程式
適用情境
當你同時服務多個客戶或公司,需要用不同帳號與權杖存取同一個服務(例如 Supabase、GitHub、Slack)時適用;也適合希望不在模型上下文中載入大量工具定義、改從 shell 按需呼叫工具的情境。
執行需求
以 stdio 本機程序執行,可從 npm 或預先建置的執行檔安裝,npm 套件需要 Node.js。需要一份列出帳號的設定檔,以及每個帳號的憑證:透過 vault 指令存入作業系統鑰匙圈的密鑰,或 OAuth 登入。Google Workspace 範本需要自備 OAuth 用戶端 ID 與密鑰。需要連線至所設定的上游 MCP 伺服器與 OAuth 提供者。
安裝前請注意
它是憑證代理,會保存多個帳號的存取權杖與密鑰,需妥善保護鑰匙圈與設定檔。工具呼叫會作用於真實的上游服務,是否變更資料取決於上游伺服器的權限。文件中的 Figma 變通做法會設定用戶端名稱以冒充已核准的用戶端,README 稱這可能違反該服務商的條款;此做法需手動開啟,預設不啟用。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Janusmcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

JanusMCP

One credential broker. Every account. From the CLI or MCP. Multi-account tool access for AI agents, with credentials kept local.

[CI] [Release] [License: MIT] [Status: alpha] [Website]


[Add to Cursor] [Install in VS Code]

One-click buttons require the npm package to be published. See RELEASING.md.

The problem

If you work with more than one company, you use the same MCP server (Supabase, GitHub, Slack…) with different identities — a different account, email and token per client. Today most LLM clients hold one account at a time per connector: to switch client you disconnect, reconnect, and redo the OAuth login. Every time.

The MCP protocol has no notion of "account": one session = one identity = one set of credentials. JanusMCP fills that gap.

What it does

JanusMCP is a local multi-account tool broker for AI agents. It can be used directly from the CLI or as an MCP server in front of the real upstream servers:

  • Add N accounts once for the same service and keep them all available.
  • Switch identity without reconnecting — no re-login, no fiddling with config.
  • Works with any LLM client — it just speaks standard MCP (stdio + Streamable HTTP).
  • Works without an MCP session too — agents can drive it directly from the CLI (code-execution mode): janusmcp tools / schema / call invoke tools on demand, with no bulk tool definitions loaded upfront.
  • Runs locally — your machine, your keychain, your control.
  • Keeps the context clean — it exposes only the active account's tools, not N×tools.
                 ┌─────────────────────────────┐   ┌─ Supabase (Client A)LLM client ─MCP─▶│   JanusMCP broker           │─▶ ├─ Supabase (Client B)(Claude/GPT/     │   active-account · vault ·  │   ├─ GitHub  (Client A) Gemini/…)       │   per-session scoping       │   └─ …                 └─────────────────────────────┘

You drive it with three control tools that appear in any client: janus_list_accounts, janus_use_account, janus_whoami.

Choose your mode

Use from the CLI — Claude Code, Codex, Cursor, scripts

bash
npm install -g @bayway/janusmcpjanusmcp toolsjanusmcp schema list_tablesjanusmcp call list_tables --args '{"schemas":["public"]}' --json --timeout 30s

The CLI discovers schemas only when needed, accepts JSON through --args or stdin, supports explicit accounts/profiles, and provides stable exit codes. See the CLI guide and copyable agent instructions.

Connect over MCP — desktop and chat clients

bash
npx @bayway/janusmcp serve# or configure a supported client automatically:janusmcp install claude-desktop

Both modes share the same config, OS-keychain vault, OAuth tokens and persisted active account. Use janusmcp daemon start to keep upstream sessions warm across repeated CLI calls.

Install

Once released, install via your favorite channel (all published automatically on each tag — see RELEASING.md):

bash
npx @bayway/janusmcp serve                       # npm / MCP modebrew install bayway/janusmcp/janusmcp     # Homebrew (macOS/Linux)scoop install janusmcp                               # Windowsdocker run --rm -p 7332:7332 ghcr.io/bayway/janusmcp:latest

…or download a prebuilt binary from Releases.

Build from source (60-second quickstart)

bash
git clone https://github.com/bayway/janusmcpcd janusmcp/gomake build                       # produces ./bin/janusmcpcp config.example.json config.json   # edit with your accounts./bin/janusmcp serve             # stdio, for Claude Desktop/Code

Two Supabase clients, PATs kept in your OS keychain (never in the config):

bash
./bin/janusmcp vault set supabase_client_a   # paste the PAT./bin/janusmcp vault set supabase_client_b
jsonc
// config.json{  "bindingMode": "session",  "accounts": [    { "id": "client_a", "service": "supabase", "command": "npx",      "args": ["-y", "@supabase/mcp-server-supabase@latest", "--read-only", "--project-ref=REF_A"],      "env": { "SUPABASE_ACCESS_TOKEN": "vault:supabase_client_a" } },    { "id": "client_b", "service": "supabase", "command": "npx",      "args": ["-y", "@supabase/mcp-server-supabase@latest", "--read-only", "--project-ref=REF_B"],      "env": { "SUPABASE_ACCESS_TOKEN": "vault:supabase_client_b" } }  ]}

Add it to Claude Desktop:

json
{ "mcpServers": { "janusmcp": {  "command": "/abs/path/janusmcp/go/bin/janusmcp", "args": ["serve"],  "env": { "JANUS_CONFIG": "/abs/path/janusmcp/go/config.json" } } } }

For ChatGPT / Gemini / Cursor / Copilot, run HTTP and point them at the URL:

bash
JANUS_TRANSPORT=http JANUS_HTTP_PORT=7332 ./bin/janusmcp serve# → http://127.0.0.1:7332/mcp

Commands

Run janusmcp help for the full reference. The essentials:

CommandWhat it does
janusmcp serveRun the broker (default). Transports via env: JANUS_TRANSPORT=stdio|http|both, JANUS_HTTP_HOST, JANUS_HTTP_PORT.
janusmcp tools [selector]Compact tool list for the active (or given) account/profile. --json for full definitions; optional --timeout.
janusmcp schema <tool>Full JSON definition of one tool. --account <id|profile> disambiguates; optional --timeout.
janusmcp call <tool>Invoke a tool. Supports --account, --args, stdin, stable --json, and optional --timeout.
janusmcp use <account|profile>Persist the active selector for future CLI commands and new MCP sessions.
janusmcp daemon start|stop|restart|statusManage the optional loopback-only daemon that reuses upstream sessions.
janusmcp uiOpen the local control panel — add accounts, log in, set secrets.
janusmcp add <template> [id]Add an account from a template (janusmcp catalog lists them).
janusmcp catalogList the built-in account templates.
janusmcp connect <id>Connect an account; for remote OAuth, opens the browser.
janusmcp statusShow each account's login/secret status (no secret values).
janusmcp vault set <name> / delete <name>Store / remove a secret in the OS keychain.
janusmcp login <provider> <name>OAuth loopback login; token referenced as oauth:<name>.
janusmcp providersList built-in OAuth providers.
janusmcp install <client>Configure an LLM client to launch JanusMCP.
janusmcp uninstall <client>Remove JanusMCP from an LLM client's config.
janusmcp version · janusmcp helpVersion · this reference.

Supported <client> values for install / uninstall: claude-desktop, claude-code, cursor, vscode, gemini, codex, chatgpt, print. Run janusmcp install list (or uninstall list) to see each target and whether it's already configured.

bash
janusmcp install claude-desktop      # one-command setupjanusmcp uninstall claude-desktop    # clean removal (restart the client afterwards)

Inside any connected client you also get the control tools janus_list_accounts, janus_use_account, janus_whoami, janus_login, janus_use_profile, and janus_with_account.

Profiles — a whole client's stack at once

A profile groups accounts of the same client across different services. Activating it exposes the tools of all its accounts together, and each call is routed to the right upstream:

jsonc
// config.json{  "accounts": [    { "id": "supabase_a", "service": "supabase", "transport": "http", "url": "https://mcp.supabase.com/mcp", "auth": "oauth" },    { "id": "github_a",   "service": "github",   "transport": "http", "url": "https://api.githubcopilot.com/mcp/", "auth": "oauth" }  ],  "profiles": {    "client_a": ["supabase_a", "github_a"]  }}

Then in chat: janus_use_profile with { "profile": "client_a" } → Supabase and GitHub tools for Client A are available simultaneously. Colliding tool names across accounts are namespaced (<account>_<tool>).

One-shot cross-account calls

janus_with_account runs a single call on another account without changing the active one — e.g. { "account_id": "client_b", "tool": "list_tables" }. Omit tool to list that account's available tools first.

Code-execution mode — context-efficient tools from the terminal

Loading every MCP tool definition into an LLM context is expensive. In code-execution mode an agent (or you) invokes tools on demand from the shell instead — à la "code execution with MCP" — so the context holds only the results it actually asked for:

bash
janusmcp tools                        # compact list for the active account/profilejanusmcp tools client_a               # ...or any account/profile explicitlyjanusmcp schema list_tables           # full input schema of ONE tool, only when neededjanusmcp call list_tables --args '{"schemas":["public"]}'janusmcp call ping --account azienda_b          # cross-account without switchingecho '{"sql":"select 1"}' | janusmcp call db_query   # JSON args via stdin toojanusmcp call ping --json --timeout 30s         # stable envelope for agents

call prints the tool's text content to stdout and exits non-zero on a tool error, so it composes with pipes and scripts. Selectors resolve exactly like in the broker: the persisted active account by default, or any account id / profile name; a name that collides across a profile's accounts must be disambiguated with --account. Secrets resolve through the same vault/OAuth stack as serve — nothing extra to configure.

This makes JanusMCP a first-class citizen for CLI-driven agents (Claude Code, Codex, Cursor agents, or any agent with shell access): instead of registering it as an MCP server, just tell the agent that janusmcp tools / schema / call exist. Discovery, schemas and invocation happen on demand, credentials stay in the keychain, and multi-account switching works the same as over MCP. Both modes share the config and the persisted active account, so you can mix them freely.

For repeated calls, janusmcp daemon start launches an authenticated loopback-only broker. tools, schema, and call auto-detect it and reuse its upstream sessions; --direct bypasses it and --daemon requires it. Set JANUS_DAEMON=auto|require|off to choose a default policy.

Key features

Multi-account, one endpointN identities for the same service, no reconnecting
Identity scopingper-call → per-session → global, via bindingMode: global | session | locked. Session scope needs a real connection: stdio and legacy HTTP have one; MCP 2026-07-28 removed sessions, so there it is per-call (janus_with_account) or global
Dual transportstdio (local-first clients) + Streamable HTTP (remote-first clients), same process. HTTP serves MCP 2026-07-28 and every earlier revision, each on the transport it requires
Secure vaultOS keychain (macOS/Windows/Linux) + encrypted-file fallback; secrets as vault:<name>
OAuth loopbackjanusmcp login (PKCE), tokens stored in the vault, auto-refresh, oauth:<name>
Context-safeonly the active account's tools are exposed; switching emits tools/list_changed
MCP and CLIsame broker as an MCP server or via janusmcp tools / schema / call — no bulk tool definitions loaded upfront

How it's different

The MCP gateway space (MetaMCP, mcp-proxy, IBM ContextForge, …) aggregates different servers behind one endpoint. JanusMCP solves the orthogonal, under-served problem: many identities for the same service, without saturating the model's context, from any LLM, fully local. It's a credential-aware broker, not a flat aggregator.

Built-in connectors

Scaffold an account from a ready-made template with janusmcp add <template> (run janusmcp catalog for the full, up-to-date list). Most use browser OAuth (dynamic client registration); a few need extra setup, noted below.

  • Remote, browser login (OAuth): supabase, github, notion, sentry, stripe, hubspot, paypal, linear, vercel, canva, neon, netlify, zapier.
  • SSE transport (legacy): asana, monday, intercom, webflow, wix, square, globalping.
  • Cloudflare (Streamable HTTP): cloudflare-bindings, cloudflare-observability, cloudflare-radar, cloudflare-builds, cloudflare-browser.
  • Google Workspace (bring-your-own OAuth client): gmail, google-drive, google-calendar, google-chat — see go/docs/google-workspace.md.
  • Per-account URL: activecampaign (paste your Remote MCP URL).
  • Figma: figma-desktop (local, recommended) and figma (remote, restricted — see below).
  • Generic building blocks: http-oauth, sse-oauth, supabase-pat, stdio.

Missing one? Add any remote server with http-oauth / sse-oauth, any local one with stdio, or define your own template in ~/.config/janusmcp/templates.json.

Provider notes

ActiveCampaign

ActiveCampaign ships an official remote MCP server with a unique URL per account (ActiveCampaign → Settings → Developer → Remote MCP URL) and browser-based OAuth — a natural fit for the multi-account broker. Add one account per client:

bash
janusmcp add activecampaign ac_clientA   # then paste that client's Remote MCP URL in config.jsonjanusmcp connect ac_clientA              # browser login

Because the URL is per-account, the template seeds a REPLACE_ACTIVECAMPAIGN_MCP_URL placeholder you must replace with your own URL. Login uses dynamic client registration, so no client ID/secret is needed.

Google Workspace (Gmail / Drive / Calendar / Chat)

Google offers remote MCP servers for Gmail, Drive, Calendar and Chat, but — unlike most providers here — they require your own OAuth client (created in the Google Cloud Console); they don't support dynamic client registration. JanusMCP supports this via the oauthClientId / oauthClientSecret / scopes fields, preset by the gmail, google-drive, google-calendar and google-chat templates:

bash
export GOOGLE_OAUTH_CLIENT_ID=... GOOGLE_OAUTH_CLIENT_SECRET=...janusmcp add gmail gmail_clientAjanusmcp connect gmail_clientA           # browser login as client A

Full one-time Google Cloud setup (enable MCP APIs, consent screen, Desktop OAuth client) and scope details are in go/docs/google-workspace.md.

Figma

Figma offers two MCP servers, handled differently here:

  • Local Dev Mode server (recommended). Figma's desktop app hosts an MCP server on http://127.0.0.1:3845/mcp. It's local, needs no OAuth, and works out of the box: enable it in the desktop app (Dev Mode → Inspect → Enable desktop MCP server) and add it with janusmcp add figma-desktop figma_work. Requires a Dev/Full seat on a paid Figma plan.

  • Remote server (https://mcp.figma.com/mcp) — restricted. Figma allowlists the OAuth client_name during dynamic client registration and returns 403 Forbidden to any client that isn't in its MCP catalog (VS Code, Cursor, Claude Code, …). JanusMCP is not (yet) an approved client.

    ⚠️ Workaround — opt-in, use at your own risk. You can make JanusMCP register under an approved name by setting "clientName": "Claude Code" on a remote figma account in your config.json. This impersonates an approved client and may violate Figma's Terms of Service; it can also break whenever Figma updates its allowlist. It is not enabled by default. Prefer the local Dev Mode server above for real work.

    The proper long-term fix is for JanusMCP to be submitted to and approved for Figma's MCP catalog, so no client_name override is needed. This is planned.

Status & roadmap

Alpha — the core is implemented and tested in Go.

  • Active-account model, per-session / global / locked scoping
  • stdio + Streamable HTTP transports
  • MCP 2026-07-28 (stateless core) on both transports, legacy revisions unchanged
  • OS-keychain vault + encrypted-file fallback
  • OAuth loopback (PKCE) with auto-refresh and per-spawn token resolution
  • One-command client install (janusmcp install …), Claude Desktop .mcpb, registry server.json
  • Multi-server "profiles" per client (Supabase + GitHub + Slack of Client A at once)
  • with_account one-shot cross-account calls
  • CLI / code-execution mode (janusmcp tools / schema / call) — invoke tools on demand instead of loading all definitions, to cut token usage
  • SSE upstream transport (in addition to Streamable HTTP + stdio) for SSE-only servers
  • Pre-registered OAuth clients (bring-your-own client for servers without dynamic client registration, e.g. Google Workspace)
  • Built-in connector catalog (25+ services) via janusmcp catalog / add
  • Signed, per-OS release binaries & registry auto-publish in CI

See design-broker-mcp-multi-account.md for the full design.

Repository layout

Project documentation

Privacy Policy

JanusMCP runs entirely on your machine. It has no backend servers, collects no data, and contains no analytics or telemetry — the developers receive nothing about you or your usage. Credentials and tokens are stored in your OS keychain (or, if you opt in, an encrypted local file) and are used only to authenticate to the services you configure; they never pass through the model context. Network connections are made only to the MCP servers and OAuth providers you configure. Because everything is local, data is retained only on your own device for as long as you keep it, and removing it (janusmcp vault delete <name>, or uninstalling) removes it entirely.

Full policy: https://janusmcp.dev/privacy.

Contributing

Contributions are very welcome — see CONTRIBUTING.md. New connector presets, client integration guides, and packaging help are especially appreciated.

License

MIT — see LICENSE.

來源:README.md,提交 f17e200

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.6.2最新Sep 27, 2026
  2. v0.6.0Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分