mcp-agent
by joshuaalpuerto·★ 18·综合分 43
TypeScript 框架,用于构建带有 MCP 工具和工作流的 AI 代理。
概述
mcp-agent 是一个受 Python mcp-agent 项目启发的 TypeScript 框架,提供了一种简单、可组合的方式来构建利用模型上下文协议的 AI 代理。它提供代理抽象、MCP 服务器集成、本地功能工具和各种工作流模式,如编排器模式。该框架采用两层架构,具有全局连接管理器和每个代理的聚合器,以实现高效的资源管理。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
如果您在 TypeScript/JavaScript 环境中工作,需要构建能够编排多个 MCP 工具并实现智能体工作流的 AI 智能体,请选择此框架。
什么时候不要选它
如果您需要更成熟的生态系统和更广泛的 MCP 服务器支持,或者主要在 Python 环境中工作,那么原始的 mcp-agent 可能更适合,请避免使用此框架。
此 server 暴露的工具
从 README 抽取出 3 个工具read_file_from_local_file_systemReads files from the local file system
search_webSearches the web using an external API
writeLocalSystemWrites information to a local file
说明:Tool names were inferred from the example configuration in the README, which shows MCP server configurations being used. The exact signatures and detailed descriptions are not documented in the provided text.
可对比工具
安装
npm install @joshuacalpuerto/mcp-agent要集成到 Claude Desktop,请添加到 claude_desktop_config.json:
{
"mcpServers": {
"mcp-agent": {
"command": "node",
"args": ["--loader", "ts-node/esm", "/path/to/your/mcp-agent/index.ts"]
}
}
}FAQ
- mcp-agent 和原始的 Python 版本有什么区别?
- TypeScript 版本将相同的模式架构带到了 JavaScript/TypeScript 环境,提供类型安全和与现有 Node.js 应用程序的集成。核心概念保持不变。
- 连接管理器 + 聚合器架构是如何工作的?
- 连接管理器维护一个全局的 MCP 服务器连接池以避免重复。每个代理都有自己的聚合器,可以从全局池中访问特定工具,实现连接复用同时保持隔离。
mcp-agent 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。