MCP Resources integration with AI SDK #5701
Unanswered
EnzoGehlen
asked this question in
Help
Replies: 3 comments 2 replies
-
+1 Unsure if missing something but not clear how we can register resources |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
-
With the current evolution of https://mcpui.dev/ which leans on the MCP resources spec pretty heavily it seems like it would be valuable to include resources support in the AI SDK. I know this doesn't make a lot of sense for NextJS apps using the AI SDK but there are a lot of teams still using the AI SDK that are not using NextJS |
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.
-
Question about MCP Resources integration with AI SDK
Context
I'm implementing a system with the AI SDK and have set up an MCP server with both tools and resources. I've successfully integrated the MCP tools with the AI SDK using
experimental_createMCPClient()
andpassing the tools to
streamText()
:Question
How can I enable the AI model to discover and use MCP resources from my server? I've implemented several resources like:
Based on the MCP specification, resources should be automatically discoverable by the AI, but I can't find a way to connect the MCP resources to the AI SDK's generation functions like streamText() or generateText().
Is there a parameter similar to the tools parameter that enables resource discovery? Or is there a different approach I should be taking to expose MCP resources to the AI?
What I've tried
None of these approaches seems to enable the automatic resource discovery that the MCP specification describes. Any guidance would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions