WhoBuilt

MCP is all you need

Jul 18, 2025· 15 min· 66K views·Watch on YouTube

Speaker

Samuel Colvin, creator of Pydantic and co-maintainer of the MCP Python SDK, explains how MCP tool calling and sampling can support autonomous agents at AI Engineer.

MCP’s scope and strengths

Colvin says MCP is not a solution for everything, but tool calling can handle many agent integration needs. He highlights dynamic tools, logs returned during execution, sampling, observability, and running servers over standard input and output.

Sampling lets servers reuse a client’s model

When tools are themselves agents, each one may need its own model access and configuration. With MCP sampling, a server can send an LLM request through the client, letting the tool use the model the original agent already has access to.

A PyPI research tool with retries and progress logs

Colvin demonstrates a Pydantic AI research agent with an MCP tool that queries BigQuery’s public PyPI dataset for package downloads. Its output validator checks the SQL and retries the model if a query fails; MCP context logging can send progress to the client before the tool finishes.

Keep query instructions inside the tool

The demo registers a PyPI downloads function on a FastMCP server, with its docstring becoming the tool description. Colvin explains that putting detailed SQL instructions inside the tool keeps that context out of the main agent’s prompt. In the example, the query returns about 1.6 billion Pydantic downloads for the year, and Logfire traces the client, server, and model calls.

Takeaways

  • Use MCP tools to keep specialized instructions and context out of the main agent’s prompt.
  • Consider MCP sampling when a server-side agent needs model access and can use the client’s model.
  • Validate generated queries and return model retries when they fail.
  • Use MCP logging to show progress while a long-running tool is still executing.
  • Trace client, server, and model calls to inspect how an MCP workflow runs.

Mentioned in this talk

Search inside this talk

What was claimed 10

Show all 10 facts

Related talks