createVercelAiMcpClient to connect Corsair to the Vercel AI SDK via HTTP transport.
Unlike the direct SDK adapters, Vercel AI connects over HTTP — you expose Corsair as an MCP server endpoint and the client connects to it.
Install
Server
Expose Corsair as an MCP HTTP endpoint usingcreateBaseMcpServer and createMcpRouter.
server.ts
Client
Connect from your Vercel AI application usingcreateVercelAiMcpClient.
agent.ts
createVercelAiMcpClient returns a client that speaks the MCP protocol over HTTP. Call client.tools() to retrieve the tool definitions, then pass them to any Vercel AI generateText or streamText call.