MCP Run Python
a year ago
- #Sandbox
- #Python
- #Deno
- The Model Context Protocol (MCP) server runs Python code in a sandbox using Pyodide in Deno.
- Execution is isolated from the operating system for security.
- The server can be started with Deno using specific commands for different transport modes: stdio, SSE, or warmup.
- Required permissions include network access and read/write access to node_modules for Pyodide to function.
- Example usage with PydanticAI demonstrates running an agent with MCP server to execute Python code and get results.
- The example calculates the number of days between two dates using the agent.