
Tiny Agents in Python: a MCP-powered agent in ~70 lines of code — announced via Hugging Face on May 23, 2025. Inspired by Tiny Agents in JS , we ported the idea to Python 🐍 and extended the huggingface_hub client SDK to act as a MCP Client so it can pull tools from MCP servers and pass them to the LLM during inference. If you don't provide a path to a specific agent configuration, our Tiny Agent will connect by default to the following two MCP servers: When you run the agent, you'll see it load, listing the tools it has discovered from its connected MCP servers.
Inspired by Tiny Agents in JS , we ported the idea to Python 🐍 and extended the huggingface_hub client SDK to act as a MCP Client so it can pull tools from MCP servers and pass them to the LLM during inference.
MCP ( Model Context Protocol ) is an open protocol that standardizes how Large Language Models (LLMs) interact with external tools and APIs. Essentially, it removed the need to write custom integrations for each tool, making it simpler to plug new capabilities into your LLMs.
In this blog post, we'll show you how to get started with a tiny Agent in Python connected to MCP servers to unlock powerful tool capabilities. You'll see just how easy it is to spin up your own Agent and start building!
Modern LLMs are built for function calling (or tool use), which enables users to easily build applications tailored to specific use cases and real-world tasks.
Spoiler : An Agent is essentially a while loop built right on top of an MCP Client!
This section walks you through how to use existing Tiny Agents. We'll cover the setup and the commands to get an agent running.
First, you need to install the latest version of huggingface_hub with the mcp extra to get all the necessary components.
Tiny Agents in Python: a MCP-powered agent in ~70 lines of code — announced via Hugging Face on May 23, 2025 Reported by Hugging Face on May 23, 2025.