On M1/M2/M3 Mac, you can use Apple Containers to automate[1] the execution of the generated code.
I have one running locally with this config:
{
"mcpServers": {
"coderunner": {
"url": "http://coderunner.local:8222/sse"
}
}
}
1. CodeRunner: https://github.com/BandarLabs/coderunner (I am one of the authors)