Skip to content

anywidget-mcpPython widgets for AI collaboration.

Use AnyWidgets in MCP conversations or expose live notebook widgets to browser agents.

anywidget-mcpanywidget-mcp

anywidget-mcp turns AnyWidgets, Python objects with JavaScript interfaces, into tools that open inside a conversation. It uses MCP Apps, the Model Context Protocol extension for interactive tool results.

Start with a widget ​

sh
uvx --from 'anywidget-mcp[server]' --with wigglystuff anywidget-mcp serve wigglystuff:ColorPicker --port 8010

Requires Python 3.10+ and uv, a Python package runner. Getting started connects the server to Inspector Chat and checks that the model reads your selection.

Build the conversation you need ​

I want to…Start here
Render my Python widget in a conversationWrite a widget
Let a browser agent operate live notebook widgetsExpose widgets with WebMCP
Let the model provide data or starting valuesPass input to widgets
Choose what the model can read after interactionShare state with the model
Expose several tools or open widgets togetherCombine widgets and tools
Render large datasets and query resultsWork with large widgets
Let a model create an interface from Python sourceCreate widgets from source
Connect a host or run a serverDeployment

How it works explains the tool, widget, and state contracts. The API reference lists signatures, defaults, and errors.

Experimental software. The API may change between releases.