mcp-agent  by lastmile-ai

SDK for building effective agents using Model Context Protocol

created 7 months ago
6,871 stars

Top 7.5% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a Python framework for building AI agents using the Model Context Protocol (MCP) and composable workflow patterns. It targets developers looking to create robust, production-ready AI applications by abstracting away the complexities of MCP server management and implementing established agent design patterns.

How It Works

The framework centers around the MCPApp and Agent classes, enabling agents to interact with various MCP servers (like fetch or filesystem) by exposing them as tools to Large Language Models (LLMs). It implements Anthropic's "Building Effective Agents" patterns (Parallel, Router, Evaluator-Optimizer, Orchestrator) and OpenAI's Swarm pattern, all as composable AugmentedLLM objects. This allows for flexible chaining of functionalities, such as using an Evaluator-Optimizer to refine an Orchestrator's plan.

Quick Start & Requirements

  • Install via uv add "mcp-agent" or pip install mcp-agent.
  • Requires Python. Examples use uvx or npx to launch MCP servers, implying Node.js or Python environments might be needed for specific server dependencies.
  • Official examples and documentation are available in the repository.

Highlighted Details

  • Implements key agent patterns: Parallel, Router, Evaluator-Optimizer, Orchestrator, and Swarm.
  • Model-agnostic design allows integration with various LLM providers (e.g., OpenAI, Anthropic).
  • Seamlessly integrates with MCP servers, enabling agents to access external tools and data.
  • Supports composability, allowing workflows to be nested within others (e.g., an Evaluator-Optimizer as an Orchestrator's planner).
  • Includes mechanisms for human input and signaling within workflows.

Maintenance & Community

The project is in early development and welcomes contributions. Key community contributors are highlighted, including Shaun Smith (@evalstate), Jerron Lim (@StreetLamb), and Jason Summer (@jasonsum). A roadmap includes plans for durable execution, memory, and streaming.

Licensing & Compatibility

The repository does not explicitly state a license in the README. Compatibility for commercial use or closed-source linking would require clarification of the licensing terms.

Limitations & Caveats

The project is in early development, which may imply potential for breaking changes or incomplete features. The README does not specify licensing, which is a critical factor for adoption.

Health Check
Last commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
43
Issues (30d)
12
Star History
2,734 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.