lastmile-ai

mcp-agent: Build Agents with Model Context Protocol

A Python framework for building LLM agents around Model Context Protocol servers and composable workflow patterns. It suits developers who need MCP integrations, multi-agent workflows, or durable execution with Temporal.

PythonApache-2.0AI AgentsMCPLLM
View on GitHub Compare
Stars
8.6k
Forks
893
Stars, last 30 days
+4

Our take

Health score

40/100

How it is scored
Activity
19
Community
71
Issues
48
Pull requests
20

+4 stars in the last 30 days

  • Slower to close issues than 85% of the projects we track

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

8,578

Forks

896

Change since Nov 13, 2026: -2 stars·+1 forks

Overview

mcp-agent is a Python framework for building LLM-powered agents that use tools and other capabilities exposed through Model Context Protocol (MCP) servers. It manages MCP connections and provides reusable workflow patterns, helping developers focus on application behavior rather than integration plumbing.

It is a fit for teams that want to compose straightforward agents and workflows, or add durable execution through Temporal. It also supports exposing an application as an MCP server. Model-provider credentials and MCP server configuration are still part of the setup.

Key Features

  • Connect agents to MCP servers and manage their connection lifecycle.
  • Compose patterns including routers, parallel map-reduce, orchestrator-workers, and evaluator-optimizer workflows.
  • Attach LLM integrations with tool access and structured-output helpers.
  • Use asyncio or Temporal execution, with Temporal supporting durable workflows such as pause, resume, and retries.
  • Expose applications and agents as MCP servers.
  • Configure MCP servers, providers, logging, and secrets through YAML, environment variables, or Python settings.
  • Scaffold projects and deploy using the mcp-agent CLI.

Use Cases

  • Python developers building assistants that need tools from multiple MCP servers, such as filesystem and web-fetch servers.
  • Teams composing specialist agents for research, routing, or parallel analysis without designing a custom workflow engine.
  • Applications that need long-running workflows with pause-and-resume behavior or recovery through Temporal.
  • Developers who want to make an existing agent workflow callable by MCP-compatible clients.

Getting Started

Install with uv:

uv add "mcp-agent"

Add an optional provider package and configure its API key before running an agent. See the README and documentation for setup steps, examples, and configuration details.

Alternatives

  • fast-agent: fast-agent is a Python agent and workflow framework with declarative setup and multimodal support, while mcp-agent centers on MCP integrations and composable workflows.
  • openai-agents-js: openai-agents-js is a TypeScript SDK focused on tool use, handoffs, and voice agents, whereas mcp-agent is a Python framework centered on MCP and workflow patterns.
  • Qwen-Agent: Qwen-Agent focuses on LLM applications with Qwen models, function calling, code execution, and RAG; mcp-agent emphasizes MCP server integrations and orchestration.
ProjectLanguageLicenseStarsStatus
mcp-agentPythonApache-2.08.6kNot checked yet
fast-agentPythonApache-2.03.9kActive
openai-agents-jsTypeScriptMIT3.9kActive
Qwen-AgentPythonApache-2.017.1kQuiet

Considerations

  • The framework is Python-based and uses asynchronous patterns in its examples.
  • You need credentials for the LLM provider you choose, plus any required MCP server dependencies and configuration.
  • Temporal-backed durability requires a Temporal runtime and worker setup. The simpler asyncio execution option is also available.
  • Cloud deployment is described as beta in the README, and uses the project's cloud service.
  • The project has an Apache-2.0 license. Its listed activity and popularity do not guarantee a particular support level or suitability for a production workload.

Found this useful?

Share it with someone who would like mcp-agent.

Comparisons