Getting Started with Model Context Protocol

Lesson 2: MCP Architecture – Servers, Clients, Hosts, and Transports

Lesson Objectives

By the end of this lesson, students should be able to:

  • Describe the roles of host, client, and server in an MCP deployment
  • Explain the two primary transport mechanisms (stdio and HTTP/SSE)
  • Trace a tool call from user request to tool execution to Claude response
  • Map the MCP architecture to a concrete integration scenario

Lesson Content

The three roles.

Host: The application that contains or manages the Claude integration – Claude Code, Claude Desktop, or a custom application that embeds Claude. The host manages one or more MCP clients.

Client: Lives inside the host. Maintains a connection to one MCP server. Passes tool calls from Claude to the server and returns results. One client per server.

Server: A separate process that exposes capabilities (tools, resources, prompts) via the MCP protocol. The server has access to the real resources – the file system, database, API.

In Claude Code: Claude Code is the host; it manages clients for each connected MCP server. When Claude needs a file system tool, the client connected to the file system server handles the call.

Transport mechanisms.

MCP servers communicate with clients via two transports (verify current transport specification at modelcontextprotocol.io):

stdio (Standard I/O): The server runs as a child process of the host; communication happens via stdin/stdout. Simple, low-overhead, appropriate for local servers running on the same machine. The most common transport for development and personal tools.

HTTP with SSE (Server-Sent Events): The server runs as an independent HTTP service; clients connect via HTTP. Appropriate for servers running on remote infrastructure, shared servers accessed by multiple clients, and production deployments.

Tracing a tool call.

  1. User asks Claude a question that requires external data
  2. Claude generates a tool call (function name + parameters)
  3. Host receives the tool call from Claude
  4. Host passes it to the appropriate client (matched by tool name)
  5. Client sends the call to the server via the transport
  6. Server executes the tool and returns the result
  7. Client returns the result to the host
  8. Host adds the result to the conversation and sends back to Claude
  9. Claude generates the final response using the tool result

Configuration.

MCP servers are configured in the host's configuration file. In Claude Code: .claude/mcp_servers.json (verify current configuration path at docs.anthropic.com/en/docs/claude-code/mcp). Each entry specifies the server's launch command (for stdio) or URL (for HTTP).

Enroll to continue this lesson.

The preview above shows the lesson objectives and opening lesson content. Enroll to view the full lesson, complete the practice work, and take the lesson quiz.

Log In / Create Account
Back to Course