@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.
Files changed (2) hide show
  1. package/README.md +23 -28
  2. 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
- This package uses **Server-Sent Events (SSE)** instead of WebSockets:
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 TD
346
- subgraph Client ["Browser (React)"]
347
- UI[UI Components]
345
+ graph LR
346
+ subgraph Direct["Direct SDK Flow (SSE)"]
347
+ UI[Browser UI]
348
348
  Hook[useMcp Hook]
349
- UI <--> Hook
350
- end
349
+ API[Next.js /api/mcp]
350
+ Mgr[MultiSessionClient]
351
+ Store[(Redis/File/Memory)]
352
+ MCP[MCP Servers]
351
353
 
352
- subgraph Server ["Next.js Server (Node.js)"]
353
- API[API Route /api/mcp]
354
- SSE[SSE Handler]
355
- ClientMgr[MCP Client Manager]
356
-
357
- API <--> ClientMgr
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 Infrastructure
362
- Redis[(Redis Session Store)]
363
- end
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
- subgraph External ["External MCP Servers"]
366
- TargetServer[Target MCP Server]
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
- - **Browser**: React application using the `useMcp` hook for state management.
376
- - **Next.js Server**: Acts as a bridge, maintaining connections to external MCP servers.
377
- - **Storage**: Persists session state, OAuth tokens, and connection details (Redis, File, or Memory).
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
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-ts/sdk",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },