Skip to content

Conversation

@rinormaloku
Copy link

@rinormaloku rinormaloku commented Jan 17, 2026

This PR updates the basic-host to support MCP Resource Templates. The changes are backward compatible: if a tool provides a static URI, it behaves as before. If it provides a URI template, the host will fill in the parameters before fetching the resource.

Why this change?

The current implementation only supports static resources. Supporting Resource Templates allows for Server-Side Rendering (SSR). This simplifies app development because the server can inject data directly into the HTML before it is sent to the host, reducing the need for complex JavaScript inside the app's sandbox.

How to test

You can test this SSR flow using the following sample app:

  1. Server: Use the Pizza Carousel Sample App.
  2. Tool: Call the pizza-carousel tool.
  3. Arguments: topping=vegetarian.
  4. Expectation: The host will detect the template, replace the parameter to form the URI ui://widget/pizza-carousel/vegetarian, and render the page showing only vegetarian options.

References:

@rinormaloku rinormaloku changed the title utilize resource templates in basic-host Add Resource Template support to basic-host Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant