The Protocol That Cleaned Up Our Agent Architecture

· Source: Towards Data Science · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering, Robotics & Autonomous Systems · Depth: Advanced, medium

Summary

The Model Context Protocol (MCP) is an open standard published by Anthropic in late 2024 that standardizes how AI agents discover and call tools, addressing challenges like tool duplication and complex schema updates in agentic systems, particularly those built with LangGraph. Instead of defining tools locally within orchestrators, MCP centralizes them on a separate server, allowing agents to connect at runtime and retrieve a list of available tools. The article details building an MCP server using Python's FastMCP, differentiating between stdio and streamable HTTP transports for various deployment scenarios. It also covers integrating MCP with LangGraph via the "langchain-mcp-adapters" library, implementing human-in-the-loop approval gates at the protocol boundary, and mitigating production issues like server crashes or LLM misrouting. This approach eliminates tool duplication, accelerates new capability additions, and establishes clear team ownership.

Key takeaway

For AI Architects or ML Engineers managing complex agentic systems with multiple agents and shared tools, adopting the Model Context Protocol (MCP) is crucial. It eliminates tool duplication and simplifies schema updates, allowing your ML team to deploy and version tools independently from the application graph. Consider implementing MCP to decouple engineering constraints, streamline new capability additions, and enhance system maintainability, especially when interoperability across frameworks is a future concern.

Key insights

The Model Context Protocol (MCP) centralizes AI agent tool management, decoupling tool definitions from orchestrators for improved interoperability and scalability.

Principles

Method

Build an MCP server using FastMCP, decorating functions with "@mcp.tool()" for schema generation. Choose "stdio" for local/single-machine deployments or "streamable-http" for shared/scalable services. Connect to LangGraph via "langchain-mcp-adapters" and "MultiServerMCPClient". Implement human approval gates between the client and server.

In practice

Topics

Best for: AI Engineer, Machine Learning Engineer, AI Architect

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Towards Data Science.