diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dc8042b..52f2796c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ### Features -* switch to ResourceRenderer ([#21](https://github.com/idosal/mcp-ui/issues/21)) ([6fe3166](https://github.com/idosal/mcp-ui/commit/6fe316682675e27db914d60696754677e3783448)) +* switch to UiResourceRenderer ([#21](https://github.com/idosal/mcp-ui/issues/21)) ([6fe3166](https://github.com/idosal/mcp-ui/commit/6fe316682675e27db914d60696754677e3783448)) ### BREAKING CHANGES @@ -16,7 +16,7 @@ ### Bug Fixes * export RemoteDomResource ([2b86f2d](https://github.com/idosal/mcp-ui/commit/2b86f2dd4506de49c69908e23d84a2a323170446)) -* export ResourceRenderer and HtmlResource ([2b841a5](https://github.com/idosal/mcp-ui/commit/2b841a556c1111ed70ccb3d3987afd21fe7df897)) +* export UiResourceRenderer and HtmlResource ([2b841a5](https://github.com/idosal/mcp-ui/commit/2b841a556c1111ed70ccb3d3987afd21fe7df897)) # [2.5.0](https://github.com/idosal/mcp-ui/compare/v2.4.0...v2.5.0) (2025-06-27) diff --git a/README.md b/README.md index 6a8fd01f..9f90042b 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,8 @@ `mcp-ui` is a TypeScript SDK comprising two packages: -* **`@mcp-ui/server`**: Utilities to generate UI snippets (`HtmlResourceBlock`) on your MCP server. -* **`@mcp-ui/client`**: UI components (e.g., ``) to render those snippets and handle their events. +* **`@mcp-ui/server`**: Utilities to generate UI resources (`UIResource`) on your MCP server. +* **`@mcp-ui/client`**: UI components (e.g., ``) to render the UI resources and handle their events. Together, they let you define reusable UI snippets on the server side, seamlessly and securely render them in the client, and react to their actions in the MCP host environment. @@ -44,11 +44,11 @@ Together, they let you define reusable UI snippets on the server side, seamlessl In essence, by using `mcp-ui` SDKs, servers and hosts can agree on contracts that enable them to create and render interactive UI snippets (as a path to a standardized UI approach in MCP). -### HTML Resource Block -The primary payload returned from the server to the client is the `HtmlResourceBlock`: +### UI Resource +The primary payload returned from the server to the client is the `UIResource`: ```ts -interface HtmlResourceBlock { +interface UIResource { type: 'resource'; resource: { uri: string; // ui://component/id @@ -67,11 +67,11 @@ interface HtmlResourceBlock { ### Resource Renderer -The HTML Resource Block is rendered in the `` component. It automatically detects the resource type and renders the appropriate component. +The UI Resource is rendered in the `` component. It automatically detects the resource type and renders the appropriate component. It accepts the following props: - **`resource`**: The resource object from an MCP response. Should include `uri`, `mimeType`, and content (`text`, `blob`, or `content`) -- **`onUiAction`**: Optional callback for handling UI actions from the resource: +- **`onUIAction`**: Optional callback for handling UI actions from the resource: ```typescript { type: 'tool', payload: { toolName: string, params: Record } } | { type: 'intent', payload: { intent: string, params: Record } } | @@ -89,7 +89,7 @@ It accepts the following props: #### HTML (`text/html` and `text/uri-list`) -Rendered using the `` component, which displays content inside an `