Update MCP apps tutorial: fix _meta structure and version prereq (#6404)

This commit is contained in:
Rizel Scarlett
2026-01-08 15:57:20 -05:00
committed by GitHub
parent d97b6a52e8
commit c68308d16b
@@ -17,7 +17,7 @@ In this tutorial, you will build an MCP App using JavaScript and Node.js. The ap
:::info Prerequisites
- Node.js 18+ installed
- goose Desktop application
- goose Desktop 1.19.1+ installed
:::
---
@@ -62,6 +62,9 @@ Update your `package.json` to use ES modules by adding `"type": "module"`:
Create `server.js` - this is the MCP server that loads and serves your HTML:
<details>
<summary>server.js</summary>
```javascript
#!/usr/bin/env node
@@ -126,7 +129,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
],
// This metadata tells goose to render the MCP App
_meta: {
"ui/resourceUri": "ui://mcp-app-demo/main",
ui: {
resourceUri: "ui://mcp-app-demo/main",
},
},
};
}
@@ -186,6 +191,8 @@ async function main() {
main().catch(console.error);
```
</details>
---
## Step 3: Create the App HTML