@azrtydxb/kryton-init
v0.3.2
Published
Interactive installer that signs in to a Kryton server, mints an API key, and wires every supported AI agent host (Claude Code, Cursor, Codex, OpenCode, Cline, Continue, KiloCode, RooCode, Claude Desktop) to use it
Readme
@azrtydxb/kryton-init
Interactive installer that signs you in to a Kryton server, mints an API key, and wires every detected AI agent host on this machine to use it via MCP.
One command turns "I have a Kryton server" into "Claude Code, Cursor, Codex, Claude Desktop, Cline, Continue, OpenCode, KiloCode, and RooCode all see Kryton's tools" — without hand-editing nine different config files.
Quick start
Kryton is self-hosted — you need the URL of your Kryton server. Pass it in or let the installer prompt for it:
# Interactive — prompts for the server URL, then email + password
npx -y @azrtydxb/kryton-init
# Or pass the server explicitly
npx -y @azrtydxb/kryton-init --server https://kryton.example.com
# Or set it via env var
KRYTON_SERVER=https://kryton.example.com npx -y @azrtydxb/kryton-initThe installer will:
- Prompt for the server URL (or use
--server/KRYTON_SERVER), then probe<server>/api/health. - Prompt for email + password, sign in via the public auth endpoint.
- Mint an API key named
kryton-init: <hostname>withread-writescope. - Detect every supported AI agent host installed on this machine.
- Show a checkbox list — pick which hosts to wire.
- Write the MCP entry into each chosen host's config file (preserving everything else in it).
- Print a per-host post-install hint (which app needs a restart, where to toggle the server on, etc.).
Run it again any time to re-wire after installing a new host, or to point at a different server. Prior state is remembered so the URL prompt defaults to your last-used server.
Commands
| Command | What it does |
| ---------------------- | --------------------------------------------------------------------- |
| kryton-init (default) / kryton-init install | Full interactive flow described above. |
| kryton-init uninstall | Remove the kryton MCP entry from every wired host's config. |
| kryton-init status | Print the current state: server, key prefix, list of wired hosts. |
| kryton-init detect | List detected AI agent hosts; doesn't sign in or write anything. |
| kryton-init mcp | Print an MCP entry snippet for manual wiring (when a host isn't auto-supported). Use --host <name> for one specific host shape. |
Common flags
| Flag | Applies to | Meaning |
| -------------------------- | ------------------------- | ----------------------------------------------------------------------- |
| --server <url> | install | Kryton server base URL (required). Also reads KRYTON_SERVER. If neither is set and there's no prior state, you'll be prompted. |
| --hosts <a,b,c> | install, uninstall | Restrict to a comma-separated subset (host names below). |
| --dry-run | install, uninstall | Print the plan; write nothing. |
| --yes / -y | install, uninstall | Non-interactive: skip all prompts. Requires --server/KRYTON_SERVER/prior state and a previously-minted key to reuse; otherwise it errors out. |
| --host <name> | mcp | Print just that one host's MCP snippet shape. |
Supported hosts
Each host's config file is edited in place; everything else in the file is preserved.
| Name | App | Config file | Transport |
| ---------------- | ------------------------ | ---------------------------------------------------------------------------- | --------- |
| claude-code | Claude Code | ~/.claude.json | HTTP |
| cursor | Cursor | ~/.cursor/mcp.json | HTTP |
| claude-desktop | Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json (macOS), $XDG_CONFIG_HOME/Claude/… (Linux) | stdio |
| codex | OpenAI Codex CLI | ~/.codex/config.toml | stdio |
| opencode | OpenCode | $XDG_CONFIG_HOME/opencode/config.json | stdio |
| cline | Cline (VS Code) | VS Code extension dir for saoudrizwan.claude-dev-* | stdio |
| continue | Continue | ~/.continue/config.yaml | stdio |
| kilocode | KiloCode | $XDG_CONFIG_HOME/kilocode/mcp.json | stdio |
| roocode | RooCode (VS Code) | VS Code globalStorage dir for rooveterinaryinc.roo-cline | stdio |
Run kryton-init detect to see which of these are actually installed on this machine.
Transports
kryton-init picks the right transport per host:
- HTTP — the host hits
<server>/api/mcpdirectly with the bearer token inAuthorization. Faster, fewer moving parts, no separate process. - stdio — the host spawns
@azrtydxb/kryton-mcpvianpx, which proxies stdio JSON-RPC to the same/api/mcpendpoint. Used for hosts that don't (yet) speak Streamable-HTTP MCP.
The transport choice is per host and not configurable — it tracks whatever the host actually supports today.
State file
After a successful install, kryton-init records the install plan at:
$XDG_CONFIG_HOME/kryton-init/state.json
(default: ~/.config/kryton-init/state.json)It contains the server URL, the API-key id + prefix + full plaintext key (file is chmod 0600), and a hash of each wired host's config at write time. The hash is what lets uninstall refuse to clobber a config you've hand-edited since — pass --yes to override.
kryton-init uninstall removes the entries from each wired config and revokes the API key on the server.
Environment
| Variable | Used by | Notes |
| ----------------- | ------------ | ---------------------------------------------------------------- |
| KRYTON_SERVER | install | Default for --server. Overridden by an explicit flag. |
| XDG_CONFIG_HOME | all | Base dir for the state file and several host configs. |
Examples
Interactive, all detected hosts:
npx -y @azrtydxb/kryton-init --server https://kryton.example.comJust Claude Code, scripted (after at least one prior interactive install has minted a key):
npx -y @azrtydxb/kryton-init install \
--server https://kryton.example.com \
--hosts claude-code \
--yesPreview what would change, then bail:
npx -y @azrtydxb/kryton-init install \
--server https://kryton.example.com \
--dry-runPrint the snippet you'd paste into a host this tool doesn't yet auto-support:
npx -y @azrtydxb/kryton-init mcp --host claude-desktopUninstall
npx -y @azrtydxb/kryton-init uninstallRemoves Kryton's MCP entry from every previously-wired config and revokes the API key. Add --hosts <list> to scope to a subset; add --yes to force-remove past a config-hash mismatch.
See also
@azrtydxb/kryton-mcp— the stdio shim that's installed under the hood for non-HTTP hosts.- Kryton server docs — for the full tool catalogue exposed at
/api/mcp.
