@modelcontextprotocol/ext-apps 0.0.1 → 0.0.7
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/LICENSE +21 -0
- package/README.md +11 -16
- package/dist/src/app-bridge.d.ts +1 -1
- package/dist/src/app-bridge.js +5 -5
- package/dist/src/app.d.ts +4 -0
- package/dist/src/app.js +4 -4
- package/dist/src/react/index.js +5 -5
- package/dist/src/types.d.ts +11 -0
- package/package.json +12 -17
package/dist/src/types.d.ts
CHANGED
|
@@ -258,6 +258,13 @@ export interface McpUiSandboxResourceReadyNotification {
|
|
|
258
258
|
html: string;
|
|
259
259
|
/** Optional override for the inner iframe's sandbox attribute */
|
|
260
260
|
sandbox?: string;
|
|
261
|
+
/** CSP configuration from resource metadata */
|
|
262
|
+
csp?: {
|
|
263
|
+
/** Origins for network requests (fetch/XHR/WebSocket) */
|
|
264
|
+
connectDomains?: string[];
|
|
265
|
+
/** Origins for static resources (scripts, images, styles, fonts) */
|
|
266
|
+
resourceDomains?: string[];
|
|
267
|
+
};
|
|
261
268
|
};
|
|
262
269
|
}
|
|
263
270
|
/**
|
|
@@ -269,6 +276,10 @@ export declare const McpUiSandboxResourceReadyNotificationSchema: z.ZodObject<{
|
|
|
269
276
|
params: z.ZodObject<{
|
|
270
277
|
html: z.ZodString;
|
|
271
278
|
sandbox: z.ZodOptional<z.ZodString>;
|
|
279
|
+
csp: z.ZodOptional<z.ZodObject<{
|
|
280
|
+
connectDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
281
|
+
resourceDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
282
|
+
}, z.core.$strip>>;
|
|
272
283
|
}, z.core.$strip>;
|
|
273
284
|
}, z.core.$strip>;
|
|
274
285
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"homepage": "https://github.com/modelcontextprotocol/ext-apps",
|
|
3
2
|
"name": "@modelcontextprotocol/ext-apps",
|
|
4
|
-
"
|
|
3
|
+
"repository": {
|
|
4
|
+
"type": "git",
|
|
5
|
+
"url": "https://github.com/modelcontextprotocol/ext-apps"
|
|
6
|
+
},
|
|
7
|
+
"homepage": "https://github.com/modelcontextprotocol/ext-apps",
|
|
8
|
+
"version": "0.0.7",
|
|
9
|
+
"license": "MIT",
|
|
5
10
|
"description": "MCP Apps SDK — Enable MCP servers to display interactive user interfaces in conversational clients.",
|
|
6
11
|
"type": "module",
|
|
7
12
|
"main": "./dist/src/app.js",
|
|
@@ -27,23 +32,13 @@
|
|
|
27
32
|
],
|
|
28
33
|
"scripts": {
|
|
29
34
|
"build": "bun build.bun.ts",
|
|
35
|
+
"prepack": "npm run build",
|
|
30
36
|
"build:all": "npm run build && npm run examples:build",
|
|
31
37
|
"test": "bun test",
|
|
32
|
-
"examples:build": "
|
|
33
|
-
"examples:start": "NODE_ENV=development npm run build &&
|
|
34
|
-
"examples:
|
|
35
|
-
"examples:start:basic-server-react": "PORT=3101 npm run --workspace=examples/basic-server-react start",
|
|
36
|
-
"examples:start:basic-server-vanillajs": "PORT=3102 npm run --workspace=examples/basic-server-vanillajs start",
|
|
37
|
-
"examples:start:budget-allocator-server": "PORT=3103 npm run --workspace=examples/budget-allocator-server start",
|
|
38
|
-
"examples:start:cohort-heatmap-server": "PORT=3104 npm run --workspace=examples/cohort-heatmap-server start",
|
|
39
|
-
"examples:start:customer-segmentation-server": "PORT=3105 npm run --workspace=examples/customer-segmentation-server start",
|
|
40
|
-
"examples:start:scenario-modeler-server": "PORT=3106 npm run --workspace=examples/scenario-modeler-server start",
|
|
41
|
-
"examples:start:system-monitor-server": "PORT=3107 npm run --workspace=examples/system-monitor-server start",
|
|
38
|
+
"examples:build": "bun examples/run-all.ts build",
|
|
39
|
+
"examples:start": "NODE_ENV=development npm run build && bun examples/run-all.ts start",
|
|
40
|
+
"examples:dev": "NODE_ENV=development bun examples/run-all.ts dev",
|
|
42
41
|
"watch": "nodemon --watch src --ext ts,tsx --exec 'bun build.bun.ts'",
|
|
43
|
-
"examples:dev": "NODE_ENV=development concurrently 'npm run watch' 'npm run examples:dev:basic-host' 'npm run examples:dev:basic-server-react'",
|
|
44
|
-
"examples:dev:basic-host": "npm run --workspace=examples/basic-host dev",
|
|
45
|
-
"examples:dev:basic-server-react": "npm run --workspace=examples/basic-server-react dev",
|
|
46
|
-
"examples:dev:basic-server-vanillajs": "npm run --workspace=examples/basic-server-vanillajs dev",
|
|
47
42
|
"prepare": "npm run build && husky",
|
|
48
43
|
"docs": "typedoc",
|
|
49
44
|
"docs:watch": "typedoc --watch",
|
|
@@ -54,6 +49,7 @@
|
|
|
54
49
|
"author": "Olivier Chafik",
|
|
55
50
|
"devDependencies": {
|
|
56
51
|
"@types/bun": "^1.3.2",
|
|
52
|
+
"bun": "^1.3.2",
|
|
57
53
|
"@types/react": "^19.2.2",
|
|
58
54
|
"@types/react-dom": "^19.2.2",
|
|
59
55
|
"concurrently": "^9.2.1",
|
|
@@ -68,7 +64,6 @@
|
|
|
68
64
|
},
|
|
69
65
|
"dependencies": {
|
|
70
66
|
"@modelcontextprotocol/sdk": "^1.23.0",
|
|
71
|
-
"bun": "^1.3.2",
|
|
72
67
|
"react": "^19.2.0",
|
|
73
68
|
"react-dom": "^19.2.0",
|
|
74
69
|
"zod": "^3.25"
|