Multi-account agent tool CLI

CLI on the surface.
MCP under the hood.

Give Claude Code, Codex, Cursor and any shell-based agent on-demand access to your tools. JanusMCP discovers one schema at a time, keeps credentials in your local vault and routes every call to the right account.

Discover, inspect, call

Agents load only what they need. The complete catalog of tool schemas is not injected upfront.

npm install -g @bayway/janusmcp

janusmcp tools
janusmcp schema list_tables
janusmcp call list_tables --args '{"schemas":["public"]}'
janusmcp call ping --account client_b --json --timeout 30s

Compact discovery

tools returns names and short descriptions. Use --json only when full definitions are required.

One schema at a time

schema <tool> provides the exact input contract immediately before a call.

Stable automation

call --json, opt-in timeouts and documented exit codes make agent loops predictable.

Accounts, profiles and reuse

janusmcp status
janusmcp use client_a                 # persist the default account/profile
janusmcp tools client_b               # inspect without changing the default
janusmcp call ping --account client_b # one-shot cross-account call

janusmcp daemon start                 # keep upstream sessions warm
janusmcp daemon status --json
janusmcp call ping                    # auto-detects the daemon
janusmcp call ping --direct           # bypasses it for this call

The managed daemon listens only on 127.0.0.1, requires a randomly generated local bearer token and remains optional. Direct one-shot mode is always available.

Instructions for an AI agent

Copy this into your project instructions or agent skill:

Use JanusMCP from the shell for external tools.
1. Run `janusmcp tools [account-or-profile]` to discover relevant tools.
2. Run `janusmcp schema <tool> --account <selector>` before the first call.
3. Invoke with `janusmcp call <tool> --account <selector> --json --timeout 2m`.
4. Pass arguments through `--args '<json>'` or JSON on stdin.
5. Never guess a tool schema. Treat non-zero exit codes as failures and inspect stderr.

See the complete agent CLI guide.

Stable exit codes

CodeMeaning
0Success
1Unclassified error
2Invalid syntax, flag or JSON input
3Configuration, selector or tool lookup error
4Credential or authentication error
5Upstream connection or protocol error
6The MCP tool returned isError
124Timeout
130Interrupted by signal