Back to blog

A Really Good MCP Makes Building Agents Really Easy

HTS MCP Team · March 29, 2026 · 3 min read

ai-agentspydantic-aimodel-context-protocolinfrastructure-patternsrigid-flexible-architecture

Everyone's trying to build AI agents. Most of them are fighting the infrastructure the whole way.


The agent problem nobody talks about

There's a gold rush happening around AI agents right now. Every team wants to build them. Autonomous workflows that classify, analyze, decide, and act.

But if you've actually tried to build an agent for anything involving real domain complexity, you know the truth: the hard part isn't the agent logic. The hard part is the infrastructure underneath it.

Your agent needs access to reliable, structured data. It needs to understand relationships between entities. It needs to call tools that return consistent, validated results. And it needs all of this through an interface that's clean enough that the agent can actually reason over it without choking on messy outputs or ambiguous schemas.

Most teams spend 80% of their time building and maintaining that infrastructure layer. The agent itself is almost an afterthought.

What happens when the infrastructure is already solved

We've been building HTS MCP as a tool layer for trade law. HTS codes, CFR regulations, CROSS rulings, legal definitions, and the relationships between all of them. Accessible through a standard protocol that any model can use.

Originally, the pitch was: connect this to Claude or ChatGPT and get trade intelligence wherever you work. That's still true.

But something else happened along the way. When we started building agents on top of it, the experience was shockingly easy.

Not because we're great at building agents. Because the MCP was solid.

The agent didn't need to figure out how to parse trade law. The MCP already models it as a connected system. The agent didn't need custom retrieval logic or embedding pipelines. The MCP exposes clean, structured tools that return exactly what the agent needs. The agent didn't need elaborate error handling for bad data. The tools are validated and consistent.

All the agent had to do was think. Decide what to ask, interpret the results, and figure out the next step. The cognitive work, not the plumbing.

Pydantic AI made this click

We're building our agent layer with Pydantic AI, and the fit is almost unreasonably good.

Pydantic AI gives you typed, validated tool interfaces. MCP gives you typed, validated data access. The two layers snap together cleanly. Your agent definition ends up being mostly workflow logic and decision-making, not data wrangling and error recovery.

When your tools are well-defined and your data layer is reliable, the agent code gets small. Surprisingly small. The kind of small where you read it and think "wait, is that it?" That's the sign that the infrastructure is carrying its weight.

The pattern we think matters

Here's the mental model:

MCP is the rigid layer. Structured knowledge. Validated tools. Consistent interfaces. This is where reliability lives. You want this to be boring and rock solid.

Agents are the flexible layer. Reasoning. Decision-making. Multi-step workflows. Adaptation. This is where intelligence lives. You want this to be creative and dynamic.

Most teams try to build both at the same time, and both suffer. The infrastructure is flimsy because it was built just-in-time for the agent. The agent is fragile because it's compensating for bad infrastructure.

Separate the two. Make the rigid layer genuinely rigid. Then the flexible layer can actually flex.

Why this is the next step for HTS MCP

Posts 1 through 3 in this series were about a simple idea: trade intelligence should be portable, not locked inside someone else's app.

This post is about what happens next. Once you have a solid intelligence layer, you don't just query it from a chat window. You build on top of it. Classification agents. Compliance workflows. Duty analysis pipelines. Whatever your team needs.

The MCP is the foundation. Pydantic AI is the framework. The agents are limited only by what you need them to do.

We're not building an agent platform. We're building infrastructure so good that building agents on top of it feels almost trivial.

That's the goal. Rigid foundation. Flexible everything else.


The best infrastructure doesn't just answer questions. It makes building the next layer feel easy.