How LLMs Discover and Call MCP Tools: The Host-Mediated Lifecycle
A common misconception is that large language models connect to sockets, run shell commands, or query databases directly, but they are stateless token predictors that cannot make network calls. Instead, tool use via the Model Context Protocol involves four cooperating parts: the host application, the MCP client, the MCP server, and the LLM engine. On startup, the host asks each configured server for its available tools and their JSON schemas over stdio or SSE, and it namespaces tool names when servers overlap. The host then converts those schemas into the vendor-specific tool format the model expects, so the model can match a user's request to a tool description and emit a structured tool-call request. The host intercepts that request, forwards it to the appropriate MCP server, and receives the raw result, which it sanitizes before returning it to the model to compose the final answer.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in