You could use FreeCAD from Jupyter notebook, but then you have to start the FreeCAD application in there, also. It gives you very nice interactive and pythonic control over FC, though.
I have another Forum post where I describe how to put an asyncio event loop into the FreeCAD app. You could run an HTTP Server, like FastAPI or just aiohttp, and execute Python scripts from POST requests. Then you can write a simple script to "remotely inject" a script.