🚀 LW MCP 代理
LW MCP Agents是一个轻量级的模块化框架,用于使用**模型上下文协议 (MCP)**构建和编排 AI 代理。它使您能够快速设计多代理系统,其中每个代理都可以进行专门化、协作、委托和推理,而无需编写复杂的编排逻辑。
仅使用配置文件构建可扩展、可组合的 AI 系统。
🔍 为什么要使用 LW MCP 代理?
- ✅即插即用代理:使用简单的 JSON 配置启动零样板的智能代理。
- ✅多代理编排:将代理链接在一起以解决复杂的任务 - 无需额外的代码。
- ✅共享和重用:轻松跨环境分发和运行代理配置。
- ✅ MCP-Native :与任何 MCP 兼容平台无缝集成,包括 Claude Desktop。
🧠 您可以构建什么?
- 总结文档或搜索网络的研究代理
- 将任务委托给特定领域代理的协调器
- 递归扩展推理并动态聚合能力的系统
🏗️ 架构概览
📚 目录
🚀 入门
🔧 安装
▶️ 运行你的第一个代理
🤖 尝试多代理设置
终端 1(研究代理服务器):
终端 2(Orchestrator 代理):
您的协调器现在可以智能地将研究任务委托给研究代理。
🖥️ Claude 桌面集成
配置代理在Claude Desktop内运行:
1. 找到您的 Claude 配置文件:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
2. 在mcpServers
下添加您的代理:
📦示例代理
- 基础代理
通过 MCP 连接到工具的最小代理。
📁examples/base_agent/
- 策划者+研究员
展示分层委托和能力共享。
📁examples/orchestrator_researcher/
💡**贡献你自己的示例!**提交 PR 或联系维护人员。
⚙️ 运行代理
🔹基本命令
🔸 高级选项
选项 | 描述 |
---|---|
--server-mode | 将代理公开为 MCP 服务器 |
--server-name | 分配自定义 MCP 服务器名称 |
🛠️ 自定义代理创建
🧱 最小配置
🧠 添加功能
定义代理可以推理的专门函数:
🔄 Orchestrator 代理
🧬 工作原理
🧩 能力作为推理单元
每个功能:
- 使用提供的参数填写提示
- 使用 LLM 执行内部推理
- 使用工具或外部代理
- 返回结果
📖 研究示例
🧱 技术架构
🧠 关键组件
成分 | 角色 |
---|---|
AgentServer | 启动、配置并运行代理 |
MCPServerWrapper | 包裹代理以将其暴露在 MCP 上 |
CapabilityRegistry | 从配置中加载推理任务 |
ToolRegistry | 发现其他代理的工具 |
🌐 架构亮点
- 分层设计:用递归推理组成代理系统
- 委派功能:代理智能地委派给同行
- 工具共享:一个代理中可用的工具可供其他代理使用
- 无代码组合:通过配置创建整个系统
🙌 致谢
该项目从 LastMile AI 在mcp-agents上的出色工作中汲取了灵感。
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
通过模型上下文协议构建和协调 AI 代理的轻量级框架,使用户能够仅使用配置文件创建可扩展的多代理系统。
Related MCP Servers
- -securityFlicense-qualityA comprehensive suite of Model Context Protocol servers designed to extend AI agent Claude's capabilities with integrations for knowledge management, reasoning, advanced search, news access, and workspace tools.Last updated -5TypeScript
- -securityFlicense-qualityA Model Context Protocol server that enables role-based context management for AI agents, allowing users to establish specific instructions, maintain partitioned memory, and adapt tone for different agent roles in their system.Last updated -TypeScript
- -securityAlicense-qualityA Model Context Protocol server that allows AI assistants to interact with the Neuro-Symbolic Autonomy Framework, enabling capabilities like running NSAF evolution with customizable parameters and comparing different agent architectures.Last updated -PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server that provides AI agents with secure access to local filesystem operations, enabling reading, writing, and managing files through a standardized interface.Last updated -1603TypeScriptApache 2.0