docs: align Protocol and role-specific setup
This commit is contained in:
parent
e7ffe7c738
commit
c847bc0887
2 changed files with 35 additions and 22 deletions
|
|
@ -56,11 +56,11 @@ flowchart LR
|
|||
- **Host** — The chat client (e.g., Claude Desktop) that connects to servers, embeds Views in iframes, and proxies communication between them.
|
||||
- **View** — The UI running inside a sandboxed iframe. It receives tool data from the Host and can call server tools or send messages back to the chat.
|
||||
|
||||
The View's `App` subclasses the base MCP SDK `Client`. The Host's `AppBridge`
|
||||
subclasses the base MCP SDK `Server` for the inner iframe channel, while a
|
||||
separate outer `Client` connects the Host to the actual MCP Server. Keeping
|
||||
those two connections separate prevents iframe negotiation and capabilities
|
||||
from leaking into the server connection.
|
||||
The View's `App` and the Host's `AppBridge` both subclass the base MCP SDK's
|
||||
public `Protocol` for the iframe channel. A separate outer `Client` connects
|
||||
the Host to the actual MCP Server. Keeping those two connections separate
|
||||
preserves the Apps-only iframe handshake and prevents iframe capabilities from
|
||||
leaking into the server connection.
|
||||
|
||||
## Lifecycle
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ Install the dependencies you'll need:
|
|||
|
||||
```bash
|
||||
npm init -y
|
||||
npm install @modelcontextprotocol/ext-apps @modelcontextprotocol/client@2.0.0-beta.4 @modelcontextprotocol/core@2.0.0-beta.4 @modelcontextprotocol/server@2.0.0-beta.4 @modelcontextprotocol/node@2.0.0-beta.4 @modelcontextprotocol/express@2.0.0-beta.4 zod@^4.2.0 express cors
|
||||
npm install @modelcontextprotocol/ext-apps @modelcontextprotocol/client@2.0.0-beta.5 @modelcontextprotocol/core@2.0.0-beta.5 @modelcontextprotocol/server@2.0.0-beta.5 @modelcontextprotocol/node@2.0.0-beta.5 @modelcontextprotocol/express@2.0.0-beta.5 zod@^4.2.0 express cors
|
||||
npm install -D typescript vite vite-plugin-singlefile @types/express @types/cors @types/node tsx concurrently cross-env
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue