LA

lastmile-ai/mcp-agent

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

8567 stars 891 forks 质量 73 趋势 29Apache-2.0

利用模型上下文协议和简单的工作流程模式构建高效的代理

概览

使用模型上下文协议,使用简单、可组合的模式构建高效的代理。 是一个简单、可组合的框架,用于使用模型上下文协议构建有效的代理。 MCP-agent 的愿景是,构建代理所需的一切是 MCP,简单模式比复杂架构更稳健,能够传输高质量代理。 1. : 它完整实现MCP,并处理管理MCP服务器连接生命周期的繁琐事务,让您无需亲自操作。2. : 它以可组合的方式实现Anthropic《构建有效代理》中描述的每一个模式,允许您将这些模式串联在一起。3. : 它适用于简单代理,并可扩展到基于Temporals的复杂工作流,让您无需更改代理的API即可暂停、恢复和恢复。 总体而言,这是构建稳健代理应用最简单、最简单的方法。 我们欢迎各种贡献、反馈以及你们对项目改进的帮助。

概述(AI 翻译)

使用模型上下文协议,使用简单、可组合的模式构建高效的代理。

示例 | 打造高效的代理 | MCP

概述

mcp-agent 是一个简单、可组合的框架,用于使用模型上下文协议构建有效的代理。

[!注] mcp-agent的愿景是,构建代理所需的全部就是_MCP,简单的模式比复杂的架构更稳健,能够传输高质量agents_。

mcp-agent 给你以下信息:

  1. 完全支持MCP:它*完全_实现了MCP,并处理管理MCP服务器连接生命周期的繁琐事务,所以你无需亲自操作。
  2. 有效的代理模式:它以_可组合_的方式实现Anthropic《构建有效代理》中描述的所有模式,允许你将这些模式串联起来。
  3. 持久代理:它适用于简单的代理,并可扩展到基于Temporals的复杂工作流程,这样你可以暂停、恢复和恢复,而无需更改代理的API。

总体而言,这是构建稳健代理应用最简单、最简单的方法。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Build effective agents with Model Context Protocol using simple, composable patterns.

Examples | Building Effective Agents | MCP

Overview

mcp-agent is a simple, composable framework to build effective agents using Model Context Protocol.

[!Note] mcp-agent’s vision is that MCP is all you need to build agents, and that simple patterns are more robust than complex architectures for shipping high-quality agents.

mcp-agent gives you the following:

  1. Full MCP support: It fully implements MCP, and handles the pesky business of managing the lifecycle of MCP server connections so you don’t have to.
  2. Effective agent patterns: It implements every pattern described in Anthropic’s Building Effective Agents in a composable way, allowing you to chain these patterns together.
  3. Durable agents: It works for simple agents and scales to sophisticated workflows built on Temporal so you can pause, resume, and recover without any API changes to your agent.

Altogether, this is the simplest and easiest way to build robust agent applications.

We welcome all kinds of contributions, feedback and your help in improving this project.

Minimal example

import asyncio

from mcp_agent.app import MCPApp
在 GitHub 查看完整 README

安装

uvx mcp-agent` scaffolds projects, manages secrets, inspects workflows, and deploys to Cloud.
新手?先看 mcpskill.org 教程 →