A TOML config saved with Windows line endings, such as Codex's, keeps them when setup adds or removes our entry, as the JSONC and YAML configs already do. A file that mixes line endings, or whose values the change would alter, is written as before.
`mcp_servers: null` or `~`, with or without a comment, is now an empty table like `{}`, so our entry goes into it and the comment is kept. A flow table with members, or a value that carries on onto the next line, is still left to the person.
On Windows the coding apps keep their settings under the user profile and ignore HOME, which a shell such as MSYS2 or Cygwin points elsewhere. Setup now takes USERPROFILE first there and HOME first elsewhere, and an empty value counts as not set.
A registration may name the CLI by its bare name (`craft-anything-cli mcp`), as `claude mcp add` writes it. The app starts such a name from PATH, and doctor now looks for it there and in the usual install folders too, instead of calling it missing.
A byte-order mark that some Windows editors put at the start of a YAML config was read as part of its first key, so setup added a second table of the same name that hid the first. The mark is now set aside while the file is read and edited and put back as it was, so our entry goes into the existing table and removing it gives the file back byte for byte.