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.
Summary
Bumps version to 0.3.0.
Breaking Changes
viewportreplaced withcontainerDimensions— Theviewportproperty in host context has been replaced withcontainerDimensions, which provides a clearer distinction between fixed dimensions and maximum constraints. The new type allows specifying eitherheightormaxHeight, and eitherwidthormaxWidth(PR [MCP Apps] Updateviewporttype #153)eventSourcenow required inPostMessageTransport— The constructor now requires aneventSourceparameter to enforce security by validating message sources. This prevents potential cross-app message spoofing attacks (PR fix!: require eventSource in PostMessageTransport + add security tests #208)New Features
Framework examples for Vue, Svelte, Preact, and Solid — Added
basic-server-vue,basic-server-svelte,basic-server-preact, andbasic-server-solidexamples demonstrating MCP App SDK usage across all major frontend frameworks (PR Addbasic-server-*examples for Vue, Svelte, Preact, and Solid #141)safeAreaInsetssupport — Host context now includes safe area insets, allowing apps to properly handle device notches and system UI elements. All example apps updated to use this for proper padding (PR AddsafeAreaInsetssupport to all example apps #202)ui.resourceUrioptional — Tools that need visibility but don't require a UI resource can now omitresourceUriin the schema (PR Make ui.resourceUri optional (for tools that just need visibility) #210)Method names exported as constants — MCP method names are now exported as typed constants, enabling easier external library integration without brittle schema introspection (PR feat: export method names as consts #192)
Example servers publishable to npm — All 15 example servers are now published to npm under
@modelcontextprotocolscope. Users can run examples directly vianpx @modelcontextprotocol/server-basic-reactetc. (PR feat: publish example servers to npm #184)toolInfo.idoptional — Aligned TypeScript types with spec by makingtoolInfo.idoptional, allowing hosts to pass just the tool definition (PR fix: make toolInfo.id optional per spec #216)New Examples
sheet-music-serverexample #196)Developer Experience
npm startalias — Addednpm startas alias fornpm run examples:start(PR Add npmstartalias forexamples:start#183)Security Fixes
Bug Fixes
Promise.allSettledso one failure doesn't crash the entire UI (PR fix: make example host more resilient to broken servers #206)Note: A backward compatibility shim for the deprecated
viewportproperty is available in PR #TBD (branchochafik/viewport-compat-shim). Consider merging that first if backward compat is needed.