CourseModel Context Protocol · Module 10: Design Patterns and Agents · part 69 of 83
Part 69 · Module 10: Design Patterns and Agents

Topic 2: Server patterns

26 min read·22 Sept 2026

Thin API wrappers, and why one tool per endpoint underperforms

A thin API wrapper is an MCP server that exposes an existing API one-to-one: one tool per REST endpoint or per method of a client library, returning whatever the endpoint returns. It is the fastest server to write (some generators produce one automatically from an OpenAPI file), so it is the most common first attempt.

A task-shaped server is designed around what the model is trying to do. The canonical notes server is one: search_notes returns titles, snippets, scores, and a notes:// URI in a single call, because "find the notes about X" is the task.

Opinions about which is better are cheap. Let us build the thin wrapper for real, over the same NoteStore, and measure both.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.