anywidget-mcp runs AnyWidgets inside AI
conversations. You can interact with a widget directly, and the model can
respond to your input.
Start with a widget from an existing package, or bring the same widget you use in Jupyter or marimo.
Try an AnyWidget
Requires Python 3.11 or newer. Start
Wigglystuff's ColorPicker with one
command:
uvx --with wigglystuff anywidget-mcp serve wigglystuff:ColorPicker --port 8010
Connect a host that supports
MCP Apps to
http://127.0.0.1:8010/mcp, then ask:
Use
color_pickerso I can choose a color.
The picker opens in the conversation. Choose a color, then ask the model which color you chose. The model reads the picker's current color when it answers.
Getting started walks through this flow in Inspector Chat.
But why?
💬 Stay in context: A standalone web app sends you to a separate page. An MCP App stays in the conversation, exchanges data through MCP, and runs in a host-controlled sandbox. With your consent, it can ask the host to use tools you already connected.
🧩 Skip the scaffolding: Building an MCP App directly means wiring together
tools, UI resources, browser code, the host connection, and shared state.
anywidget-mcp handles that integration. You define an
AnyWidget that keeps browser behavior and Python state
in one component.
🧪 Develop in notebooks: The same widget runs in Jupyter and marimo. Create it from Python, inspect its state, and use marimo's reactive execution to test scenarios before serving it through MCP.
🧰 Combine widgets: One server can expose multiple widgets as separate tools, or one call can open several together. Combine widgets from the AnyWidget gallery into an interactive environment for the task, then add your own.
✨ Invent at runtime: When you cannot enumerate every useful interface in
advance, serve
create_anywidget.
Supply Python source directly or ask an agent to invent a fresh AnyWidget during
the conversation. Use that natural-language loop to develop widgets and test
concepts. Run the factory in a sandbox because supplied source executes with the
MCP server's permissions.
Install in a project
Install anywidget-mcp in the Python environment that owns your widget code:
uv pip install anywidget-mcp
Bring your own AnyWidget
Point the CLI at your AnyWidget's import path:
anywidget-mcp serve my_widgets:MyWidget
Or start the server from Python:
from anywidget_mcp import serve
from my_widgets import MyWidget
serve(MyWidget)
MyWidget remains the same anywidget.AnyWidget subclass you use in
notebooks. Browser changes stay synchronized with its Python traits.
When the widget needs data from the conversation, use a Python function that accepts the input and returns an AnyWidget. This function is a widget factory. Pass input to widgets covers that workflow, multiple widgets, and existing MCP servers.
Documentation
Metadata
Release files for anywidget-mcp 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anywidget_mcp-0.0.2.tar.gz | 149.3 kB | With provenance | Details for anywidget_mcp-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anywidget_mcp-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for anywidget_mcp-0.0.2-py3-none-any.whl |
Total release size: 309.4 kB
Release files / anywidget_mcp-0.0.2.tar.gz
| Download URL | anywidget_mcp-0.0.2.tar.gz |
|---|---|
| Size | 149.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf2f690cbffe40ee29b54ecb58c986e9dda272cd050de99f4b044609814fa3ec
|
|
BLAKE2b-256 checksum How to use checksums |
400e4eb42092d132d9eadfaf84e11c8de16cbd8be6b42a47cb9b434c7659562e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logRelease files / anywidget_mcp-0.0.2-py3-none-any.whl
| Download URL | anywidget_mcp-0.0.2-py3-none-any.whl |
|---|---|
| Size | 160.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d22f9365abdfe24ef9f6d9f9fcdccf60a670a827a000411d98c6c6f2b291c4dc
|
|
BLAKE2b-256 checksum How to use checksums |
5ed950a392e3c0a6340bde0749d53a1d5f149d1c920a6ecbeadd777fc7802751
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logSecurity for anywidget-mcp 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for anywidget_mcp-0.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.