mcp-agent  by lastmile-ai

SDK for building effective agents using Model Context Protocol

Created 9 months ago
7,320 stars

Top 7.0% 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

20 hours ago

Responsiveness

1 day

Pull Requests (30d)
115
Issues (30d)
12
Star History
284 stars in the last 30 days

Explore Similar Projects

Starred by Andrew Ng Andrew Ng(Founder of DeepLearning.AI; Cofounder of Coursera; Professor at Stanford), Thomas Wolf Thomas Wolf(Cofounder of Hugging Face), and
4 more.

ag2 by ag2ai

0.9%
4k
AgentOS for building AI agents and facilitating multi-agent cooperation
Created 10 months ago
Updated 2 days ago
Starred by Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
7 more.

SuperAGI by TransformerOptimus

0.1%
17k
Open-source framework for autonomous AI agent development
Created 2 years ago
Updated 7 months ago
Feedback? Help us improve.