WhoBuilt

Exposing Agents as MCP servers with mcp-agent

Jun 11, 2025· 18 min· 7.9K views·Watch on YouTube

Speaker

Sarmad Qadri, CEO of LastMile AI and a longtime developer tools builder, explains at AI Engineer how to build MCP-based agents and expose them as asynchronous MCP servers.

Why agent development is changing

Qadri points to three shifts: more reliable reasoning models, MCP as a shared interface for tools and data, and simpler agent architectures. He argues that these changes reduce the need for large frameworks, since developers can combine capable models with standard protocols and established patterns.

Patterns for building agents

Qadri describes patterns including an augmented LLM that uses tools, an evaluator that improves a generated response, and systems that fan work out to sub-agents and combine their results. In an orchestrator pattern, a model plans tasks, assigns them dynamically, and synthesizes the results.

Treat agents as MCP services

Qadri introduces mcp-agent, a library built around MCP and production agent patterns. He proposes deploying agents as MCP servers so compatible clients can invoke them and agents can call other agents or standard servers such as GitHub, Slack, and Linear.

Run agents as durable workflows

Qadri says agents need workflow support because they may pause for human input, resume, retry, or run on a schedule. His mcp-agent uses Temporal for durable execution, separating agent compute from the client that starts the work.

Demo: grading a student story

Qadri demonstrates a workflow that loads a Markdown story, checks proofreading, factual and logical consistency, and APA style, then writes a report. Finder, writer, proofreader, fact-checking, and style agents coordinate through MCP servers for filesystem and web access; the workflow can also be invoked from Claude Desktop and polled while it runs elsewhere.

Takeaways

  • Use MCP to give agents a common interface to tools, data, and other agents.
  • Build agents as reusable services so MCP-compatible clients can invoke them.
  • Model long-running agent work as durable workflows that can pause, resume, and retry.
  • Combine specialized agents with an orchestrator when a task needs planning and synthesis.
  • Keep agent architecture focused on reliable models, standard protocols, and clear patterns.

Mentioned in this talk

Search inside this talk

What was claimed 9

  • previously at
    Sarmad Qadri previously at Microsoft
    Worked on the Language Server Protocol and language servers
    “From 2016 to 2018, I worked on the Language Server Protocol and language servers at Microsoft.”
    YouTube
    Verified2 sources· Talk, Web· archived
  • launched
    Anthropic launched MCP
    “It was introduced by Anthropic almost two years ago.”
    0:38inMCP Doesn't Suck. Your Agent Does.YouTube
    Verified7 sources· Talk
  • ceo of
    CEO
    “I’m the CEO of LastMile AI”
    YouTube
    Unverified1 source· Talk
  • feature
    LSP: Standardizes a single API interface for exposing language services in an IDE
    “LSP changed that by standardizing a single API interface for exposing language services in an IDE.”
    YouTube
    Unverified1 source· Talk
  • feature
    MCP: Provides a standardized interface for connecting LLMs to tools, data, resources, and the surrounding world
    “MCP is a standardized interface for connecting LLMs to tools, data, resources, and the world around them.”
    YouTube
    Unverified1 source· Talk
  • feature
    MCPAgent: Agents can be exposed as MCP servers and invoked through MCP clients
    “agents should be thought of as microservices, and they can be deployed as MCP servers themselves”
    YouTube
    Unverified1 source· Talk
  • feature
    MCPAgent: Agent workflows can be paused, resumed, or retried
    “agents are asynchronous workflows and should be modeled as such, because they can be paused, resumed, or retried”
    YouTube
    Unverified1 source· Talk
  • uses
    durable execution backend for agent compute and orchestration
    “we use Temporal as the durable execution backend”
    YouTube
    Unverified1 source· Talk
  • feature
    MCPAgent: Includes finder, writer, proofreader, fact checker, style enforcer, and orchestrator agents
    “I define a few agents: a finder agent ... a writer agent ... a proofreader, a fact checker, a style enforcer, and an orchestrator”
    YouTube
    Unverified1 source· Talk

Related talks