Docs
Cloudflare
Railway
CodeRabbit
Clerk
OpenRouter
Netlify
AG Grid
SerpAPI
WorkOS
Prisma
Unkey
Sentry
Electric
Cloudflare
Railway
CodeRabbit
Clerk
OpenRouter
Netlify
AG Grid
SerpAPI
WorkOS
Prisma
Unkey
Sentry
Electric
Class References
Function References
Interface References
Type Alias References
Variable References

MCPToolSource

Interface: MCPToolSource

Defined in: packages/ai/src/activities/chat/mcp/types.ts:10

Minimal structural shape that chat({ mcp }) needs from an MCP client.

@tanstack/ai-mcp's MCPClient and MCPClients satisfy this interface by shape — the core @tanstack/ai package does NOT import @tanstack/ai-mcp (ai-mcp depends on ai, not the reverse).

Properties

close()

ts
close: () => Promise<void>;
close: () => Promise<void>;

Defined in: packages/ai/src/activities/chat/mcp/types.ts:15

Returns

Promise<void>


tools()

ts
tools: (options?) => Promise<ServerTool<SchemaInput, SchemaInput, string, unknown>[]>;
tools: (options?) => Promise<ServerTool<SchemaInput, SchemaInput, string, unknown>[]>;

Defined in: packages/ai/src/activities/chat/mcp/types.ts:14

Parameters

options?
lazy?

boolean

Returns

Promise<ServerTool<SchemaInput, SchemaInput, string, unknown>[]>