Study FAQ
What roles do the Claude API, Agent SDK, Claude Code, and MCP play in an application?
Also asked as 2
- How do Claude API, Agent SDK, Claude Code, and MCP fit together?
- Which Claude integration owns the agent loop, and where does MCP fit?
Answer
Use the Claude Messages API when your application needs direct model calls and owns the surrounding control flow. Use the Python or TypeScript Claude Agent SDK when your application needs the Claude Code agent loop, its tool execution, and session support embedded in a program. Claude Code is the coding environment your developers can use while building the application. Model Context Protocol (MCP) is a protocol for connecting a host to external capabilities and context through clients and servers.
For an application-owned workflow, your service can fetch approved evidence, make a Messages request and validate the response before advancing. If the application offers client tools and lets Claude choose among them, the application handles their execution and feeds results back, or uses a supported tool runner. Some Claude API tools are executed by Anthropic. With the Agent SDK, the harness runs the iteration and returns session and result events. Your application still owns which capabilities are available and which external changes are authorized.
MCP can supply a retrieval capability to a compatible host in either design. Whether the host uses MCP has a separate answer from who controls the task sequence.
Agent SDK overview · Claude tool execution model · MCP architecture, 2026-07-28
Full explanation
CCAR-F Scope and the Claude Architecture Decision Map
Study guide · CCAR-F
Read the full explanation