This repository was archived by the owner on May 21, 2026. It is now read-only.
feat: MCP-638: TS implement UI resource in server - #77
Merged
Pederzh merged 20 commits intoOct 14, 2025
Conversation
- Add UIResourceDefinition type and supporting interfaces for widget configuration - Implement uiResource() method that registers widgets as both tools and resources - Add widget prop handling with automatic query parameter conversion - Create modular type system with separate files for common, resource, tool, and prompt types - Support widget iframe rendering with configurable frame sizes - Add widget serving routes for static assets and HTML files - Export UIResource types from main package index for external consumption
- Replace hardcoded template list with dynamic directory scanning - Add helpful tip about uiresource template for UI resources - Improve error message when template not found
tonxxd
reviewed
Oct 14, 2025
tonxxd
reviewed
Oct 14, 2025
| widget: 'kanban-board', | ||
| title: 'Kanban Board', | ||
| description: 'Interactive task management board with drag-and-drop support', | ||
| props: { |
Contributor
Author
There was a problem hiding this comment.
The convertPropsToInputs method (lines 479-489) converts your props into tool input definitions, which then get converted to Zod validation schemas.
The applyDefaultProps method (lines 501-511) extracts default values from props to use when accessing the resource directly (without calling the tool).
tonxxd
suggested changes
Oct 14, 2025
Pederzh
deleted the
feature/mcp-638-ts-implement-ui-resource-in-server
branch
October 14, 2025 20:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Introduce comprehensive UIResource support for seamless integration with MCP-UI clients, enabling interactive widget serving through a unified API.
BREAKING CHANGE: None - this is purely additive functionality
New Features
Core UIResource API
uiResource()method to McpServer for unified widget registrationMCP-UI Adapter Layer
Template System
uiresourcetemplate demonstrating all resource typesInspector Integration
Technical Details
Type System
Testing
Dependencies
Usage Example
Migration Path
Closes #MCP-638
Does this PR need a changeset?
pnpm changeset)Quick reminder:
pnpm changeset # Creates a changeset interactively📚 Full guide: Changeset Workflow Guide
Need help? See when to create changesets and examples
🚀 Release Target
mainbranch → Stable release (default)betabranch → Beta/prerelease versionReleasing a beta? See the Beta Release Workflow Guide for instructions.
Checklist
Code Quality
pnpm test)pnpm lint)pnpm build)Documentation
Release Preparation
pnpm changeset) - if this affects published packagesAdditional Notes