Skip to content

go-sdk/mcp: add mcp app example#847

Open
yurivish wants to merge 1 commit intomodelcontextprotocol:mainfrom
yurivish:yurivish/mcp-app
Open

go-sdk/mcp: add mcp app example#847
yurivish wants to merge 1 commit intomodelcontextprotocol:mainfrom
yurivish:yurivish/mcp-app

Conversation

@yurivish
Copy link

@yurivish yurivish commented Mar 16, 2026

Adds a simple example of an MCP server that can display a user interface using the MCP app extension.

Fixes #815 (comment)

The tricky / somewhat inelegant bit is that the JS for the MCP Apps SDK is inlined into the HTML; it is possible to load other resources but they must be served from a web server, so I opted for simplicity to embed the required JS in index.html. Thinking about it more, this may not have been a great choice for an example. In my slightly more real-world example, I actually bundle and inline the code dynamically using esbuild's Go API.

Adds a simple example of an MCP server that can display a user interface using the MCP app extension.
@maciej-kisiel
Copy link
Contributor

maciej-kisiel commented Mar 17, 2026

Thanks for the contribution @yurivish! I'm happy that you found some time to show how MCP Apps can be used to others.

I agree with the concern about the embedded JS code. I'm not very familiar with front-end development, but it would be great if there was a way to not put all the code in the example. Isn't the Apps SDK hosted somewhere so that it could be included as an external script?

I think the example could also use a small README.md to explain how to run it. I assume this is supposed to show a webpage, but it's not clear how open it given that the server uses STDIO transport.

There are also some simple fixes needed as uncovered by the test runs.

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.

[Feature Request] Support the MCP Apps extension, enabling MCP servers to show interactive user interfaces

2 participants