To Nha Notes | Sept. 3, 2025, 10:34 a.m.
The mcp-agent project from LastMile AI offers an elegant and composable Python-centric framework for building AI agents using the Model Context Protocol (MCP). This protocol—introduced by Anthropic in November 2024—is emerging as a standardized, “USB-C of AI” interface for securely linking AI agents with diverse tools and data sources.
Purpose-built for MCP: Unlike heavy frameworks, mcp-agent purposefully wraps MCP’s complexity, handling connection lifecycles, tool orchestration, and server management so developers can focus on agent logic.
Composable architecture: Implements core patterns from Anthropic’s Building Effective Agents manifesto—such as Parallel, Router, Intent-Classifier, Evaluator-Optimizer—plus OpenAI’s Swarm pattern, all in a model-agnostic style.
Versatile deployment modes: Run as standalone scripts or notebooks, embed in MCP clients, or expose as an MCP server to be invoked by clients like Claude Desktop.
Claude Desktop integration: Wrap an agent as an MCP server, enabling Claude to invoke workflows—for example, multi-agent evaluation that analyzes and then aggregates feedback on a poem.
Streamlit-based Gmail agent: A practical demo that can read, send, or triage emails via text prompt by leveraging an MCP Gmail server.
Marimo notebook: An interactive, reactive UI inside a notebook environment, offering an alternative to Jupyter or Streamlit.
Joshua Berkowitz: Praises the framework’s pragmatism—lightweight code, familiar Python syntax, provider-agnostic patterns, and built-in telemetry for observing tool selection and outcomes.
Reddit contributors: Users report ease of use, for example building a financial-advisor-replacing agent with mcp-agent's orchestrator picking appropriate tools.
The project continues to be actively developed. Planned features include:
Durable execution (pausable, persistent workflows, potentially using Temporal)
Long-term memory
Streaming support
Expanded MCP capabilities beyond tool calls (resources, prompts, notifications)
What is it? A Python framework for building AI agents using MCP, emphasizing interoperability, composability, and minimal infrastructure overhead.
Why use it? If you're working with MCP-aware tools or looking for modular, production-level agent patterns, this is one of the most developer-friendly paths.
How to start? Install with pip install mcp-agent or uv add "mcp-agent", explore the built-in examples (CLI, Streamlit Gmail, Marimo, etc.), and extend with your own MCP servers and workflows.
GitHub repo: lastmile-ai/mcp-agent
GitHub – MCP Example Code: [kylestratis/ai_agents_mcp_examples] (Code examples per chapter for AI agents with MCP) GitHub
GitHub – Agentic Patterns with Ollama Models: [PacktPublishing/-The-4-AI-Agentic-Design-Patterns-for-AI-Agentic-Worflows-with-Ollama-Models] (Python implementations of 4 key patterns) GitHub
Blog review by Joshua Berkowitz: MCP Agent – Build Composable AI Agents on MCP
BestOfAI coverage: Build Effective Agents Using MCP and Simple Workflow Patterns
Wikipedia: Model Context Protocol (MCP)
Reddit: Built an AI Agent That Replaced My Financial Advisor
Agentic Design Patterns (Google Docs): A Hands-On Guide to Building Intelligent Systems — covers MCP and many other agentic design patterns docs.google.com