Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: PolyMCP – Run MCP Python Tools in WASM via Pyodide
2 points by justvugg 1 day ago | hide | past | favorite | discuss
PolyMCP now supports compiling Python MCP tools to WebAssembly using Pyodide.

This means any Python function exposed as an MCP tool can now run directly in the browser, Node.js, or edge workers, fully sandboxed, without a Python server.

Compile your tools, serve the bundle, and AI agents can call them instantly in WASM environments. Existing MCP features like input validation, error handling, and tool orchestration work seamlessly.

example:

from polymcp.polymcp_toolkit import expose_tools_wasm

def add(a: int, b: int) -> int: """Add two numbers""" return a + b

compiler = expose_tools_wasm([add]) bundle = compiler.compile(output_dir="./dist")

Open dist/demo.html in your browser — the add tool runs entirely in WASM.

Why it matters • No Python server required: runs client-side or on edge • Secure: sandboxed execution • Plug-and-play: multiple tools in one WASM bundle • Ideal for interactive demos, edge AI apps, or browser-based automation

Repo: https://github.com/poly-mcp/Polymcp





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: