MCPcopy Create free account
hub / github.com/TanStack/ai / connect

Method connect

packages/ai-mcp/src/client.ts:113–120  ·  view source on GitHub ↗
(transport: Transport)

Source from the content-addressed store, hash-verified

111 }
112
113 async connect(transport: Transport): Promise<void> {
114 try {
115 await this.#client.connect(transport)
116 this.capabilities = this.#client.getServerCapabilities() ?? {}
117 } catch (err) {
118 throw new MCPConnectionError('Failed to connect to MCP server', err)
119 }
120 }
121
122 async tools(
123 defsOrOptions?: ReadonlyArray<AnyToolDefinition> | ToolsOptions,

Callers 2

createMCPClientFunction · 0.95

Calls 1

connectMethod · 0.65

Tested by

no test coverage detected