feat(basic-host): URL params, fullscreen mode, unified layout#266
feat(basic-host): URL params, fullscreen mode, unified layout#266
Conversation
@modelcontextprotocol/ext-apps
@modelcontextprotocol/server-basic-react
@modelcontextprotocol/server-basic-vanillajs
@modelcontextprotocol/server-budget-allocator
@modelcontextprotocol/server-cohort-heatmap
@modelcontextprotocol/server-customer-segmentation
@modelcontextprotocol/server-scenario-modeler
@modelcontextprotocol/server-system-monitor
@modelcontextprotocol/server-threejs
@modelcontextprotocol/server-wiki-explorer
commit: |
dfbe649 to
abca7ab
Compare
Hmm, something about that seems off to me. Though I could see updating Alternatively, what about a UI button and/or hotkey that refreshes all tool calls on the page? |
abca7ab to
4064f67
Compare
@jonathanhefner Yeah it's not perfect. I tried having the full conversation sticky, but it requires too many changes. This is just meant to be a simple example + an easy place to develop / debug an app (this refresh is changing my life atm, esp now that we start in dev mode by default), not an MCPJam / real host replacement. Maximizing our velocity is not an unimportant factor, and multiple calls aren't really an interesting use case to debug (no interaction between apps). |
Summary
Adds URL query parameters to basic-host for easier debugging and testing, plus fullscreen mode support and unified UI layout.
URL Query Params
?server=name- Pre-select a specific server?tool=name- Pre-select a specific tool?call=true- Auto-call the tool on page loadUsage:
After calling a tool, the URL is updated so refreshing the page re-runs the same call.
Fullscreen Mode
Apps can now request fullscreen display mode. The host handles
displayModechanges and renders the app iframe in a fullscreen overlay.Unified Tool Call Layout
Both app and non-app tool calls now share the same layout:
server:tool_namewith close buttonOther Improvements
Changes
examples/basic-host/src/index.tsx: URL params, auto-call, fullscreen, unified layoutexamples/basic-host/src/implementation.ts: Container dimensions handlingexamples/basic-host/src/index.module.css: Fullscreen styles, max-width, cleanup