通过标准化API端点实现用于Python代码执行的模型上下文协议(MCP)的Python服务。
pip install -r requirements.txt
python src/server.py
/run_python 端点发送请求:curl -X POST http://localhost:8000/run_python \
-H "Content-Type: application/json" \
-d '{"code": "print(\'Hello, World!\')"}'
MIT