ワンクリックで
python-bridge
// Native Python execution via the local Python bridge. Use when the user asks about running Python locally, setting up the Python bridge, LibreOffice conversion, or troubleshooting Python connectivity.
// Native Python execution via the local Python bridge. Use when the user asks about running Python locally, setting up the Python bridge, LibreOffice conversion, or troubleshooting Python connectivity.
| name | python-bridge |
| description | Native Python execution via the local Python bridge. Use when the user asks about running Python locally, setting up the Python bridge, LibreOffice conversion, or troubleshooting Python connectivity. |
| compatibility | Python tools always work via in-browser Pyodide. The native bridge is optional and requires a local bridge process running on the user's machine. |
| metadata | {"tool-name":"python_run","docs":"docs/python-bridge-contract.md"} |
The Python bridge gives Pi access to native Python on the user's machine. It is an opt-in capability that upgrades the default in-browser Pyodide runtime.
| Pyodide (default) | Native bridge | |
|---|---|---|
| Setup | None — works out of the box | Requires local bridge process |
| Packages | Pure-Python only (numpy, pandas, scipy via micropip) | Full ecosystem (C extensions, ML libs, etc.) |
| Filesystem | No local filesystem access | Full local filesystem |
| LibreOffice | Not available | Available (libreoffice_convert tool) |
| Long scripts | WebAssembly limits | No limits |
Prefer Pyodide unless the task requires native-only capabilities.
npx pi-for-excel-python-bridge
This defaults to real execution mode on https://localhost:3340.
Options:
--install-missing — auto-install Python/LibreOffice via Homebrew (macOS)PYTHON_BRIDGE_MODE=stub — safe simulated modePYTHON_BRIDGE_TOKEN=your-secret — require auth tokenPYTHON_BRIDGE_PYTHON_BIN=python3.12 — specify Python binaryRequirements:
python3 must be on PATH (or set PYTHON_BRIDGE_PYTHON_BIN)soffice) is optional — only needed for libreoffice_convertThe default URL (https://localhost:3340) works automatically. Override if needed:
/experimental python-bridge-url <url>
/experimental python-bridge-token <token>
Or use: /extensions → Connections → Python bridge
The first time Python runs through the native bridge, Pi will ask for explicit user confirmation (one-time per bridge URL).
python_run and python_transform_range fall back to Pyodide automatically. Only libreoffice_convert strictly requires the bridge.
-I isolation flagnpx pi-for-excel-python-bridge.soffice is on PATH. Install with brew install --cask libreoffice (macOS).https://localhost:3340 in your browser and accept the certificate.Plan and build Pi for Excel extensions safely: choose skill vs extension plugin vs connection, create flat SKILL.md skills, and handle API keys without asking users to paste secrets in chat.
Local terminal access via the tmux bridge. Use when the user asks about running shell commands, setting up the tmux bridge, or troubleshooting terminal connectivity.
Discover and call tools from configured MCP servers. Use when external capabilities are needed beyond built-in workbook tools.
Search the public web for up-to-date facts. Works out of the box with Jina (default, no API key needed); optionally Serper, Tavily, or Brave Search. Use when workbook context is insufficient and fresh external references are needed.