UNPKG

@ai-sdk/mcp

Version:

The **Model Context Protocol (MCP) client** for the [AI SDK](https://ai-sdk.dev/docs) lets you connect to MCP servers and use their tools with AI SDK functions like `generateText` and `streamText`.

54 lines (48 loc) 1.53 kB
export type { JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, } from './tool/json-rpc-message'; // Stable exports export { createMCPClient, type MCPClientConfig, type MCPClient, } from './tool/mcp-client'; export { ElicitationRequestSchema, ElicitResultSchema } from './tool/types'; export type { Configuration, ElicitationRequest, ElicitResult, ListToolsResult, ClientCapabilities as MCPClientCapabilities, } from './tool/types'; export { auth, UnauthorizedError } from './tool/oauth'; export type { OAuthAuthorizationServerInformation, OAuthClientProvider, } from './tool/oauth'; export type { OAuthClientInformation, OAuthClientMetadata, OAuthTokens, } from './tool/oauth-types'; export type { MCPTransport } from './tool/mcp-transport'; /** * @deprecated Use `createMCPClient` instead. Will be removed in a future version. */ export { createMCPClient as experimental_createMCPClient } from './tool/mcp-client'; /** * @deprecated Use `MCPClientConfig` instead. Will be removed in a future version. */ export type { MCPClientConfig as experimental_MCPClientConfig } from './tool/mcp-client'; /** * @deprecated Use `MCPClient` instead. Will be removed in a future version. */ export type { MCPClient as experimental_MCPClient } from './tool/mcp-client'; /** * @deprecated Use `MCPClientCapabilities` instead. Will be removed in a future version. */ export type { ClientCapabilities as experimental_MCPClientCapabilities } from './tool/types';