@modelcontextprotocol/ext-apps 0.2.2 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -4
- package/dist/src/app-bridge.d.ts +2 -2
- package/dist/src/app-bridge.js +35 -17
- package/dist/src/app-with-deps.js +61 -0
- package/dist/src/app.d.ts +6 -6
- package/dist/src/app.js +35 -17
- package/dist/src/generated/schema.d.ts +66 -26
- package/dist/src/message-transport.d.ts +2 -2
- package/dist/src/react/index.js +35 -17
- package/dist/src/react/react-with-deps.js +61 -0
- package/dist/src/server/index.d.ts +10 -6
- package/dist/src/server/index.js +32 -14
- package/dist/src/spec.types.d.ts +50 -14
- package/dist/src/types.d.ts +1 -1
- package/package.json +16 -6
package/README.md
CHANGED
|
@@ -47,9 +47,13 @@ Or edit your `package.json` manually:
|
|
|
47
47
|
|
|
48
48
|
Start with these foundational examples to learn the SDK:
|
|
49
49
|
|
|
50
|
-
- [`examples/basic-server-vanillajs`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-vanillajs) —
|
|
51
|
-
- [`examples/basic-server-react`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-react) —
|
|
52
|
-
- [`examples/basic-
|
|
50
|
+
- [`examples/basic-server-vanillajs`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-vanillajs) — MCP server + MCP App using vanilla JS
|
|
51
|
+
- [`examples/basic-server-react`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-react) — MCP server + MCP App using [React](https://github.com/facebook/react)
|
|
52
|
+
- [`examples/basic-server-vue`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-vue) — MCP server + MCP App using [Vue](https://github.com/vuejs/vue)
|
|
53
|
+
- [`examples/basic-server-svelte`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-svelte) — MCP server + MCP App using [Svelte](https://github.com/sveltejs/svelte)
|
|
54
|
+
- [`examples/basic-server-preact`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-preact) — MCP server + MCP App using [Preact](https://github.com/preactjs/preact)
|
|
55
|
+
- [`examples/basic-server-solid`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-solid) — MCP server + MCP App using [Solid](https://github.com/solidjs/solid)
|
|
56
|
+
- [`examples/basic-host`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-host) — MCP host application supporting MCP Apps
|
|
53
57
|
|
|
54
58
|
The [`examples/`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples) directory contains additional demo apps showcasing real-world use cases.
|
|
55
59
|
|
|
@@ -57,7 +61,7 @@ To run all examples together:
|
|
|
57
61
|
|
|
58
62
|
```bash
|
|
59
63
|
npm install
|
|
60
|
-
npm
|
|
64
|
+
npm start
|
|
61
65
|
```
|
|
62
66
|
|
|
63
67
|
Then open http://localhost:8080/.
|
package/dist/src/app-bridge.d.ts
CHANGED
|
@@ -225,7 +225,7 @@ export declare class AppBridge extends Protocol<AppRequest, AppNotification, App
|
|
|
225
225
|
* adjust the iframe container dimensions based on the Guest UI's content.
|
|
226
226
|
*
|
|
227
227
|
* Note: This is for Guest UI → Host communication. To notify the Guest UI of
|
|
228
|
-
* host
|
|
228
|
+
* host container dimension changes, use {@link setHostContext}.
|
|
229
229
|
*
|
|
230
230
|
* @example
|
|
231
231
|
* ```typescript
|
|
@@ -689,7 +689,7 @@ export declare class AppBridge extends Protocol<AppRequest, AppNotification, App
|
|
|
689
689
|
* ```typescript
|
|
690
690
|
* bridge.setHostContext({
|
|
691
691
|
* theme: "dark",
|
|
692
|
-
*
|
|
692
|
+
* containerDimensions: { maxHeight: 600, width: 800 }
|
|
693
693
|
* });
|
|
694
694
|
* ```
|
|
695
695
|
*
|