@ai-sdk/mcp 1.0.44 → 1.0.45

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/mcp",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -783,6 +783,15 @@ class DefaultMCPClient implements MCPClient {
783
783
 
784
784
  private async onRequestMessage(request: JSONRPCRequest): Promise<void> {
785
785
  try {
786
+ if (request.method === 'ping') {
787
+ await this.transport.send({
788
+ jsonrpc: '2.0',
789
+ id: request.id,
790
+ result: {},
791
+ });
792
+ return;
793
+ }
794
+
786
795
  if (request.method !== 'elicitation/create') {
787
796
  await this.transport.send({
788
797
  jsonrpc: '2.0',