The hype around the Model Context Protocol (MCP) has been deafening, but after weeks of digging into it, the reality is refreshingly simple. Hugging Face engineer Julien Chaumond strips away the mystique in a new walkthrough, showing that an MCP-powered agent is essentially just a while loop bolted onto an inference client.
Chaumond’s demo, which you can run right now with a single npx @huggingface/mcp-client command, connects a local agent to two MCP servers: one for your filesystem and one that controls a sandboxed Chromium browser via Playwright. When prompted to “write a haiku about the Hugging Face community and write it to a file named hf.txt on my Desktop,” the agent dutifully executes both steps. A second prompt asking it to search for HF inference providers and open the first three results shows the browser automation in action.
The secret sauce isn’t MCP itself—which Chaumond describes as merely “a standard API to expose sets of Tools”—but the fact that modern LLMs like Qwen2.5-72B-Instruct have native function-calling capabilities baked in. Tools are defined by a name, description, and a JSONSchema, a format largely dictated by OpenAI’s function-calling documentation. The inference engine passes these tool definitions to the model, which can choose to call zero, one, or several of them during generation.
This architecture means the heavy lifting happens entirely on the model side. The MCP client implementation, which lives in the huggingface.js monorepo, uses modern JavaScript async generators to handle streaming LLM responses elegantly. Chaumond points out that you can replace the Anthropic SDK in any MCP tutorial with any OpenAI-compatible client and get the same result. The default setup runs Qwen2.5-72B-Instruct on Nebius, but everything is configurable via environment variables. It’s a stark reminder that the infrastructure around agents is maturing faster than many realize—what looked like complex orchestration a year ago is now a fifty-line script.