About
A TypeScript‑based MCP server that lets large language models execute Python code using Pyodide. It supports stdio and SSE transports, works as a CLI tool or server module.
Capabilities
Mcp Pyodide is a lightweight, MCP‑compliant server that bridges Large Language Models (LLMs) with the full power of Python, all running inside a browser‑compatible WebAssembly runtime. By exposing Pyodide over the Model Context Protocol, it allows an LLM to send arbitrary Python code snippets and receive structured results without leaving the MCP ecosystem. This solves a common pain point for developers building AI‑driven applications: executing rich, stateful Python logic in a secure, sandboxed environment while maintaining the streamlined request/response flow of MCP.
The server’s core value lies in its dual‑mode transport support. In stdio mode, the MCP client and server communicate over standard input/output streams, making it trivial to embed in existing CLI workflows or lightweight Docker containers. SSE mode opens a persistent HTTP connection, enabling real‑time streaming of execution output and intermediate states—ideal for interactive notebooks or dashboards where users benefit from live feedback. Both modes are backed by a robust TypeScript implementation that guarantees type safety and graceful error handling.
Key capabilities include:
- Python code execution: Any valid Python script can be run in the Pyodide sandbox, with access to a curated set of packages.
- Structured result handling: Outputs are serialized through the MCP SDK, ensuring consistency across clients and languages.
- Extensible tooling: The project exposes utility hooks (formatters, handlers) that developers can extend to add custom data transformations or security checks.
- CORS and environment configuration: For SSE deployments, CORS middleware can be tuned via environment variables, while cache and data directories are configurable to optimize performance.
Real‑world scenarios that benefit from Mcp Pyodide include:
- Data science assistants: A chatbot can run statistical analyses, generate plots, or manipulate pandas DataFrames on demand.
- Educational platforms: Interactive coding tutors can evaluate student submissions in a controlled environment, returning immediate feedback.
- Prototyping pipelines: Rapidly iterate on Python algorithms (e.g., image processing, NLP) without setting up a full backend service.
Integrating Mcp Pyodide into an AI workflow is straightforward: the LLM sends a tool invocation through MCP, the server executes the code in Pyodide, and the result is streamed back via stdio or SSE. This seamless loop removes boilerplate around spawning Python processes, managing dependencies, and handling sandboxing—allowing developers to focus on business logic rather than infrastructure.
Related Servers
MarkItDown MCP Server
Convert documents to Markdown for LLMs quickly and accurately
Context7 MCP
Real‑time, version‑specific code docs for LLMs
Playwright MCP
Browser automation via structured accessibility trees
BlenderMCP
Claude AI meets Blender for instant 3D creation
Pydantic AI
Build GenAI agents with Pydantic validation and observability
Chrome DevTools MCP
AI-powered Chrome automation and debugging
Weekly Views
Server Health
Information
Explore More Servers
Selenium MCP Server
Web automation via Selenium for AI assistants
CrateDocs MCP
Rust crate documentation lookup for LLMs
SQL Server Express MCP Server
Seamless Microsoft SQL Server Express integration for MCP
ClimateTrace MCP Server
Serve climate emission data via Model Context Protocol for AI tools
Coin MCP Server
Real-time crypto data for AI apps
Trino MCP Server
Connect AI models to Trino tables with ease