UNPKG

@tanstack/ai-mcp

Version:

Host-side Model Context Protocol client for TanStack AI: discover and run MCP server tools, resources, and prompts in any adapter's chat() loop, with generated end-to-end types.

10 lines (9 loc) • 1.15 kB
import { DuplicateToolNameError, MCPConnectionError, MCPEventConfigError, MCPEventRequestError, MCPEventSubscriptionNotFoundError, MCPEventsUnsupportedError, MCPTaskRequiredToolError, MCPToolFilterError, MCPToolNotFoundError, MCPUnknownEventError } from "./errors.js"; import { MCPInputRequiredError, isMCPInputRequiredError } from "./input-required.js"; import { createMCPClient, createMCPClientFromTransport } from "./client.js"; import { mcpResourceToContentPart } from "./resources.js"; import { mcpPromptToMessages } from "./prompts.js"; import { createMCPClients } from "./pool.js"; import { defineConfig } from "./cli/define-config.js"; import { InMemoryTransport } from "@modelcontextprotocol/client"; export { DuplicateToolNameError, InMemoryTransport, MCPConnectionError, MCPEventConfigError, MCPEventRequestError, MCPEventSubscriptionNotFoundError, MCPEventsUnsupportedError, MCPInputRequiredError, MCPTaskRequiredToolError, MCPToolFilterError, MCPToolNotFoundError, MCPUnknownEventError, createMCPClient, createMCPClientFromTransport, createMCPClients, defineConfig, isMCPInputRequiredError, mcpPromptToMessages, mcpResourceToContentPart };