Skip to content

Getting started ​

Open a color picker in an AI conversation, choose a color, then ask the model about your selection.

You need Python 3.10+, uv to run the Python packages, and Node.js 22.22.2+ to run the Inspector host. Inspector Chat also needs a model provider configured in its settings. Calls use that provider's credentials and billing.

Start the widget server ​

Serve ColorPicker from Wigglystuff, a collection of AnyWidgets:

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

The command keeps running and exposes the color_picker tool at http://127.0.0.1:8010/mcp.

See it in Inspector Chat ​

In another terminal, start mcp-use Inspector, a local host for MCP Apps. MCP Apps lets a tool render an interactive interface inside a conversation.

sh
npx --yes @mcp-use/inspector@20.3.7 \
  --url http://127.0.0.1:8010/mcp \
  --port 7878

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

Open a color picker.

Choose a different color in the widget, then ask:

What color did I choose? Give me its RGB values.

The answer should use your current selection. Python owns the widget state, and the model reads it through model-visible state.

If something fails ​

SymptomCheck
Inspector cannot connectKeep the Python terminal running and use its /mcp URL.
The port is occupiedChoose another --port and update the connecting URL. Inspector prints its actual URL.
A tool returns text but no widgetUse a host with MCP Apps rendering support.
Chat cannot call the toolConfigure a model provider, select the connected server, and enable its tools.
The model describes an earlier selectionAsk it to read the current widget state through anywidget_state.

Stop both terminal processes with Ctrl+C when finished.

Use your own host or widget ​

Connect another MCP Apps host to the same server URL. Check the client support list for host-specific setup. A host that launches Python itself can use standard input and output.

Write a widget to build your own interface, pass input to choose its initial values, or combine widgets through one server.