@mcp-ts/sdk 1.3.3 → 1.3.4
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 +23 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -338,44 +338,40 @@ The library supports multiple storage backends. You can explicitly select one us
|
|
|
338
338
|
|
|
339
339
|
## 🏗️ Architecture
|
|
340
340
|
|
|
341
|
-
|
|
341
|
+
`@mcp-ts/sdk` supports two common runtime topologies: direct SSE from browser clients, and outbound bridge connectivity for local agents.
|
|
342
342
|
|
|
343
343
|
|
|
344
344
|
```mermaid
|
|
345
|
-
graph
|
|
346
|
-
subgraph
|
|
347
|
-
UI[UI
|
|
345
|
+
graph LR
|
|
346
|
+
subgraph Direct["Direct SDK Flow (SSE)"]
|
|
347
|
+
UI[Browser UI]
|
|
348
348
|
Hook[useMcp Hook]
|
|
349
|
-
|
|
350
|
-
|
|
349
|
+
API[Next.js /api/mcp]
|
|
350
|
+
Mgr[MultiSessionClient]
|
|
351
|
+
Store[(Redis/File/Memory)]
|
|
352
|
+
MCP[MCP Servers]
|
|
351
353
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
ClientMgr --> SSE
|
|
354
|
+
UI <--> Hook
|
|
355
|
+
Hook -- "HTTP RPC" --> API
|
|
356
|
+
API --> Mgr
|
|
357
|
+
Mgr -- "SSE events" --> Hook
|
|
358
|
+
Mgr <--> Store
|
|
359
|
+
Mgr <--> MCP
|
|
359
360
|
end
|
|
360
361
|
|
|
361
|
-
subgraph
|
|
362
|
-
|
|
363
|
-
|
|
362
|
+
subgraph Bridge["Remote Bridge Flow (mcp-local-agent)"]
|
|
363
|
+
Agent[Local Agent Runtime]
|
|
364
|
+
Remote[Remote Bridge Server]
|
|
365
|
+
LocalMcp[Local MCP Servers]
|
|
364
366
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
+
Agent -- "WSS /connect (outbound)" --> Remote
|
|
368
|
+
Agent <--> LocalMcp
|
|
367
369
|
end
|
|
368
|
-
|
|
369
|
-
Hook -- "HTTP POST (RPC)" --> API
|
|
370
|
-
SSE -- "Server-Sent Events" --> Hook
|
|
371
|
-
ClientMgr -- "Persist State" <--> Redis
|
|
372
|
-
ClientMgr -- "MCP Protocol" <--> TargetServer
|
|
373
370
|
```
|
|
374
371
|
|
|
375
|
-
- **
|
|
376
|
-
- **
|
|
377
|
-
- **Storage**:
|
|
378
|
-
- **SSE**: Delivers real-time updates (logs, tool list changes) to the client.
|
|
372
|
+
- **Direct SDK flow**: Browser clients use `useMcp` over HTTP + SSE to a server route backed by `MultiSessionClient`.
|
|
373
|
+
- **Bridge flow**: `mcp-local-agent` keeps an outbound authenticated WebSocket to a remote bridge and forwards tool calls to local MCP servers.
|
|
374
|
+
- **Storage**: Session state and connection metadata persist in Redis, File, SQLite, or Memory backends.
|
|
379
375
|
|
|
380
376
|
> [!NOTE]
|
|
381
377
|
> This package (`@mcp-ts/sdk`) provides a unified MCP client with support for adapters and storage backends such as AI SDK, Mastra, LangChain, and Redis.
|
|
@@ -402,4 +398,3 @@ Contributions are welcome! Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for
|
|
|
402
398
|
<img src="https://visitor-badge.laobi.icu/badge?page_id=zonlabs.mcp-ts&style=for-the-badge&color=00d4ff" alt="Views">
|
|
403
399
|
</p>
|
|
404
400
|
|
|
405
|
-
|