Skip to content

Conversation

@ochafik
Copy link
Contributor

@ochafik ochafik commented Nov 22, 2025

  • Upgrades @modelcontextprotocol/sdk from 1.11.x & 1.16.x to 1.22.0
  • Fixes a few type issues (mostly Resource was used instead of EmbeddedResource['resource'])

cc/ @idosal @liady: please let me know if I misunderstood the type usage

@ochafik ochafik marked this pull request as ready for review November 22, 2025 20:53
@liady
Copy link
Collaborator

liady commented Nov 22, 2025

@ochafik Thanks for the catch! This aligns with #117 and #122 as well

Copy link
Contributor

Copilot AI left a 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 upgrades the @modelcontextprotocol/sdk dependency from versions 1.11.x and 1.16.x to 1.22.0 across the monorepo. The upgrade includes necessary type fixes where Resource is replaced with EmbeddedResource['resource'] to align with the SDK's updated type structure, and adds proper type guards using the 'in' operator for property existence checks.

Key Changes

  • Updated SDK version to 1.22.0 in all package.json files and pnpm-lock.yaml
  • Replaced Resource type with EmbeddedResource['resource'] in client SDK components and tests
  • Added type guards with 'in' operator for safe property access on partial resource types
  • Fixed import paths in test files and removed file extension from bundled adapter import

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sdks/typescript/server/src/adapters/appssdk/adapter.ts Removed .ts extension from bundled adapter import for better module resolution
sdks/typescript/client/src/utils/processResource.ts Added 'in' operator type guards for text/blob property checks and updated processRemoteDOMResource signature to use EmbeddedResource['resource']
sdks/typescript/client/src/components/__tests__/UIResourceRendererWC.test.tsx Fixed import paths from ./ to ../ to correctly resolve parent directory modules
sdks/typescript/client/src/components/__tests__/UIResourceRenderer.unmocked.test.tsx Updated Resource type import to EmbeddedResource and changed type annotations
sdks/typescript/client/src/components/__tests__/UIResourceRenderer.test.tsx Changed baseResource property from 'content' to 'text' to match correct resource schema
sdks/typescript/client/src/components/__tests__/HTMLResourceRenderer.test.tsx Updated type import and test resource type annotations to use EmbeddedResource['resource']
sdks/typescript/client/src/components/UIResourceRendererWC.tsx Updated type imports and annotations to use EmbeddedResource['resource']
sdks/typescript/client/src/components/UIResourceRenderer.tsx Updated type to use EmbeddedResource['resource'] and added intersection type for custom contentType property
sdks/typescript/client/src/components/RemoteDOMResourceRenderer.tsx Updated type import and prop interface to use EmbeddedResource['resource']
sdks/typescript/client/src/components/HTMLResourceRenderer.tsx Updated type import and prop interface to use EmbeddedResource['resource']
sdks/typescript/client/package.json Added vite-tsconfig-paths dev dependency for TypeScript path resolution
pnpm-lock.yaml Updated SDK version to 1.22.0 and added new dependencies (ajv@8.17.1, ajv-formats, React 19.2.0 peer dependencies)
examples/typescript-server-demo/package.json Updated SDK dependency to ^1.22.0
examples/server/package.json Updated SDK dependency to ^1.22.0
examples/server/package-lock.json Updated top-level SDK dependency reference to ^1.22.0
Files not reviewed (2)
  • examples/server/package-lock.json: Language not supported
  • pnpm-lock.yaml: Language not supported

@idosal idosal merged commit 46bbd18 into MCP-UI-Org:main Nov 29, 2025
14 checks passed
@idosal
Copy link
Collaborator

idosal commented Nov 29, 2025

Thanks @ochafik!

@github-actions
Copy link

🎉 This PR is included in version 5.18.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 5.17.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants