Prev Next

AI / Agentic AI Interview Questions II

Explain the internal working of MCP's client-server orchestration model?

sequenceDiagram participant C as Agent Client participant S as MCP Server C->>S: tools/list request S-->>C: available tool schemas C->>S: tool call (JSON-RPC) S-->>C: streamed result
  1. The MCP client, which hosts the LLM runtime and agent reasoning logic, connects to one or more MCP servers
  2. It requests the list of available tools, and each server responds with its tool schemas, names, descriptions, and expected parameters
  3. The agent's planner selects a tool based purely on that returned name and description, without inspecting how the tool is actually implemented on the server side
  4. The client sends a tool call to the server using JSON-RPC, and because MCP supports long-lived, stateful sessions, results can stream back progressively rather than arriving only once at the very end
  5. The server itself typically remains stateless and reusable, with the actual decision-making and session logic living in the client

This design keeps servers simple, swappable providers of capability, while concentrating orchestration intelligence in the client, which is also why production deployments increasingly route multiple MCP servers through a centralized gateway to manage authentication, rate limiting, and tool exposure consistently.

What does the agent client request from an MCP server first?
Why do production deployments often route multiple MCP servers through a centralized gateway?

More Related questions...

Show more question and Answers...


Comments & Discussions