MCP is all you need — Samuel Colvin, Pydantic

AI Engineer July 18, 2025
Video Thumbnail
AI Engineer Logo

AI Engineer

@aidotengineer

About

Talks, workshops, events, and training for AI Engineers.

Video Description

Everyone is talking about agents, and right after that, they’re talking about agent-to-agent communications. Not surprisingly, various nascent, competing protocols are popping up to handle it. But maybe all we need is MCP — the OG of GenAI communication protocols (it's from way back in 2024!). Last year, Jason Liu gave the second most watched AIE talk — “Pydantic is all you need”. This year, I (the creator of Pydantic) am continuing the tradition by arguing that MCP might be all we need for agent-to-agent communications. What I’ll cover: - Misusing Common Patterns: MCP was designed for desktop/IDE applications like Claude Code and Cursor. How can we adapt MCP for autonomous agents? - Many Common Problems: MCP is great, but what can go wrong? How can you work around it? Can the protocol be extended to solve these issues? - Monitoring Complex Phenomena: How does observability work (and not work) with MCP? - Multiple Competing Protocols: A quick run-through of other agent communication protocols like A2A and AGNTCY, and probably a few more by June 😴 - Massive Crustaceans Party: What might success look like if everything goes to plan? ---related links--- https://x.com/samuel_colvin https://www.linkedin.com/in/samuel-colvin/ https://github.com/samuelcolvin https://pydantic.dev/ Timestamps 00:00:00 - Introduction: Speaker Samuel Colvin introduces himself as the creator of Pydantic. 00:00:42 - Pydantic Ecosystem: Introduction to Pydantic the company, the Pydantic AI agent framework, and the Logfire observability platform. 00:01:18 - Talk Thesis: Explaining the title "MCP is all you need" and the main argument that MCP simplifies agent communication. 00:02:05 - MCP's Focus: Clarifying that the talk focuses on MCP for autonomous agents and custom code, not its original desktop automation use case. 00:02:48 - Tool Calling Primitive: Highlighting that "tool calling" is the most relevant MCP primitive for this context. 00:03:10 - MCP vs. OpenAPI: Listing the advantages MCP has over a simple OpenAPI specification for tool calls. 00:03:21 - Feature 1: Dynamic Tools: Tools can appear and disappear based on server state. 00:03:26 - Feature 2: Streaming Logs: The ability to return log data to the user while a tool is still executing. 00:03:33 - Feature 3: Sampling: A mechanism for a tool (server) to request an LLM call back through the agent (client). 00:04:01 - MCP Architecture Diagram: Visualizing the basic agent-to-tool communication flow. 00:04:43 - Complex Architecture: Discussing scenarios where tools are themselves agents that need LLM access. 00:05:24 - Explaining Sampling: Detailing how sampling solves the problem of every agent needing its own LLM by allowing tools to "piggyback" on the client's LLM access. 00:06:42 - Pydantic AI's Role in Sampling: How the Pydantic AI library supports sampling on both the client and server side. 00:07:10 - Demo Start: Beginning the demonstration of a research agent that uses an MCP tool to query BigQuery. 00:08:23 - Code Walkthrough: Validation: Showing how Pydantic is used for output validation and automatic retries (model_retry). 00:09:00 - Code Walkthrough: Context Logging: Demonstrating the use of mcp_context.log to send progress updates back to the client. 00:10:51 - MCP Server Setup: Showing the code for setting up an MCP server using fast_mcp. 00:11:54 - Design Pattern: Inference Inside the Tool: Explaining the benefit of having the tool perform its own LLM inference to reduce the context burden on the main agent. 00:12:27 - Main Application Code: Reviewing the client-side code that defines the agent and registers the MCP tool. 00:13:16 - Observability with Logfire: Switching to the Logfire UI to trace the execution of the agent's query. 00:14:09 - Observing Sampling in Action: Pointing out the specific span in the trace that shows the tool making an LLM call back through the client via sampling. 00:14:48 - Inspecting the SQL Query: Showing how the observability tool can be used to see the exact SQL query that was generated by the internal agent. 00:15:15 - Conclusion: Final summary of the talk's points.

You May Also Like

Boost Your Python Skills Today

AI-recommended products based on this video

Loading...
Syntech Link Cable 16FT for PCVR Compatible with Oculus/Quest 3/Meta Quest 3S, Quest2/Pro/Pico 4/Ultra Accessories and PC/SteamVR, High Speed PC Data Transfer, USB 3.0 to USB C Cable for VR Headset
Best Seller

Syntech Link Cable 16FT for PCVR Compatible with Oculus/Quest 3/Meta Quest 3S, Quest2/Pro/Pico 4/Ultra Accessories and PC/SteamVR, High Speed PC Data Transfer, USB 3.0 to USB C Cable for VR Headset

(19,554)
$24.99
FREE delivery Tue, Jun 17 on your first order
300+ bought in past month
Loading...
USB to USB C Cable for iPhone 16/15 [MFi Certified] Carplay Cable Car Charger Cord 6FT/4Pack Compatible with iPhone 16/16 Plus/16 Pro/16 Pro Max, iPhone 15/15 Plus/15 Pro/15 Pro Max,iPad Air/Mini

USB to USB C Cable for iPhone 16/15 [MFi Certified] Carplay Cable Car Charger Cord 6FT/4Pack Compatible with iPhone 16/16 Plus/16 Pro/16 Pro Max, iPhone 15/15 Plus/15 Pro/15 Pro Max,iPad Air/Mini

(1,176)
$16.97
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month
Loading...
Car Carplay Cable for iPhone 16/16 Pro Max/16 Plus/15 Pro Max Plus, 3.3ft USB to USB C Cable Compatible with Apple Car Play iPhone 16 15 Cord, USB A to USB C Car Charger Cable Cord (Black)

Car Carplay Cable for iPhone 16/16 Pro Max/16 Plus/15 Pro Max Plus, 3.3ft USB to USB C Cable Compatible with Apple Car Play iPhone 16 15 Cord, USB A to USB C Car Charger Cable Cord (Black)

(2)
$8.99
FREE delivery Sun, Jun 15 on your first order
Loading...
BASESAILOR iPhone 16 15 Pro Max Charger Cord,USB to USB C Cable 6.6FT/2Pack,Type C Charging Power Cord for Apple iPad 10,Samsung Galaxy AI S25 S24 S23 S22 S20 Plus Ultra Flip,A52 A53 A54,Google Pixel

BASESAILOR iPhone 16 15 Pro Max Charger Cord,USB to USB C Cable 6.6FT/2Pack,Type C Charging Power Cord for Apple iPad 10,Samsung Galaxy AI S25 S24 S23 S22 S20 Plus Ultra Flip,A52 A53 A54,Google Pixel

(29,760)
$12.59
FREE delivery Sat, Jun 14 on your first order
500+ bought in past month
Loading...
Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

(382)
$94.95
PrimeFREE delivery Sat, Jun 14
Loading...
10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

(1)
$99.99
FREE delivery Mon, Aug 11
Loading...
ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

(49)
$117.29$102.21
$6.86 delivery Thu, Aug 14
Loading...
7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

(61)
$68.99
FREE delivery Tue, Aug 12
Loading...
BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

(288)
$54.14
FREE delivery Sun, Jun 22
Loading...
Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

(382)
$94.95
PrimeFREE delivery Sat, Jun 14