🧩 Skip the scaffolding
Turn an AnyWidget into an MCP App without wiring tools, UI resources, browser code, and shared state yourself. Keep browser behavior and Python state in one component.
Learn about AnyWidget
Run the same Python widgets in notebooks and AI conversations. You can interact with a widget directly, and the model can respond to your input.
anywidget-mcp opens an AnyWidget inside an AI conversation and keeps its Python state synchronized. Interact with the widget, then ask the model about your input. Each widget runs as an MCP App.
Requires Python 3.11 or newer. Serve Wigglystuff's ColorPicker and LiveEdit together:
uvx --with wigglystuff anywidget-mcp serve \
wigglystuff:ColorPicker \
wigglystuff:LiveEdit \
--port 8010Connect a host that supports MCP Apps. For a quick local setup, start the mcp-use Inspector in another terminal:
npx --yes @mcp-use/inspector@12.0.3 \
--url http://127.0.0.1:8010/mcp \
--port 7878Open Inspector Chat, configure a model provider, then ask:
let me pick a color
Choose a color, then ask:
given my current selection help explain the HEX to RGB algo interactively
The model reads the picker's current color and opens LiveEdit for the interactive explanation. One server exposes both widgets, so the conversation can move from selection to explanation without leaving the chat.
Getting started explains the Inspector flow and other MCP clients.
Install anywidget-mcp in the Python environment that owns your widget code:
uv pip install anywidget-mcp