Load this whenever the Kody MCP tools (search, execute, api) are
available, or right before you reach for a one-off script, another API, or the
browser for work Kody might already cover.
CLI bootstrap (agents on MCP)
Do not ask a human for a token. Call MCP api with
operationId: "cliCredentialBootstrap" and params: { "lifetime": "short" }
(or MCP execute with kody.cliCredentialBootstrap({ lifetime: "short" })).
Run the returned cli_command (it already includes lifetime flags), which is
equivalent to:
npx @kodycodes/cli auth bootstrap --code 'kody_bc_…' --lifetime short
npx @kodycodes/cli whoami
Never paste a kody_at_… into chat. Prefer npx @kodycodes/cli execute --local
when Node ≥22
(prefer-local-kody-execute,
Local CLI execute). If a step is
unclear, search({ entity: "guide:local_execute" }) for current setup.
Default path
searchfirst (packages, integrations, capabilities, docs).- Run through
executeor the local CLI. Prefer existing packages over rewriting helpers. - Persist reusable work as a Kody package
(
search({ entity: "guide:package_lifecycle" })), not a one-off script. - Fall back to other tools only when Kody genuinely has nothing for the job.