Chapter 17. Building Connectors: Tool Design and MCP Servers
In this section
- Chapter 17. Building Connectors: Tool Design and MCP ServersSpecify a connector with the person who owns the data, have coding agents write it twice, in TypeScript and Python, and check it by what it does.
- 17.1 MCP in one pictureOne question from Ana, in four steps: the app asks the connector what it can do, the model picks a tool, the app sends the call, and the model uses the reply.
- 17.2 A tool is its descriptionThe model chooses a tool from its name and description alone, so each tool gets one job and a description written for the model.
- 17.3 Errors that say what to do nextErrors written for the model: what failed, why, and what to try next. Never an empty answer.
- 17.4 Stateless serversAny copy of the server can answer any request, and a sealed handle carries what must cross calls.
- 17.5 When to write your own connectorWhen a connector is worth writing, and when a script or a skill is the cheaper piece.
- 17.6 Specify, generate, verifyThe expert writes the specification and the expected answers, coding agents write the servers, and checks prove they agree.
- 17.7 Untrusted output, and data that should not leaveEvery tool result is data, never an instruction. Three risks, and where the server and the AI app stop each one.
- 17.8 Putting a connector online safelyLocking the door with an access key and an Origin check, then putting the connector online and changing it safely through staging.
- 17.9 Charging for a connectorGoing further. Value on the server, a plan check on every call, and payment outside the AI.
- 17.10 Watching a connectorGoing further. Following one request through the AI app and the server, recording counts but never content.
- 17.11 How today's tools realize itHow Claude Code, Codex, OpenCode and the Messages and Responses APIs connect to an MCP server, measured against revision 2026-07-28, as of November 1, 2026.
- Field guide: connectors, product by productThe exact commands and settings for Claude Code, Codex, OpenCode, the MCP Inspector and Cloudflare Workers, checked November 1, 2026.
- Lab 17: the Brightline AP connectorSpecify the connector with the AP analyst, build it twice with coding agents, prove both agree, then ship, watch and deploy it.
- Check yourselfRecall and practice for the whole chapter: ten questions, the flashcards, and a final quiz round from all eleven concepts.