Skip to main content

anywidget-mcp

PyPI License: MIT

Some answers work better as interfaces.

anywidget-mcp brings AnyWidget to MCP Apps. Build a widget once, use it in Jupyter or marimo, then let people open the same interface right inside the conversation.

Color pickers, data explorers, diagrams, and interactive explanations stay connected to Python, so the model can respond to what the user does next.

Start with a widget library or bring your own.

Documentation: peter-gy.github.io/anywidget-mcp

Install

Requires Python 3.11 or newer.

pip install anywidget-mcp

See a widget in chat

This example uses Wigglystuff, an AnyWidget library:

pip install wigglystuff
anywidget-mcp serve wigglystuff:ColorPicker --port 8010

Keep the server running. Start mcp-use Inspector in another terminal:

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

Open Inspector Chat, configure a model provider, and ask:

Use color_picker so I can choose a color.

The widget renders in the conversation. Change the color, then ask the model what color it is. The answer comes from the widget's current Python state.

Browse the AnyWidget gallery for other widgets.

Serve your AnyWidget

Point the CLI at any importable AnyWidget class:

anywidget-mcp serve my_widgets:MyWidget

Or start the server from Python:

from anywidget_mcp import serve
from my_widgets import MyWidget

serve(MyWidget)

anywidget-mcp supplies the MCP tool, app resource, session lifecycle, and state synchronization. MyWidget stays an ordinary anywidget.AnyWidget subclass with the same Python traits and frontend module used in notebooks.

When the widget needs data from the conversation, use a Python function that accepts the input and returns the widget. Runtime inputs and composition covers that workflow, multiple widgets, and existing FastMCP servers.

Documentation

Metadata

Release files for anywidget-mcp 0.0.1

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.0.1
File Size Uploaded Provenance Actions
anywidget_mcp-0.0.1.tar.gz 148.6 kB With provenance Details for anywidget_mcp-0.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 308.1 kB

Release files / anywidget_mcp-0.0.1.tar.gz

Download URL anywidget_mcp-0.0.1.tar.gz
Size 148.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7eb6040a8dd6f5411f007fc12e35e91a3c8e6fd71b6a364e95ea02580c25ae12
BLAKE2b-256 checksum
How to use checksums
f1f8246ddc6a0e8d938388026245c30385fcb09cbdd2157bc81a6f1ce052ebdd
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 20, 2026.

Transparency log

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

Download URL anywidget_mcp-0.0.1-py3-none-any.whl
Size 159.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c80e208ae71e199b8c6dc2d51da1146bb699926ac459e8f7c9f71e3d21ed434
BLAKE2b-256 checksum
How to use checksums
c0d7f0f4681800412febe2f9be98d88fef3b82dc47d26edc7741c282ca8635d7
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 20, 2026.

Transparency log

Security for anywidget-mcp 0.0.1

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.

Select from 2 files

Attestation for anywidget_mcp-0.0.1.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 20, 2026.

Transparency log

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