Skip to content

CCAR-P · Domain 3: Integration · 21% of the exam

Task 3.6: Connection Mechanism Selection

Weighing MCP, a direct API or CLI call and a handoff between agents against the latency, security and state needs of a scenario, and choosing the connection they favour.

Study it

  • MCP, direct API or CLI, or an agent handoff: choosing the connection

    Partly covered by: Agents and Tools

Sample questions

Try each one before opening the answer. Every option is explained, with the Anthropic documentation page that proves it.

Question 1 · choose 1

A team wants Claude Code to work with two outside systems during coding sessions: GitHub, whose gh CLI is installed and signed in on every developer machine, and an internal incident tracker that offers an HTTP API and an MCP server but no CLI. Sessions often touch neither system, and the team wants to keep each session's context lean. Which connection plan follows Claude Code's guidance?

  1. AAdd MCP servers for both systems and keep them connected in every session, so that Claude has typed tools for each
  2. BWrite Bash wrapper scripts for the tracker's HTTP API and ask Claude to read each script before calling it
  3. CReplace the gh CLI with a GitHub MCP server, since Claude can't use a CLI without a tool definition, and add the tracker's server
  4. DLet Claude use the signed-in gh CLI for GitHub, and connect an MCP server for the incident tracker only, which has no CLI
Show the answer and why
  • AAdd MCP servers for both systems and keep them connected in every session, so that Claude has typed tools for each

    Incorrect

    Connected servers add their tool names and instructions to the context even when they aren't used.

  • BWrite Bash wrapper scripts for the tracker's HTTP API and ask Claude to read each script before calling it

    Incorrect

    For a system without a CLI the guidance points to MCP; ad hoc scripts add work without a supported tool interface.

  • CReplace the gh CLI with a GitHub MCP server, since Claude can't use a CLI without a tool definition, and add the tracker's server

    Incorrect

    With gh signed in, Claude uses it without explanation; for an unfamiliar CLI, pointing Claude at --help is enough.

  • DLet Claude use the signed-in gh CLI for GitHub, and connect an MCP server for the incident tracker only, which has no CLI

    Correct

    A system's CLI is usually the easiest way in, and MCP is for systems without one.

Claude Code's best practices say that if a system has a CLI, that's usually the easiest way in: with gh installed and signed in, Claude opens pull requests and reads review comments without extra setup. For systems without a CLI, connect an MCP server. Connected servers add their tool names and instructions to the context even when unused, so turn off the ones you don't need.

Question 2 · choose 1

Developers call a remote MCP server's export_report tool from Claude Code. An export takes 15 to 25 minutes, and the server sends a progress notification every 30 seconds while it works. The project's .mcp.json entry is:{ "mcpServers": { "reports": { "type": "http", "url": "https://reports.internal.example.com/mcp", "timeout": 600000 } } }Every export fails with an error after 10 minutes. Which change lets the exports finish?

  1. AHave the server send progress notifications every few seconds, so that Claude Code keeps extending the call
  2. BSet CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT to 0, so that Claude Code stops aborting calls that run for a long time
  3. CRaise the timeout in the server's .mcp.json entry above the longest export, for example to 1800000 milliseconds
  4. DSet CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS to 0, so that the call stays in the foreground until the export completes
Show the answer and why
  • AHave the server send progress notifications every few seconds, so that Claude Code keeps extending the call

    Incorrect

    Progress notifications don't extend the per-server timeout, which is a hard wall-clock limit per call.

  • BSet CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT to 0, so that Claude Code stops aborting calls that run for a long time

    Incorrect

    The idle check fires only when no response or progress arrives; this server reports progress, and the wall-clock limit still applies.

  • CRaise the timeout in the server's .mcp.json entry above the longest export, for example to 1800000 milliseconds

    Correct

    The per-server timeout bounds each tool call's wall-clock time, so it must cover the whole export.

  • DSet CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS to 0, so that the call stays in the foreground until the export completes

    Incorrect

    Backgrounding changes whether the call blocks the session; the per-call limits apply either way.

A timeout field on an MCP server's entry is a hard wall-clock limit per tool call, and progress notifications from the server don't extend it. The idle timeout aborts only calls that send no response and no progress for the idle window. A main-conversation call that runs past two minutes moves to a background task, but the wall-clock and idle limits still apply while it runs there.

Question 3 · choose 1

A client team integrates an MCP server that speaks protocol revision 2026-07-28 and wants to learn the server's supported versions and capabilities before it sends any tool calls. Which mechanism does the protocol provide for this?

  1. AA server/discover request, which every server must implement and whose response clients can cache
  2. BAn initialize handshake that opens a protocol-level session the client then reuses for the rest of the connection
  3. CA session ID header that the server mints on the first request and the client echoes afterward
  4. DNothing; the client must try each tool and read the errors to learn what the server supports
Show the answer and why
  • AA server/discover request, which every server must implement and whose response clients can cache

    Correct

    Servers advertise versions and capabilities through the mandatory server/discover request.

  • BAn initialize handshake that opens a protocol-level session the client then reuses for the rest of the connection

    Incorrect

    The 2026-07-28 revision is stateless and removed protocol-level sessions.

  • CA session ID header that the server mints on the first request and the client echoes afterward

    Incorrect

    This revision has no protocol-level sessions; servers don't mint session IDs.

  • DNothing; the client must try each tool and read the errors to learn what the server supports

    Incorrect

    The protocol provides discovery so that clients don't have to guess.

MCP is a stateless protocol: every request carries the protocol version and the relevant capabilities in its _meta field. Servers advertise their supported versions and capabilities through the mandatory server/discover request, which clients may send before any other request, and its response is typically cacheable.

Practice domain 3 →Practice all domains →