Skip to main content

anywidget-mcp

PyPI License: MIT

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.

Choose a color, then explore an interactive HEX-to-RGB explanation

  • 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.

Metadata

Release files for anywidget-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anywidget-mcp 0.1.0
File Size Uploaded Provenance Actions
anywidget_mcp-0.1.0.tar.gz 157.1 kB Without provenance Details for anywidget_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anywidget-mcp 0.1.0
File Interpreter ABI Platform Actions
anywidget_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for anywidget_mcp-0.1.0-py3-none-any.whl

Total release size: 325.8 kB

Release files / anywidget_mcp-0.1.0.tar.gz

Download URL anywidget_mcp-0.1.0.tar.gz
Size 157.1 kB
Tags Source
SHA-256 checksum
How to use checksums
44cd9ae3a41fbf19fe8747b1a36f170966015a3c3c97b9604df845933cd0d966
BLAKE2b-256 checksum
How to use checksums
7da390dbf9fca590d09dfd55886e7b374da7482bf206d7e42f8efc861d2e0d14
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / anywidget_mcp-0.1.0-py3-none-any.whl

Download URL anywidget_mcp-0.1.0-py3-none-any.whl
Size 168.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
adf6c05706053f5e1b0ce98f6044519f1ab408db139edc2532b1589b65600499
BLAKE2b-256 checksum
How to use checksums
29a8a08143c3c4e4bdfa6c73a323b34c15c619f88c3de513f599d2e768d2b444
Upload date
Uploaded using Trusted Publishing?
What is 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}

Security for anywidget-mcp 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page