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
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Unclassified error |
| 2 | Invalid syntax, flag or JSON input |
| 3 | Configuration, selector or tool lookup error |
| 4 | Credential or authentication error |
| 5 | Upstream connection or protocol error |
| 6 | The MCP tool returned isError |
| 124 | Timeout |
| 130 | Interrupted by signal |