@modelcontextprotocol/ext-apps 0.0.1 → 0.0.6

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Anthropic, PBC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -29,43 +29,38 @@ We have [contributed a tentative implementation](https://github.com/MCP-UI-Org/m
29
29
 
30
30
  ## Installation
31
31
 
32
- This repo is in flux and isn't published to npm yet. When it is, it will use the `@modelcontextprotocol/ext-apps` package.
33
-
34
- In the meantime you can depend on the SDK library in a Node.js project by installing it with its git URL:
35
-
36
32
  ```bash
37
- npm install -S git+https://github.com/modelcontextprotocol/ext-apps.git
33
+ npm install -S @modelcontextprotocol/ext-apps
38
34
  ```
39
35
 
40
- Your `package.json` will then look like:
36
+ Or edit your `package.json` manually:
41
37
 
42
38
  ```json
43
39
  {
44
40
  "dependencies": {
45
- "@modelcontextprotocol/ext-apps": "git+https://github.com/modelcontextprotocol/ext-apps.git"
41
+ "@modelcontextprotocol/ext-apps": "^0.0.1"
46
42
  }
47
43
  }
48
44
  ```
49
45
 
50
- > [!NOTE]
51
- > The build tools (`esbuild`, `tsx`, `typescript`) are in `dependencies` rather than `devDependencies`. This is intentional: it allows the `prepare` script to run when the package is installed from git, since npm doesn't install devDependencies for git dependencies.
52
- >
53
- > Once the package is published to npm with pre-built `dist/`, these can be moved back to `devDependencies`.
54
-
55
46
  ## Examples
56
47
 
57
- - [`examples/basic-server-react`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-react) Example MCP server with tools that return UI Apps (React)
48
+ Start with these foundational examples to learn the SDK:
49
+
58
50
  - [`examples/basic-server-vanillajs`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-vanillajs) — Example MCP server with tools that return UI Apps (vanilla JS)
51
+ - [`examples/basic-server-react`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-react) — Example MCP server with tools that return UI Apps (React)
59
52
  - [`examples/basic-host`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-host) — Bare-bones example of hosting MCP Apps
60
53
 
61
- To run the examples end-to-end:
54
+ The [`examples/`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples) directory contains additional demo apps showcasing real-world use cases.
55
+
56
+ To run all examples together:
62
57
 
63
58
  ```
64
- npm i
59
+ npm install
65
60
  npm run examples:start
66
61
  ```
67
62
 
68
- Then open http://localhost:8080/
63
+ Then open http://localhost:8080/.
69
64
 
70
65
  ## Resources
71
66
 
@@ -4,7 +4,7 @@ import { Implementation, LoggingMessageNotification, Notification, PingRequest,
4
4
  import { Protocol, ProtocolOptions, RequestOptions } from "@modelcontextprotocol/sdk/shared/protocol.js";
5
5
  import { type McpUiSandboxResourceReadyNotification, type McpUiSizeChangedNotification, type McpUiToolInputNotification, type McpUiToolInputPartialNotification, type McpUiToolResultNotification, McpUiAppCapabilities, McpUiHostCapabilities, McpUiHostContext, McpUiHostContextChangedNotification, McpUiInitializedNotification, McpUiMessageRequest, McpUiMessageResult, McpUiOpenLinkRequest, McpUiOpenLinkResult, McpUiResourceTeardownRequest, McpUiSandboxProxyReadyNotification } from "./types";
6
6
  export * from "./types";
7
- export { RESOURCE_URI_META_KEY } from "./app";
7
+ export { RESOURCE_URI_META_KEY, RESOURCE_MIME_TYPE } from "./app";
8
8
  export { PostMessageTransport } from "./message-transport";
9
9
  /**
10
10
  * Options for configuring AppBridge behavior.