Every capability you give Claude has to be reached somehow, and the mechanism you choose fixes your coupling, your governance story and your latency. There are four you must be able to compare: direct API tool definitions, CLI or shell access, the Model Context Protocol (MCP), and agent-to-agent (A2A) protocols. They are not mutually exclusive, and a scenario question usually turns on one or two of the criteria below rather than on a slogan such as "standardise on MCP".
What each mechanism is
- Direct tool or API integration. You put a tool definition (
name,description,input_schema) in the request; Claude returns atool_useblock; your own code executes it and returns atool_result. Fewest moving parts and full control of validation and credentials, but every application that needs the capability re-implements it. - CLI or shell. Claude runs commands through a bash-style tool in an environment you control. It reuses mature command-line tools with almost no integration code, but output is unstructured text and the permission surface is broad. Claude Code's own docs describe Bash argument patterns as fragile and point to sandboxing or hooks when a restriction must hold.
- MCP. An open protocol in which a host (Claude Code, Claude Desktop, your app) creates one client per server, and servers expose tools, resources and prompts. Transports are stdio for local servers and Streamable HTTP for remote ones, where the docs recommend OAuth. Its value is reuse: write or install one server and any compliant host can use it.
- A2A. A protocol for autonomous agents to discover each other, manage tasks and hold multi-turn exchanges, typically across team or organisation boundaries. The A2A documentation frames it as complementary to MCP: MCP works "vertically" by giving one agent tools, A2A works "horizontally" by connecting agents. Tools are stateless primitives with structured inputs and outputs; agents reason, plan, keep state and converse.
Know the platform limits of MCP on the Messages API. The MCP connector (beta) reaches only remote servers exposed over HTTP, supports only the tool-call part of the specification, and is not covered by zero data retention arrangements. For local stdio servers, prompts or resources, run your own MCP client and use the SDK's conversion helpers. The MCP specification itself evolves; the current 2026-07-28 revision, for example, makes the protocol stateless and deprecates roots, sampling and logging, so check the current revision rather than assuming older behaviour.
A decision framework
| Criterion | Leans direct tool | Leans MCP | Leans CLI | Leans A2A |
|---|---|---|---|---|
| Consumers | One application | Several hosts or teams | Developer or CI environment | Another agent or organisation |
| Ownership and coupling | You own both sides and change them together | Separate owners need a stable contract | A tool already exists | The other side plans and decides for itself |
| Governance and audit | Enforced per app | Enforced once, centrally, at the server | Weakest; needs a sandbox | At the agent boundary |
| Latency | Lowest (in process) | Extra hop; small for stdio, network for remote | Process spawn per call | Highest; multi-turn |
| Interaction shape | Stateless call | Stateless call, plus read-only context | Stateless command | Long-running, negotiated, stateful |
| Context cost | Only tools you send | All of a server's tool definitions unless deferred | Few definitions | Agent description only |
Read the table as questions. How many consumers need this? Do the owners change together? Where should authentication, logging and allowlisting live so that they are enforced once? Is the other end a function or an agent that will reason about my request? A single-app, single-function need rarely justifies a server; a capability shared by several hosts with central auth usually does; a partner's autonomous planner is an A2A case.
Key concept: tools are called, agents are asked
If the other side will do a stateless lookup or action with a fixed contract, it is a tool (direct, CLI or MCP). If it will interpret an intent, plan, ask clarifying questions and take multiple turns, it is an agent, and that is where A2A fits. MCP and A2A layer rather than compete: an agent can serve other agents over A2A while using MCP servers for its own tools.
Build versus use, and the trust cost of MCP
For standard integrations (issue trackers, source control, chat, document stores) evaluate maintained servers before writing your own; build custom only for workflows those servers cannot handle, for business logic that must live in the tool layer, or for proprietary internal systems. That pragmatic default is common in exam scenarios, but it comes with a duty of care: a third-party server is code that holds credentials and returns content the model will read. Claude Code's docs warn to verify trust before connecting servers that fetch external content. In practice: review the tools it exposes and the credentials it needs, pin versions, scope it narrowly (local, project or user scope; .mcp.json for the project, with ${VAR} expansion so tokens stay out of the file), restrict it with organisation allowlists and toolset configuration (Lesson 1.1), and treat its tool results as untrusted input (Lesson 1.2).
Two more MCP design points. Resources can expose read-only context such as schemas or document indexes so the agent does not burn calls exploring, though the Messages API connector does not surface them. And tool descriptions matter as much as for direct tools (Lesson 1.1): write them to say what the tool does, when to use it and what it returns. Claude Code truncates MCP tool descriptions and server instructions at 2KB each, so put the critical details first. Large MCP catalogues carry token cost; Lesson 1.8 covers loading them on demand.
Common exam distractor
Beware slogans. "Use MCP for everything" adds a hop and definition overhead for a single in-process function. "A2A replaces MCP" misreads two complementary layers. "MCP is secure because it is a standard" ignores server trust and token handling. "A shell wrapper is simplest" hides an audit and permission gap. "Always build a custom server" ignores maintained ones. And "the connector reaches my local server" is false: it needs a remote HTTP endpoint.