python-run-mcp
2
This project implements a Python service that follows the Model Context Protocol for standardized Python code execution through API endpoints. It enables server-side code execution by sending HTTP requests to designated endpoints.
MCP Server
Python service implementing Model Context Protocol (MCP) for Python code execution via standardized API endpoints.
Installation
pip install -r requirements.txt
Usage
- Start the server:
python src/server.py
- Send requests to the
/run_python
endpoint:
curl -X POST http://localhost:8000/run_python \
-H "Content-Type: application/json" \
-d '{"code": "print(\'Hello, World!\')"'
Development
- Follow the modular structure
- Run tests before submitting changes
- Update documentation as needed
License
MIT