CertSafari
    CCAR-P · Lessons

    Domain 3 · Lesson 18/38

    MCP Transports, Connection Auth and Agent-to-Agent Delegation

    Evaluate connection protocols and select the appropriate integration mechanism

    8 min read
    2.38% of exam
    6 sources
    Published 27 Sep 2026
    Docs as of 26 Sep 2026

    What you will be able to do

    • Pick a transport for an MCP server (HTTP, SSE or stdio) based on whether it is remote or runs on your machine
    • Set up authentication for an MCP connection with a Bearer token, an API-key header or an authorization_token, and read the status Claude Code reports
    • Know when to delegate to other agents instead of adding more tools, and the limits of a multiagent roster

    1.Remote or local: choosing the transport

    After deciding to use MCP, the next choice is how to reach the server. Claude Code shows the options clearly. A server given as a URL is remote, and you add it with --transport http or --transport sse. A server given as a launch command runs on your machine as a stdio process. Claude Code starts that process and passes any --env values into its environment.

    Adding a local stdio server: everything after -- is the command Claude Code runsbash
    # Basic syntax
    claude mcp add [options] <name> -- <command> [args...]
    
    # Real example: Add Airtable server
    claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \
      -- npx -y airtable-mcp-server

    This affects your choice of mechanism. A stdio server works with a client that can launch local processes, such as Claude Code. It does not work with the Messages API connector, which needs a public HTTPS endpoint. If a scenario puts the server behind a local command and asks you to call it from a backend service over the API, the transport is the real obstacle.

    One configuration mistake appears in both documentation and exam questions. In a JSON entry, Claude Code treats an entry with no type as a stdio server. So if you paste a url without a type, the entry fails. Add "type": "http", "sse" or "ws" to match the endpoint.

    Sources12

    2.Authenticating the connection

    The MCP specification defines an authorization framework for its HTTP-based transports. In practice, the documentation shows three ways to supply credentials, depending on where the client runs.

    With the Messages API connector, you put an OAuth Bearer token in the authorization_token field of the server definition. The connector does not fetch the token for you. It sends the token you obtained. With Claude Code and a remote server, you pass a header on claude mcp add, either an Authorization: Bearer header or a custom header such as X-API-Key. Some servers use a browser sign-in instead. With a local stdio server, the credential usually goes into the process environment through --env, as in the Airtable example above.

    Header-based auth for a remote HTTP server in Claude Codebash
    # Example with Bearer token
    claude mcp add --transport http secure-api https://api.example.com/mcp \
      --header "Authorization: Bearer your-token"

    When authentication fails, Claude Code reports it in claude mcp list as Needs authentication. That means the server is reachable but needs a browser sign-in or a token passed with --header. Probing the endpoint with curl -I separates the cases. A 401 or 403 means the server is up and you need to authenticate. A 404 or 405 still means the URL is reachable, because many MCP endpoints answer only POST requests.

    Sources324

    3.Agent-to-agent: when the capability is another agent

    The third mechanism does not connect Claude to a system. It connects one agent to another. With multiagent orchestration, a coordinator delegates to agents that each run in their own session thread, with their own conversation history. Each agent has its own model, system prompt, tools, MCP servers and skills. They share the sandbox, filesystem and vault credentials, but they do not share tools, MCP servers or context.

    That is why you would choose it. The documentation lists three patterns that work well: parallelization (fanning out independent subtasks), specialization (sending work to an agent with domain-focused prompts and tools instead of giving one agent every capability) and escalation (consulting a more capable model for the hard subtasks). It fits best when the work spans many surfaces, or when several well-scoped tasks feed one goal.

    A coordinator declares its roster of agentsyaml
    ---
    name: Engineering Lead
    model: claude-opus-5-5
    tools:
      - type: agent_toolset_20260401
    multiagent:
      type: coordinator
      agents: # paths: ant apply substitutes {type: agent, id, version}
        - ./reviewer.md
        - ./test-writer.md
    ---

    The roster has hard limits. The coordinator can delegate to only one level of agents, so listing an agent that has its own roster fails validation. At most 20 unique agents can be listed, although the coordinator can call several copies of each. Roster references are pinned to the versions that existed when the coordinator was created or updated. Threads persist, so a follow-up to an agent reaches it with all of its earlier turns intact.

    An engineer wants to interactively debug a failing build by chatting with Claude in a terminal, watching each file it opens and approving risky commands ad hoc, without writing any integration code. Which option best matches this workflow?

    Sources5

    4.Putting the choice together

    Each constraint in a scenario rules some mechanisms out. The table below matches the constraints covered in this lesson to the mechanism they point to. The sources describe each mechanism's properties but give no general ranking between them. The table therefore applies those documented properties, and it is not a vendor decision tree.

    Scenario constraint → integration mechanism
    Constraint in the scenarioMechanism it points toDocumented reason
    Your own function or internal API; you control executionDirect tool use (client tool)Client tools run in your application, which returns a tool_result
    Remote HTTPS MCP server, called from the Messages API, no client codeMCP connector (mcp_servers + mcp_toolset)Connects without implementing an MCP client
    MCP server started as a local commandstdio via a client such as Claude CodeThe connector cannot connect local STDIO servers directly
    Need MCP resources or prompts, not just toolsYour own MCP clientThe connector supports only tool calls
    Separate specialisms, parallel subtasks, isolated contextAgent-to-agent (multiagent coordinator)Each agent has its own tools, MCP servers and context

    Sources56

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.A server entry with only a url field is enough for Claude Code to connect to a remote MCP server.Why is that wrong?

      Claude Code reads an entry with no type as stdio, so a url entry needs an explicit http, sse or ws type.

      Covered in Remote or local: choosing the transport

    2. 2.Subagents in a multiagent setup inherit the coordinator's tools and MCP servers, so you only configure them once.Why is that wrong?

      Each agent uses its own configuration. Tools, MCP servers and context are not shared, although the sandbox and vault credentials are.

      Covered in Agent-to-agent: when the capability is another agent

    3. 3.A coordinator can delegate to a sub-coordinator that has its own roster, giving a deep hierarchy of agents.Why is that wrong?

      Delegation is limited to one level. Referencing an agent that has its own multiagent roster fails with a validation error.

      Covered in Agent-to-agent: when the capability is another agent

    Practise it for real

    Connect Claude Code to a remote MCP server over HTTP, check its status, use it and remove it.

    1. 1.Run: claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp

      Why: --transport http tells Claude Code the server is hosted at a URL, not run as a local process.

      You should see: The server is registered under the name you chose, claude-code-docs.

    2. 2.Run: claude mcp list

      Why: This shows whether the connection works before you rely on it.

      You should see: ✔ Connected next to claude-code-docs. If you see ! Needs authentication, the server wants a sign-in or a --header token.

    3. 3.Start claude and ask: Use the claude-code-docs server to look up what MCP_TIMEOUT does

      Why: Confirms Claude actually calls the server's tools when the request matches what they do.

      You should see: An answer drawn from the docs server, with its tools labelled by the name you chose.

    4. 4.Run: claude mcp remove claude-code-docs

      Why: Cleans up. The name you gave is how commands refer to the server.

      You should see: The server no longer appears in claude mcp list.

    Stuck? Get a nudge

    If /mcp later shows no servers, check whether you are in a different project: local-scoped servers are tied to the project where you added them.

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “A URL such as https://mcp.example.com/mcp: the server is remote.”
      ↩︎ Remote or local: choosing the transport
      “A launch command such as npx -y @example/mcp-server: the server runs on your machine.”
      ↩︎ Remote or local: choosing the transport
      “Claude Code reads an entry with no type as a stdio server, so a url entry without a type fails.”
      ↩︎ Exam trap 1
    2. 2.
      “The server must be publicly exposed through HTTP (supports both Streamable HTTP and SSE transports).”
      ↩︎ Remote or local: choosing the transport
      “OAuth authentication: Support for OAuth Bearer tokens for authenticated servers”
      ↩︎ Authenticating the connection
    3. 3.
      “Authorization: Authentication and authorization framework for HTTP-based transports”
      ↩︎ Authenticating the connection
    4. 4.
      “The server is reachable but needs a browser sign-in, or a token passed with --header.”
      ↩︎ Authenticating the connection
      “A 401 or 403: the server is up and you need to authenticate.”
      ↩︎ Authenticating the connection
    5. 5.
      “Agents can act in parallel with their own isolated context, which helps improve output quality and can also improve time to completion.”
      ↩︎ Agent-to-agent: when the capability is another agent
      “rather than loading a single agent with every capability”
      ↩︎ Agent-to-agent: when the capability is another agent
      “A maximum of 20 unique agents can be listed in multiagent.agents, but the coordinator can call multiple copies of each agent.”
      ↩︎ Agent-to-agent: when the capability is another agent
      “best suited for complex tasks that either require work across a variety of surfaces”
      ↩︎ Putting the choice together
      “Tools, MCP servers, and context are not shared.”
      ↩︎ Exam trap 2
      “The coordinator can only delegate to one level of agents”
      ↩︎ Exam trap 3
    6. 6.
      “To connect to Model Context Protocol (MCP) servers, see the MCP connector.”
      ↩︎ Putting the choice together