Create Phoenix LiveView WebMCP example app #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Introduces the first Phoenix LiveView example demonstrating WebMCP integration with server-side state management using Elixir. Shows bidirectional communication: AI → JavaScript → LiveView → Elixir server.
Type of Change
Related Issues
N/A
Changes Made
New Example Details
increment_counter,decrement_counter,set_counter,add_item,remove_item,clear_items@mcp-b/global, Phoenix 1.7, Phoenix LiveView 1.0Testing
Commands Run
Manual Testing with MCP-B Extension
Screenshot/Demo
Phoenix LiveView app with counter and item list, controllable via WebMCP tools
Checklist
@mcp-b/globalor@mcp-b/react-webmcp)/relegatedDocumentation
Additional Notes
This is the first server-side framework example in the repo. Unlike vanilla/React examples that manage state client-side, this demonstrates stateful server management with LiveView's real-time sync. The JavaScript hooks bridge WebMCP tool calls to LiveView's
pushEvent(), enabling AI to control server state through the browser.For AI Agents: Please verify all items in the checklist before submitting. Run all commands listed in the Testing section.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.