@ai-sdk/mcp 2.0.68 → 2.0.70

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @ai-sdk/mcp
2
2
 
3
+ ## 2.0.70
4
+
5
+ ### Patch Changes
6
+
7
+ - 6315a3d: Add experimental managed MCP Events adapters for backend-owned subscription lifecycles without a local event store. Rename the unreleased client event configuration to `experimental_events` and infer distinct managed and direct event APIs from a single MCPClientConfig and exclusive MCPEventsConfig union.
8
+ - ac50548: feat(mcp): add compatibility for webhook based mcp events
9
+ - d8e4b51: fix(mcp): authorization server paths beginning with repeated slashes should not bypass authorization server validation
10
+
11
+ ## 2.0.69
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [d3bcad9]
16
+ - @ai-sdk/provider@4.0.24
17
+ - @ai-sdk/provider-utils@5.0.56
18
+
3
19
  ## 2.0.68
4
20
 
5
21
  ### Patch Changes
package/README.md CHANGED
@@ -59,6 +59,23 @@ try {
59
59
  The client converts MCP tool definitions into AI SDK tools, so model calls can
60
60
  use them through the standard `tools` option.
61
61
 
62
+ ## Experimental webhook events
63
+
64
+ Use `list`, `subscribe`, `refresh`, and `unsubscribe` through
65
+ `client.experimental_events` on the same `createMCPClient` instance. Configure
66
+ `experimental_events: { store }` with private durable storage shared with
67
+ `experimental_createMCPEventWebhook`, which you mount at your callback URL.
68
+
69
+ Subscription creation persists `delivery.url` and the generated signing secret
70
+ before contacting the server, enabling signed callback verification during the
71
+ subscribe request. The receiver verifies raw request bytes and checks event
72
+ envelopes before invoking your handler. Optional callbacks let your application
73
+ validate filters and event data. Agent execution and durable deduplication
74
+ remain application concerns; closing the client does not unsubscribe.
75
+
76
+ See the [MCP Events guide](https://ai-sdk.dev/docs/ai-sdk-core/mcp-events) and the
77
+ [local server/client example](../../examples/mcp/src/events/README.md).
78
+
62
79
  ## Protocol versions
63
80
 
64
81
  The client supports legacy MCP protocol versions through the `initialize`
@@ -170,3 +187,9 @@ const mcpClient = await createMCPClient({
170
187
  Please check out the
171
188
  [AI SDK MCP documentation](https://ai-sdk.dev/docs/ai-sdk-core/mcp-tools) for
172
189
  more information.
190
+
191
+ Managed backends can implement `Experimental_MCPEventsAdapter` and configure
192
+ `experimental_events: { adapter }` instead of a store. Catalog discovery still
193
+ uses the authenticated MCP transport; subscribe/get/list/unsubscribe delegate
194
+ to the backend, which owns renewal and webhook delivery. Managed clients do not
195
+ expose `refresh()`. See the [managed subscription reference](https://ai-sdk.dev/docs/reference/ai-sdk-core/mcp-events#managed-subscriptions).