Reproduced first: a test stubs mkdir to deny the lock path three times. Before the fix the JS lock raised EPERM out of acquireLock and both Python mirrors raised PermissionError out of _state_lock. After the fix all three retry and acquire.

The original sighting was not synthetic - a full-suite run failed with "EPERM: operation not permitted, mkdir ...mcp-state.lock" at server.cjs:109 inside "concurrent generic creates allocate unique IDs and lose no records".
