Principle:20000419 Fauxnix Spawn Safe Launcher
| Knowledge Sources | |
|---|---|
| Domains | Install, Spawn_Safety, MCP |
| Last Updated | 2026-10-26 00:00 GMT |
Overview
A spawn-safety technique that writes an absolute executable + absolute entry-point tuple into harness MCP configs instead of a bare npm shim, so CreateProcess-based MCP clients can always start the server regardless of PATH or shim-resolution differences.
Description
On Windows, the npm-installed fauxnix command is an extension-less shim script that CreateProcess-based MCP clients cannot execute directly — they need an absolute .exe path. The Spawn-Safe Launcher principle resolves process.execPath (absolute node.exe) and the built entry (dist/index.js resolved relative to the module URL) and writes { command: <absolute node>, args: [<absolute entry>, 'mcp'] } into every harness config. Both paths are validated as absolute and existing before any config is written. The tuple is immune to PATH and shim-resolution differences on every platform. Legacy configs with { command: 'fauxnix' } are detected and upgraded to the absolute form; hand-written non-fauxnix entries are never clobbered.
Usage
Use this principle whenever a Node-based MCP server is installed into a config that a native process spawns. The absolute-tuple form is the correct spawn-safe representation on Windows; the bare-shim form fails on direct-spawn clients.
Theoretical Basis
command = process.execPath # absolute node.exe
entry = resolve('../dist/index.js') # absolute built entry
validate isAbsolute(command) and exists(command)
validate isAbsolute(entry) and exists(entry)
tuple = { command, args: [entry, 'mcp'] }
write tuple into mcpServers.fauxnix (JSON) or [mcp_servers.fauxnix] (TOML)