anywidget-mcp runs AnyWidgets inside AI
conversations. Interact with a Python widget, then let the model respond to its
current state. Connect through a host that supports
MCP Apps, the Model
Context Protocol extension for interactive interfaces.
- Bring existing widgets. Serve widgets from a package or reuse the ones you develop in Jupyter and marimo.
- Accept conversational input. Typed Python factories become tools that create a fresh widget for each call.
- Share selected state. Python validates interactions, and you choose which values the model can read.
- Explore large datasets. Serve query-backed viewers such as Embedding Atlas and share their current filter with the model.
- Compose interfaces. Expose several tools, return a group of widgets, or create widgets from source in a sandbox.
Try it
Requires Python 3.11+ and uv, a Python package runner:
uvx --with wigglystuff anywidget-mcp serve wigglystuff:ColorPicker --port 8010
Connect your MCP Apps host to http://127.0.0.1:8010/mcp, ask to pick a color,
and change the selection. Getting started
walks through this in Inspector Chat.
Use Python
Install in the environment that owns your widgets:
uv pip install anywidget-mcp wigglystuff
from anywidget_mcp import serve
from wigglystuff import ColorPicker
serve(ColorPicker, state="color")
state="color" gives the model the current color while the full widget remains
interactive. Use AnyWidgetMCP
to register several tools or attach() to add widgets to an existing server.
Documentation
Getting started · Write a widget · Pass input · Share state · API reference · Deployment
Experimental software. The API may change between releases.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anywidget_mcp-0.1.0.tar.gz.
File metadata
- Download URL: anywidget_mcp-0.1.0.tar.gz
- Upload date:
- Size: 157.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44cd9ae3a41fbf19fe8747b1a36f170966015a3c3c97b9604df845933cd0d966
|
|
| MD5 |
6af616aca05f057c1694b733c7f3fd1b
|
|
| BLAKE2b-256 |
7da390dbf9fca590d09dfd55886e7b374da7482bf206d7e42f8efc861d2e0d14
|
File details
Details for the file anywidget_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: anywidget_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 168.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adf6c05706053f5e1b0ce98f6044519f1ab408db139edc2532b1589b65600499
|
|
| MD5 |
89b9d61bb9709ba20dc3ff03d3e2e335
|
|
| BLAKE2b-256 |
29a8a08143c3c4e4bdfa6c73a323b34c15c619f88c3de513f599d2e768d2b444
|