Skip to main content
The AI SDK connects to the Nuntly MCP server through its MCP client and passes the tools to the model. Check the prerequisites first: an API key and Node.js 20 or later.

Install

Install ai, @ai-sdk/mcp and a provider such as @ai-sdk/anthropic.

Call the tools from a model

agent.ts
The stdio transport runs on Node.js only. The sample uses ai 7, where isStepCount limits the number of tool-calling steps. See the AI SDK MCP documentation for other transports. When a tool fails, see Troubleshooting.