I also built a NIF wrapping QuickJS-NG recently to enable "code mode" on our MCP server.
https://github.com/lpgauth/quicksand