You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-10Lines changed: 39 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,10 @@ This repo provides:
16
16
-[ui-vanilla.tsx](./examples/simple-server/src/ui-vanilla.ts): vanilla App returned by the `create-ui-vanilla`
17
17
-[ui-raw.tsx](./examples/simple-server/src/ui-raw.ts): same as vanilla App but doesn't use the SDK runtime (just its types)
18
18
19
+
-[examples/simple-host](./examples/simple-host): bare-bone examples on how to host MCP Apps (both use the [AppBridge](./src/app-bridge.ts) class to talk to a hosted App)
-[example-host-vanilla.tsx](./examples/simple-host/src/example-host-vanilla.tsx) doesn't use React
22
+
19
23
-[message-transport](./src/message-transport.ts): `PostMessageTransport` class that uses `postMessage` to exchange JSON-RPC messages between windows / iframes
20
24
21
25
-[app.ts](./src/app.ts): `App` class used by an App to talk to its host
@@ -26,22 +30,47 @@ This repo provides:
26
30
27
31
What this repo does NOT provide:
28
32
29
-
- There's no host implementation here (beyond the `AppBridge` just used for communications).
33
+
- There's no _supported_host implementation in this repo (beyond the [examples/simple-host](./examples/simple-host) example)
30
34
- We have [contributed a tentative implementation](https://github.com/MCP-UI-Org/mcp-ui/pull/147) of hosting / iframing / sandboxing logic to the [MCP-UI](https://github.com/idosal/mcp-ui) repository, and expect OSS clients may use it, while other clients might roll their own hosting logic.
31
-
- A prior iteration of an e2e prototype w/ client, server and hosting parts is available [in this gist](https://gist.github.com/ochafik/a9603ba2d6757d6038ce066eded4c354)
32
35
33
-
## Installation
36
+
## Using the SDK
34
37
35
-
This repo is in flux and isn't published to npm (when it is, it will use the `@modelcontextprotocol/ext-apps` package). Please install it from git for now:
This repo is in flux and isn't published to npm yet: when it is, it will use the `@modelcontextprotocol/ext-apps` package.
42
54
43
-
### Build tools in dependencies
55
+
In the meantime you can depend on the SDK library in a Node.js project by installing it w/ its git URL:
44
56
45
-
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.
Once the package is published to npm with pre-built `dist/`, these can be moved back to `devDependencies`.
73
+
> [!NOTE]
74
+
> 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.
75
+
>
76
+
> Once the package is published to npm with pre-built `dist/`, these can be moved back to `devDependencies`.
0 commit comments