restart_server
Restart the Kiln server process to apply code, plugin, or environment changes without needing to restart the MCP client.
Instructions
Restart the Kiln MCP server process in-place.
Replaces the current process with a fresh instance using
``os.execve``. The MCP client (Claude Code, etc.) should detect
the connection drop and automatically reconnect, picking up any
code changes made since the last startup.
Use after installing or updating kiln-pro plugins, changing
environment variables, or modifying server code — avoids the
need to fully restart the MCP client application.
:param clean_env: When ``True`` (default), strips ``KILN_PRINTER_*``
environment variables from the child process if
``~/.kiln/config.yaml`` has a printer configured. This defeats
the "ghost env" footgun where a stale ``KILN_PRINTER_API_KEY``
inherited from a past shell session silently shadows config.yaml
edits for the lifetime of the MCP parent process. Without this,
every edit to config.yaml looks like it does nothing and the
printer rejects MQTT auth with no hint why. Set to ``False`` to
preserve the full env (useful for CI or pure env-driven workflows
where config.yaml is absent or deliberately overridden).
:returns: Confirmation that the restart is imminent, plus the list
of env vars that were stripped (for debugging transparency).
The connection will drop within ~0.5 seconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clean_env | No |