Loading lesson…
Courses›A tool client from scratch

A tool client from scratch

DetailedOverviewQuizFlashcard

A tool client from scratch

Build lab: the Model Context Protocol (MCP) is one published way for a harness to talk to every tool server, one JSON-RPC message per line. Build the reading side of a client: match each reply to its request by id, carry on only in a version you speak, hand tool errors to the model marked as errors, give up on silence, and record junk on the line. Then run it against 8 servers, the first replaying replies captured from the official SDK, and read what the specification does and does not say.

This Harness Engineering lesson is part of a paid plan. Sign in with a plan that includes this course to read it.