Repository navigation
@ai-sdk/mcp@2.0.73
Patch Changes
-
b5b0416: Give experimental managed event adapters a synchronous
createAdapter({ transport })method that receives the configured MCP transport type and URL and returns bound subscription operations. Applications no longer need to configure the endpoint twice.Breaking change to the experimental API: the configured integration is now
Experimental_MCPEventAdapterand must implementcreateAdapter. The formerExperimental_MCPEventsAdaptersubscription operations interface is renamed toExperimental_MCPEventOperations. Update imports and operation type annotations, and wrap existing operations with{ createAdapter: () => operations }instead of passing them directly toexperimental_events.adapter.createAdaptermust synchronously return an object implementingsubscribe,getSubscription,listSubscriptions, andunsubscribe. Missing or non-callable operations, nullish results, and Promise/thenable results now rejectcreateMCPClientwithMCPClientErrorbefore the transport starts.The adapter receives a fresh
transport: { type: 'http' | 'sse', url: string }description for built-in transport configurations ortransport: { type: 'custom' }for custom instances. Credentials, callbacks, and live transport methods are not forwarded.