-
Notifications
You must be signed in to change notification settings - Fork 295
feat: support adapters #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: yannj-fr <yjouanin@thefork.com>
…1...v5.13.0-alpha.1) (2025-10-10) ### Features * add adapters infra (appssdk) ([#125](#125)) ([2e016cd](2e016cd))
…0-alpha.1...v5.13.0-alpha.2) (2025-10-10) ### Bug Fixes * adapter version ([259c842](259c842))
# 1.0.0-alpha.1 (2025-10-10) ### Bug Fixes * adapter version ([259c842](259c842)) * add a bridge to pass messages in and out of the proxy ([#38](#38)) ([30ccac0](30ccac0)) * bump client version ([75c9236](75c9236)) * **client:** specify iframe ([fd0b70a](fd0b70a)) * **client:** styling ([6ff9b68](6ff9b68)) * dependencies ([887f61f](887f61f)) * export RemoteDomResource ([2b86f2d](2b86f2d)) * export ResourceRenderer and HtmlResource ([2b841a5](2b841a5)) * exports ([3a93a16](3a93a16)) * iframe handle ([#15](#15)) ([66bd4fd](66bd4fd)) * lint ([4487820](4487820)) * lint ([d0a91f9](d0a91f9)) * minor typo ([a0bee9c](a0bee9c)) * move react dependencies to be peer dependencies ([#91](#91)) ([f672f3e](f672f3e)), closes [#90](#90) * package config ([8dc1e53](8dc1e53)) * packaging ([9e6babd](9e6babd)) * pass ref explicitly using iframeProps ([#33](#33)) ([d01b5d1](d01b5d1)) * publish ([0943e7a](0943e7a)) * ref passing to UIResourceRenderer ([#32](#32)) ([d28c23f](d28c23f)) * release ([420efc0](420efc0)) * remove shared dependency ([e66e8f4](e66e8f4)) * rename components and methods to fit new scope ([#22](#22)) ([6bab1fe](6bab1fe)) * rename delivery -> encoding and flavor -> framework ([#36](#36)) ([9a509ed](9a509ed)) * Ruby comment ([b22dc2e](b22dc2e)) * support react-router ([21ffb95](21ffb95)) * text and blob support in RemoteDOM resources ([ec68eb9](ec68eb9)) * trigger release ([aaca831](aaca831)) * typescript ci publish ([e7c0ebf](e7c0ebf)) * typescript types to be compatible with MCP SDK ([#10](#10)) ([74365d7](74365d7)) * update deps ([4091ef4](4091ef4)) * update isUIResource to use EmbeddedResource type ([#122](#122)) ([5a65a0b](5a65a0b)), closes [#117](#117) * use targetOrigin in the proxy message relay ([#40](#40)) ([b3fb54e](b3fb54e)) * validate URL ([b7c994d](b7c994d)) * wc dist overwrite ([#63](#63)) ([9e46c56](9e46c56)) ### Documentation * bump ([#4](#4)) ([ad4d163](ad4d163)) ### Features * add adapters infra (appssdk) ([#125](#125)) ([2e016cd](2e016cd)) * add convenience function isUIResource to client SDK ([#86](#86)) ([607c6ad](607c6ad)) * add embeddedResourceProps for annotations ([#99](#99)) ([b96ec44](b96ec44)) * add proxy option to externalUrl ([#37](#37)) ([7b95cd0](7b95cd0)) * add remote-dom content type ([#18](#18)) ([5dacf37](5dacf37)) * add Ruby server SDK ([#31](#31)) ([5ffcde4](5ffcde4)) * add sandbox permissions instead of an override ([#83](#83)) ([b1068e9](b1068e9)) * add ui-request-render-data message type ([#111](#111)) ([26135ce](26135ce)) * add UIResourceRenderer Web Component ([#58](#58)) ([ec8f299](ec8f299)) * auto resize with the autoResizeIframe prop ([#56](#56)) ([76c867a](76c867a)) * change onGenericMcpAction to optional onUiAction ([1913b59](1913b59)) * **client:** allow setting supportedContentTypes for HtmlResource ([#17](#17)) ([e009ef1](e009ef1)) * consolidate ui:// and ui-app:// ([#8](#8)) ([2e08035](2e08035)) * pass iframe props down ([#14](#14)) ([112539d](112539d)) * refactor UTFtoB64 (bump server version) ([#95](#95)) ([2d5e16b](2d5e16b)) * send render data to the iframe ([#51](#51)) ([d38cfc7](d38cfc7)) * separate html and remote-dom props ([#24](#24)) ([a7f0529](a7f0529)) * support generic messages response ([#35](#35)) ([10b407b](10b407b)) * support passing resource metadata ([#87](#87)) ([f1c1c9b](f1c1c9b)) * support ui action result types ([#6](#6)) ([899d152](899d152)) * switch to ResourceRenderer ([#21](#21)) ([6fe3166](6fe3166)) ### BREAKING CHANGES * The existing naming is ambiguous. Renaming delivery to encoding and flavor to framework should clarify the intent. * exported names have changed * removed deprecated client API * (previous one didn't take due to semantic-release misalignment)
# [1.0.0-alpha.2](client/v1.0.0-alpha.1...client/v1.0.0-alpha.2) (2025-10-10) ### Bug Fixes * server versioning ([2324371](2324371))
# 1.0.0-alpha.1 (2025-10-10) ### Bug Fixes * adapter version ([259c842](259c842)) * add a bridge to pass messages in and out of the proxy ([#38](#38)) ([30ccac0](30ccac0)) * bump client version ([75c9236](75c9236)) * **client:** specify iframe ([fd0b70a](fd0b70a)) * **client:** styling ([6ff9b68](6ff9b68)) * dependencies ([887f61f](887f61f)) * export RemoteDomResource ([2b86f2d](2b86f2d)) * export ResourceRenderer and HtmlResource ([2b841a5](2b841a5)) * exports ([3a93a16](3a93a16)) * iframe handle ([#15](#15)) ([66bd4fd](66bd4fd)) * lint ([4487820](4487820)) * lint ([d0a91f9](d0a91f9)) * minor typo ([a0bee9c](a0bee9c)) * move react dependencies to be peer dependencies ([#91](#91)) ([f672f3e](f672f3e)), closes [#90](#90) * package config ([8dc1e53](8dc1e53)) * packaging ([9e6babd](9e6babd)) * pass ref explicitly using iframeProps ([#33](#33)) ([d01b5d1](d01b5d1)) * publish ([0943e7a](0943e7a)) * ref passing to UIResourceRenderer ([#32](#32)) ([d28c23f](d28c23f)) * release ([420efc0](420efc0)) * remove shared dependency ([e66e8f4](e66e8f4)) * rename components and methods to fit new scope ([#22](#22)) ([6bab1fe](6bab1fe)) * rename delivery -> encoding and flavor -> framework ([#36](#36)) ([9a509ed](9a509ed)) * Ruby comment ([b22dc2e](b22dc2e)) * server versioning ([2324371](2324371)) * support react-router ([21ffb95](21ffb95)) * text and blob support in RemoteDOM resources ([ec68eb9](ec68eb9)) * trigger release ([aaca831](aaca831)) * typescript ci publish ([e7c0ebf](e7c0ebf)) * typescript types to be compatible with MCP SDK ([#10](#10)) ([74365d7](74365d7)) * update deps ([4091ef4](4091ef4)) * update isUIResource to use EmbeddedResource type ([#122](#122)) ([5a65a0b](5a65a0b)), closes [#117](#117) * use targetOrigin in the proxy message relay ([#40](#40)) ([b3fb54e](b3fb54e)) * validate URL ([b7c994d](b7c994d)) * wc dist overwrite ([#63](#63)) ([9e46c56](9e46c56)) ### Documentation * bump ([#4](#4)) ([ad4d163](ad4d163)) ### Features * add adapters infra (appssdk) ([#125](#125)) ([2e016cd](2e016cd)) * add convenience function isUIResource to client SDK ([#86](#86)) ([607c6ad](607c6ad)) * add embeddedResourceProps for annotations ([#99](#99)) ([b96ec44](b96ec44)) * add proxy option to externalUrl ([#37](#37)) ([7b95cd0](7b95cd0)) * add remote-dom content type ([#18](#18)) ([5dacf37](5dacf37)) * add Ruby server SDK ([#31](#31)) ([5ffcde4](5ffcde4)) * add sandbox permissions instead of an override ([#83](#83)) ([b1068e9](b1068e9)) * add ui-request-render-data message type ([#111](#111)) ([26135ce](26135ce)) * add UIResourceRenderer Web Component ([#58](#58)) ([ec8f299](ec8f299)) * auto resize with the autoResizeIframe prop ([#56](#56)) ([76c867a](76c867a)) * change onGenericMcpAction to optional onUiAction ([1913b59](1913b59)) * **client:** allow setting supportedContentTypes for HtmlResource ([#17](#17)) ([e009ef1](e009ef1)) * consolidate ui:// and ui-app:// ([#8](#8)) ([2e08035](2e08035)) * pass iframe props down ([#14](#14)) ([112539d](112539d)) * refactor UTFtoB64 (bump server version) ([#95](#95)) ([2d5e16b](2d5e16b)) * send render data to the iframe ([#51](#51)) ([d38cfc7](d38cfc7)) * separate html and remote-dom props ([#24](#24)) ([a7f0529](a7f0529)) * support generic messages response ([#35](#35)) ([10b407b](10b407b)) * support passing resource metadata ([#87](#87)) ([f1c1c9b](f1c1c9b)) * support ui action result types ([#6](#6)) ([899d152](899d152)) * switch to ResourceRenderer ([#21](#21)) ([6fe3166](6fe3166)) ### BREAKING CHANGES * The existing naming is ambiguous. Renaming delivery to encoding and flavor to framework should clarify the intent. * exported names have changed * removed deprecated client API * (previous one didn't take due to semantic-release misalignment)
# [5.13.0-alpha.1](client/v5.12.1...client/v5.13.0-alpha.1) (2025-10-10) ### Bug Fixes * adapter version ([259c842](259c842)) * release ([420efc0](420efc0)) * server alpha versioning ([7f35d3b](7f35d3b)) * server versioning ([2324371](2324371)) ### Features * add adapters infra (appssdk) ([#125](#125)) ([2e016cd](2e016cd))
# [5.12.0-alpha.1](server/v5.11.0...server/v5.12.0-alpha.1) (2025-10-10) ### Bug Fixes * adapter version ([259c842](259c842)) * release ([420efc0](420efc0)) * server alpha versioning ([7f35d3b](7f35d3b)) * server versioning ([2324371](2324371)) * update isUIResource to use EmbeddedResource type ([#122](#122)) ([5a65a0b](5a65a0b)), closes [#117](#117) ### Features * add adapters infra (appssdk) ([#125](#125)) ([2e016cd](2e016cd)) * add ui-request-render-data message type ([#111](#111)) ([26135ce](26135ce))
# [5.13.0-alpha.2](client/v5.13.0-alpha.1...client/v5.13.0-alpha.2) (2025-10-10) ### Bug Fixes * set the mime type as text/html+skybridge for apps SDK ([bc47423](bc47423))
# [5.12.0-alpha.2](server/v5.12.0-alpha.1...server/v5.12.0-alpha.2) (2025-10-10) ### Bug Fixes * set the mime type as text/html+skybridge for apps SDK ([bc47423](bc47423))
…/v5.12.0-alpha.2...server/v5.12.0-alpha.3) (2025-10-11) ### Bug Fixes * version ([767a245](767a245))
…/v5.13.0-alpha.2...client/v5.13.0-alpha.3) (2025-10-11) ### Bug Fixes * exports ([0018c17](0018c17)) * version ([767a245](767a245))
…/v5.12.0-alpha.3...server/v5.12.0-alpha.4) (2025-10-11) ### Bug Fixes * exports ([0018c17](0018c17))
…/v5.13.0-alpha.3...client/v5.13.0-alpha.4) (2025-10-12) ### Bug Fixes * exports vite ([4de2b0c](4de2b0c))
…/v5.12.0-alpha.4...server/v5.12.0-alpha.5) (2025-10-12) ### Bug Fixes * exports vite ([4de2b0c](4de2b0c))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive support for a platform adapters layer in the MCP-UI TypeScript server SDK. The adapters serve as compatibility bridges to maintain interoperability across different host environments until everyone aligns to the open spec. The Apps SDK adapter is the first implementation, enabling MCP-UI widgets to work seamlessly in environments like ChatGPT.
Key changes include:
- Implementation of a flexible adapters architecture with the Apps SDK adapter as the first example
- Automatic HTML content wrapping with adapter scripts when enabled
- Support for a new MIME type (
text/html+skybridge) for adapter-enabled content
Reviewed Changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
sdks/typescript/server/src/types.ts |
Added adapter configuration types and new MIME type |
sdks/typescript/server/src/utils.ts |
Implemented HTML wrapping function for adapters |
sdks/typescript/server/src/index.ts |
Integrated adapter support into resource creation |
sdks/typescript/server/src/adapters/ |
Complete Apps SDK adapter implementation with runtime, bundling, and types |
sdks/typescript/server/package.json |
Added build scripts and esbuild dependency for adapter bundling |
sdks/typescript/server/vite.config.ts |
Updated type entry configuration |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| export default defineConfig({ | ||
| plugins: [ | ||
| react(), | ||
| dts({ |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change from true to false for insertTypesEntry should be documented. This affects how TypeScript declaration files are generated and could impact consumers of the package.
| dts({ | |
| dts({ | |
| // NOTE: insertTypesEntry is set to false to prevent automatic addition of a types entry point. | |
| // This affects how TypeScript declaration files are generated and may impact consumers who expect a 'types' field or index.d.ts entry. | |
| // If you change this value, please document the rationale and check downstream compatibility. |
sdks/typescript/server/src/adapters/appssdk/adapter-runtime.bundled.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Deploying mcp-ui with
|
| Latest commit: |
a636844
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://568c899d.mcp-ui.pages.dev |
| Branch Preview URL: | https://alpha.mcp-ui.pages.dev |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 33 out of 35 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| * Setup listeners for Apps SDK events | ||
| */ | ||
| private setupAppsSdkEventListeners(): void { | ||
| window.addEventListener('openai:set_globals', (() => { |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing event parameter in arrow function. The addEventListener callback should accept an event parameter even if unused, as some environments may pass it and the function signature should be consistent.
| window.addEventListener('openai:set_globals', (() => { | |
| window.addEventListener('openai:set_globals', ((event) => { |
…/v5.12.0-alpha.5...server/v5.12.0-alpha.6) (2025-10-13) ### Bug Fixes * separate adapter wrappers for flexibility ([#128](#128)) ([a636844](a636844))
…t/v5.13.0) (2025-10-13) ### Features * support adapters ([#127](#127)) ([d4bd152](d4bd152))
# 1.0.0 (2025-11-04) ### Bug Fixes * add a bridge to pass messages in and out of the proxy ([#38](#38)) ([30ccac0](30ccac0)) * bump client version ([75c9236](75c9236)) * **client:** specify iframe ([fd0b70a](fd0b70a)) * **client:** styling ([6ff9b68](6ff9b68)) * dependencies ([887f61f](887f61f)) * Enable bidirectional message relay in rawhtml proxy mode ([#138](#138)) ([f0bdefb](f0bdefb)) * ensure Apps SDK adapter is bundled properly and initialized wth config ([#137](#137)) ([4f7c25c](4f7c25c)) * export RemoteDomResource ([2b86f2d](2b86f2d)) * export ResourceRenderer and HtmlResource ([2b841a5](2b841a5)) * exports ([3a93a16](3a93a16)) * fix file extension reference in package.json ([927989c](927989c)) * iframe handle ([#15](#15)) ([66bd4fd](66bd4fd)) * lint ([4487820](4487820)) * lint ([d0a91f9](d0a91f9)) * minor typo ([a0bee9c](a0bee9c)) * move react dependencies to be peer dependencies ([#91](#91)) ([f672f3e](f672f3e)), closes [#90](#90) * package config ([8dc1e53](8dc1e53)) * packaging ([9e6babd](9e6babd)) * pass ref explicitly using iframeProps ([#33](#33)) ([d01b5d1](d01b5d1)) * publish ([0943e7a](0943e7a)) * ref passing to UIResourceRenderer ([#32](#32)) ([d28c23f](d28c23f)) * remove shared dependency ([e66e8f4](e66e8f4)) * rename components and methods to fit new scope ([#22](#22)) ([6bab1fe](6bab1fe)) * rename delivery -> encoding and flavor -> framework ([#36](#36)) ([9a509ed](9a509ed)) * Ruby comment ([b22dc2e](b22dc2e)) * support react-router ([21ffb95](21ffb95)) * text and blob support in RemoteDOM resources ([ec68eb9](ec68eb9)) * trigger release ([aaca831](aaca831)) * typescript ci publish ([e7c0ebf](e7c0ebf)) * typescript types to be compatible with MCP SDK ([#10](#10)) ([74365d7](74365d7)) * update deps ([4091ef4](4091ef4)) * update isUIResource to use EmbeddedResource type ([#122](#122)) ([5a65a0b](5a65a0b)), closes [#117](#117) * use targetOrigin in the proxy message relay ([#40](#40)) ([b3fb54e](b3fb54e)) * validate URL ([b7c994d](b7c994d)) * wc dist overwrite ([#63](#63)) ([9e46c56](9e46c56)) ### Documentation * bump ([#4](#4)) ([ad4d163](ad4d163)) ### Features * add convenience function isUIResource to client SDK ([#86](#86)) ([607c6ad](607c6ad)) * add embeddedResourceProps for annotations ([#99](#99)) ([b96ec44](b96ec44)) * add proxy option to externalUrl ([#37](#37)) ([7b95cd0](7b95cd0)) * add remote-dom content type ([#18](#18)) ([5dacf37](5dacf37)) * add Ruby server SDK ([#31](#31)) ([5ffcde4](5ffcde4)) * add sandbox permissions instead of an override ([#83](#83)) ([b1068e9](b1068e9)) * add ui-request-render-data message type ([#111](#111)) ([26135ce](26135ce)) * add UIResourceRenderer Web Component ([#58](#58)) ([ec8f299](ec8f299)) * auto resize with the autoResizeIframe prop ([#56](#56)) ([76c867a](76c867a)) * change onGenericMcpAction to optional onUiAction ([1913b59](1913b59)) * **client:** allow setting supportedContentTypes for HtmlResource ([#17](#17)) ([e009ef1](e009ef1)) * consolidate ui:// and ui-app:// ([#8](#8)) ([2e08035](2e08035)) * pass iframe props down ([#14](#14)) ([112539d](112539d)) * refactor UTFtoB64 (bump server version) ([#95](#95)) ([2d5e16b](2d5e16b)) * send render data to the iframe ([#51](#51)) ([d38cfc7](d38cfc7)) * separate html and remote-dom props ([#24](#24)) ([a7f0529](a7f0529)) * support adapters ([#127](#127)) ([d4bd152](d4bd152)) * support generic messages response ([#35](#35)) ([10b407b](10b407b)) * support metadata in Python SDK ([#134](#134)) ([9bc3c64](9bc3c64)) * support passing resource metadata ([#87](#87)) ([f1c1c9b](f1c1c9b)) * support proxy for rawHtml ([#132](#132)) ([1bbeb09](1bbeb09)) * support ui action result types ([#6](#6)) ([899d152](899d152)) * switch to ResourceRenderer ([#21](#21)) ([6fe3166](6fe3166)) ### BREAKING CHANGES * The existing naming is ambiguous. Renaming delivery to encoding and flavor to framework should clarify the intent. * exported names have changed * removed deprecated client API * (previous one didn't take due to semantic-release misalignment)
This PR adds support for an adapters layer. The adapters serve as a way to maintain compatibility across hosts until everyone aligns to the open spec (and bridge gaps that may still emerge in the future).
Apps SDK is the first and only adapter.
Based on amazing work by @yannj-fr on the translation layer!