End-to-End Request Flow and Trust Boundaries
Learning objectives
- Trace the exact flow from the user's prompt to the final answer.
- Understand the difference between a model request and actual tool execution.
- Identify validation requirements at every boundary.
Preparing the architecture diagram…
Read the full diagram flow
sequenceDiagram
actor User
participant Host
participant Model
participant Client as MCP Client
participant Server as MCP Server
participant Service as Order Service
User->>Host: Where is ORD-101?
Host->>Model: Prompt + available tool schemas
Model-->>Host: Request lookup_order
Host->>Host: Consent and policy check
Host->>Client: Call tool with arguments
Client->>Server: tools/call
Server->>Server: Validate identity and input
Server->>Service: getOrder(userId, orderId)
Service-->>Server: Authorized result
Server-->>Client: Structured tool result
Client-->>Host: Result
Host->>Model: Tool result as untrusted context
Model-->>Host: User-facing explanation
Host-->>User: Order is shippedImportant boundaries
- The model suggests a tool call; the host decides whether to execute it.
- The host handles consent, policy, and connection orchestration.
- The server validates the schema, identity, authorization, and business rules.
- Tool output is untrusted data. The host must prevent output text from silently changing policy.
Common mistake
“The model supplied the correct user ID” is not proof of authorization. Identity must come from a trusted session or token, not from a model-generated argument.
Interview answer
“I keep the model outside the trust boundary. The host approves execution, the MCP server validates input and identity, and the domain service enforces record-level authorization.”
Can you explain it without the notes?
End-to-End Request Flow and Trust Boundaries
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
Learning objectives
Turn this concept into a clear answer.
Practice this conceptYOUR NEXT STEP
Keep connecting the ideas.
Next lesson: JSON-RPC 2.0: Requests, Responses, Errors, and NotificationsAdapted from 20_MCP_SERVER.md · “2. End-to-End Request Flow and Trust Boundaries”. Examples are study fragments; framework behavior can depend on your version.