pub fn write_discovery_file(url: &str) -> Result<()>Expand description
Write the MCP discovery file atomically (tempfile + rename) so external
readers never observe a half-written JSON document. Payload shape is
{url, pid, started_at} — frozen by contract, do not change.