Chapter 7. MCP and External Integrations
Chapter 6 turned repeated instructions into skills and hooks. The natural next question is why you would need anything beyond them. If a skill can teach Claude Code how to use a command-line tool, why expose a separate service at all? The answer is client portability through the Model Context Protocol (MCP).
This chapter shows how to configure and authenticate MCP servers, then uses Claude Code as a client of MockHub, this book’s enterprise-scale application. You will also connect Claude Code to SonarCloud for code quality and Context7 for current documentation, decide when a skill plus a CLI is cleaner than an MCP server, and compare two ways to communicate with another coding agent.
Why MCP Exists
A large language model on its own can only answer from training data and whatever you pasted into the prompt. Tool use, also called function calling, changed that. The pattern is straightforward: you describe a function to the model, the model emits a structured request, and the host program ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access