@ai-sdk/mcp package, enabling your AI applications to use MCP tools.
Installation
HTTP Transport (Production)
Use HTTP transport for production deployments with remote MCP servers:Stdio Transport (Local Development)
For local Runlayer MCP servers:Streaming Responses
UsestreamText for streaming responses with proper cleanup: