Skip to content

anywidget-mcpBring AnyWidgets into the conversation.

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-mcpanywidget-mcp

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.

Try a multi-widget conversation ​

Requires Python 3.11 or newer. Serve Wigglystuff's ColorPicker and LiveEdit together:

sh
uvx --with wigglystuff anywidget-mcp serve \
  wigglystuff:ColorPicker \
  wigglystuff:LiveEdit \
  --port 8010

Connect a host that supports MCP Apps. For a quick local setup, start the mcp-use Inspector in another terminal:

sh
npx --yes @mcp-use/inspector@12.0.3 \
  --url http://127.0.0.1:8010/mcp \
  --port 7878

Open 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 in a project ​

Install anywidget-mcp in the Python environment that owns your widget code:

sh
uv pip install anywidget-mcp

Next steps ​