Build an MCP Client in TypeScript: Discovery, Tool Calls, and Trust Boundaries

Connect to a local MCP server, verify capability discovery, call a typed tool, and handle remote transports without confusing discovery with authorization.