Rotate the token
$KRAFT_HOME/run/mcp-token and $KRAFT_HOME/run/trigger-token stay the same
until you delete them. The commands below follow KRAFT_RUN_DIR when it is
set, and kraft admin doctor prints each token's path. The bearer token
says what each one grants. A server accepts the old value until it restarts.
Rotate it
- Pause any active item that runs in place. A restart ends their agents, and once the
mcp-tokenis gone a server bound off loopback refuses thekraftCLI, sokraft admin restartcan't list them. - Delete the file you are rotating, or both. Run only the lines you need:
rm "${KRAFT_RUN_DIR:-${KRAFT_HOME:-$HOME/.kraft}/run}/trigger-token" rm "${KRAFT_RUN_DIR:-${KRAFT_HOME:-$HOME/.kraft}/run}/mcp-token" - Restart Kraft. Kraft writes a new
token on start, with mode
0600. - Resume the items you paused:
kraft item resume ID. - Put the new
trigger-tokenwherever its sender lives, such as a CI secret or a webhook. ThekraftCLI and the MCP server on this machine read themcp-tokenfile on every call, so they need no setup. A console on another machine doesn't hold themcp-token: it signs in with the password, and rotating the token doesn't touch its session. To end a session, sign it out in the web UI or change the password.
Check it worked
You know it worked when the file's modification time is the time of the restart:
ls -l "${KRAFT_RUN_DIR:-${KRAFT_HOME:-$HOME/.kraft}/run}/trigger-token"
ls -l "${KRAFT_RUN_DIR:-${KRAFT_HOME:-$HOME/.kraft}/run}/mcp-token"
A file you failed to delete keeps its old time. kraft admin doctor also shows
the mcp token and trigger token rows with the file's path and mode 0600.
Next steps
- Security in depth: what each token grants
- Remote access: the password and the ways in
- Inbound triggers: where the trigger token goes
Free disk space
See what the worktrees use, make room by archiving or abandoning items or from Settings › Storage, and set a limit with automatic clean-up.
Run items in your own checkout
Let a repo's work items run in the folder you connected, instead of in a git worktree each, and get one going again when Kraft stops it to keep your edits safe.