Issue with experimental_createMCPClient
hanging when connecting to remote MCP server deployed as Azure Function
#6228
Replies: 2 comments
-
It might be the parser issue I have patched at #6197. Please upgrade your ai package. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@twxia I have updated to the latest version of ai sdk i.e But if I do this way, it is working this way with the import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
const azureFunctionsTransport = new SSEClientTransport(
new URL('http://localhost:7071/runtime/webhooks/mcp/sse'),
);
const customAzureFunctionClient = await experimental_createMCPClient({
transport: azureFunctionsTransport,
}); Here I have to use the official model context protocol sdk for the SSE transport. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi team,
I'm currently working on integrating a remote MCP server (deployed as an Azure Function) with the @ai-sdk/experimental_createMCPClient method. I'm using the vercel ai SDK with Remix framework and have followed the official Azure Functions MCP example here:
https://github.com/Azure-Samples/remote-mcp-functions-typescript/tree/main
However, when I try to connect to the locally hosted Azure Functions MCP server via SSE using the following config:
The code hangs indefinitely at the experimental_createMCPClient call and doesn’t proceed or throw any error. Other transports (like Experimental_StdioMCPTransport and local SSE endpoints) are working fine in the same setup.
I've confirmed that the Azure Functions MCP server is running and reachable at the specified URL (I can hit it via the browser and get an SSE response). Still, the SDK doesn't seem to progress past the experimental_createMCPClient instantiation.
Here are a few things I’ve tried:
Would really appreciate any guidance on:
Thanks in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions