Skip to main content
The AIAdapter converts MCP tools into the format expected by the Vercel AI SDK. This allows you to use MCP tools with functions like streamText, generateText, and useChat.

Installation

Usage

API Reference

The AIAdapter constructor accepts the following options:
  • prefix: (Optional) String prefix for all tool names.
  • toolRouter: (Optional) A ToolRouter instance for dynamic tool discovery.
See the AIAdapter API Reference for more details.