Replies: 1 comment
|
So for now I followed the model I saw in the Excalidraw MCP app. Provide a unique identifier that remains static for all edits to a widgets lifetime. One per widget instance (edits by the model that create a new widget also create a new ID, edits by the widget apply to the existing ID). Store data in localStorage against the ID Optionally force a read tool call to the MCP server against the ID at mount to get the latest data from the server (to handle cross device data or runtimes without localStorage access). |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I know
useWidgetStateisn't supported on MCP apps. How are people working around it?For my case I have a survey generator, and the user can reorder and delete steps in the survey. Which works fine, however upon refreshing in a MCP Apps environment (Claude) you visually lose your changes as it reverts to the initial tool output.
In ChatGPT it works fine because it supports widget state.
How are people designing around this? Do you just disable controls that edit widget state in those environments?
All reactions