
mcp-agent
Python framework for building agents from composable MCP-based patterns
- Pricing
- Open source
- Platforms
- CLI, API, self-hosted
- GitHub stars
- 8.6K
- Last commit
- 10 months ago
- Language
- Python
- License
- Apache-2.0
Similar agents
About mcp-agent
mcp-agent is an open-source agent framework for ai models and llm tooling. It is available on CLI, API, self-hosted, Linux, macOS and Windows.
The README describes mcp-agent as a Python framework that wires LLMs to Model Context Protocol servers, so developers can compose agent behaviour from reusable patterns rather than hand-coding connection handling. It handles the lifecycle of MCP server connections, and the project says it implements the workflow patterns from Anthropic's agent guidance, including parallel fan-out, routing, orchestrator-workers and evaluator-optimizer loops.
Agents are defined by an instruction plus the list of MCP servers they may call, and attach to an OpenAI, Anthropic, Google, Azure or Bedrock augmented LLM. Workflows can be made durable by switching the execution engine to Temporal, which the README says allows pause, resume and retry without changing workflow code. Any MCP server can also be wrapped as an agent and served back out over MCP.
The library suits Python developers who want to build multi-step agent applications on top of existing MCP tools, and it also offers a CLI for scaffolding and deploying to the vendor's cloud runtime.
What it does
- Composable agent patterns
- Ships routing, parallel, orchestrator, evaluator-optimizer and swarm workflows that can be chained together.
- MCP server connection handling
- Manages starting, connecting to and tearing down MCP servers so developers do not write adapter code.
- Durable execution with Temporal
- Optional Temporal backend for pausing, resuming and recovering long-running agent workflows.
- Expose agents as MCP servers
- Wraps an MCPApp so Claude Desktop, Cursor or other MCP clients can call its tools and workflows.
- Human input signals
- Workflows can pause for approval or extra data and resume once an operator responds.
- Multi-provider LLM support
- Attach augmented LLM classes for OpenAI, Anthropic, Google, Azure and Bedrock models.
Good for
- Building a Python agent that reads local files and fetches web pages through MCP servers
- Running a multi-agent research or planning pipeline with an orchestrator and worker agents
- Adding approval steps to long-running agent workflows using durable execution
- Publishing an existing agent workflow as an MCP server for other clients to call
Pricing
Open source
Open source under Apache-2.0; a managed Cloud deployment option is also mentioned.
mcp-agent FAQ
What license is mcp-agent released under?
The repository is licensed under Apache-2.0.
Do I need an MCP client to use it?
No. The README says mcp-agent creates MCP client connections itself, so it can run standalone outside hosts like Claude Desktop.
How do I install it?
The README recommends uv with the command uv add "mcp-agent", or pip install mcp-agent, with optional extras for LLM providers.
Is durable execution required?
No. Workflows run on the asyncio engine by default, and setting execution_engine to temporal enables the durable backend.
Is mcp-agent free?
Yes. mcp-agent is open source, so you can use and self-host it for free.
What are the best alternatives to mcp-agent?
The closest alternatives to mcp-agent are fast-agent, openagent, llm_agents, ag2 and AgentPilot.
Where this comes from
- Description: written from the project's README.



