Inject tools from external MCP server #5257
Replies: 3 comments 4 replies
-
| same question. | 
Beta Was this translation helpful? Give feedback.
-
| For those who want to do something similar I managed to do it with the following approach. In this example I'm using the GitHub management tool from Smithery (https://smithery.ai/server/@smithery-ai/github). Since I'm connecting directly through the  Of course it can be improved, we could read the tools from a JSON file for example and create each one dynamically...  | 
Beta Was this translation helpful? Give feedback.
-
| Recently implemented a very similar usecase of creating mcp client and connecting using vercel ai sdk to llm. 
 
  | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey!!
First of all, congrats and thanks for this amazing SDK, I'm really enjoying building AI powered apps with it!
Now with MCP I was wondering if there's a way to connect to MCP providers (such as https://smithery.ai/ for example) and "inject" the tools from it into the SDK
toolsconfig. By what I've seen in the docs there's theexperimental_createMCPClientbut I couldn't understand How to integrate with external services, like Smithery (https://smithery.ai/).Thought about this idea reading the docs for Spin.ai. They allow to map actions and tools from an external MCP and load them into the AI agent (check "Using your MCP with a SpinAI Agent" on this page). Check the
createActionsFromMcpConfigmethod.Any insights on this? If this is something already possible to be accomplished and I didn't notice I apologize. And please let me know How to do it 😂
Thanks!!
Beta Was this translation helpful? Give feedback.
All reactions