Files
nexus/wiki/concepts/MCPOnceAllAgents.md

42 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "MCP Once All Agents"
type: concept
tags: []
sources: []
last_updated: 2026-04-22
---
# MCP Once All Agents
一种 MCPModel Context Protocol配置模式——在多 Agent 平台中配置一次 MCP 服务器,该配置自动同步到平台内所有集成的 Agent无需逐个 Agent 单独配置。
## 动机
在 [[Multi-AgentHub]] 场景中,每个 Agent 可能需要访问相同的外部工具和服务如文件系统、数据库、Web 浏览器)。传统方式是每个 Agent 独立配置 MCP 服务器:
- 配置重复N 个 Agent 需要维护 N 份配置
- 更新繁琐,修改一个工具需要同步更新所有 Agent 配置
- 容易出现配置不一致
## 机制
1. **中心化配置**:在 Hub 层面统一配置 MCP 服务器连接
2. **自动分发**Hub 自动将 MCP 配置注入每个集成的 Agent 上下文
3. **单一数据源**MCP 服务器变更只需在 Hub 中更新一次
## 典型场景
[[AionUi]] 在 AionUi 中配置 MCP 服务器后,自动同步到 OpenClaw、Claude Code、Codex 等所有 Agent。
## 与传统模式的对比
| 维度 | 独立 MCP 配置 | MCP Once All Agents |
|------|-------------|---------------------|
| 配置数量 | N 个(每个 Agent| 1 个Hub 层面)|
| 更新成本 | O(N) | O(1) |
| 一致性 | 容易出现差异 | 天然一致 |
| 适用场景 | Agent 能力差异大 | 多 Agent 共享工具集 |
## 相关概念
- [[Multi-AgentHub]]MCP Once All Agents 的典型应用场景
- [[MCP Tool Interface Design]]MCP 协议的接口设计原则