Your first client

Attach, ask what the server can do, call a tool, receive a screen, subscribe.

Foundations5 lessons25 min
  1. 1It Connects — the Transport Is a Command to Run, Not a SettingFirst in the mcp_client course. The client attaches to the server. What to notice is not the connection code but what the transport turns out to be — not a socket to open but a command to launch, which is why changing transports later becomes changing one line.5 min
  2. 2What Can It Do — Write the List Down and the Client Belongs to One ServerSecond in the mcp_client course. Ask for the tool and resource lists. Two lines, and whether they exist decides between "a client for that server" and "a client that stands in front of any server."5 min
  3. 3Call and Read — a Refusal Is Not an ExceptionThird in the mcp_client course. Call a tool and read the answer. The result is a content list rather than a value, and a server's refusal does not arrive as a throw — so it has to be read, not caught.5 min
  4. 4It Receives the Screen — With None of It in the ClientFourth in the mcp_client course. Read the screen definition from the server and hand it to a runtime. This file holds not one line about what the desk looks like — and that is checked.5 min
  5. 5It Does Not Ask — Why Polling Is Worse Than WastefulLast in the mcp_client course. Subscribe, get told, then read. That polling costs resources is secondary — the real problem is that when a value changes twice between two polls, the middle is never seen.5 min