-
Notifications
You must be signed in to change notification settings - Fork 275
Closed
Closed
Copy link
Description
Problem
When using the same MCP (Model Context Protocol) tools across multiple agents, the configuration must be duplicated for each agent. This creates maintenance challenges:
agents:
coordinator:
toolsets:
- type: mcp
command: npx
args: ["-y", "@example/tool-mcp@^1.2.3"]
defer: true
timeout: 30000
env:
MCP_TIMEOUT: "30000"
specialist_1:
toolsets:
- type: mcp
command: npx
args: ["-y", "@example/tool-mcp@^1.2.3"] # ← Duplicated
defer: true
timeout: 30000
env:
MCP_TIMEOUT: "30000" # ← DuplicatedIssues with duplication:
- Consistency Risk: Easy to miss updating one agent's configuration
- Maintenance Burden: Changes must be made in multiple places
- Version Management: Hard to coordinate version updates across agents
- Error Prone: Inconsistencies can cause subtle bugs (e.g., one agent times out)
Solution
Support shared MCP definitions with references:
mcps:
search_tool:
command: npx
args: ["-y", "@example/tool-mcp@^1.2.3"]
defer: true
timeout: 30000
env:
MCP_TIMEOUT: "30000"
agents:
coordinator:
toolsets:
- type: mcp
ref: search_tool
specialist_1:
toolsets:
- type: mcp
ref: search_tool
specialist_2:
toolsets:
- type: mcp
ref: search_toolBenefits
- ✅ Single Source of Truth: Define MCP configuration once
- ✅ Consistency: All agents use identical configuration
- ✅ Easy Updates: Change once, applies everywhere
- ✅ Version Pinning: Control rollouts of tool updates
- ✅ Cleaner Config: Less repetition, easier to read
- ✅ Configuration Validation: Easier to detect mismatches
Implementation Details
Registry Structure
mcps:
<tool_name>:
command: <command>
args: [<array_of_args>]
defer: <boolean>
timeout: <milliseconds>
env:
<VAR>: <value>Reference Usage
toolsets:
- type: mcp
ref: <tool_name>Backward Compatibility
- Existing inline MCP definitions continue to work
- New
ref:parameter optional - No breaking changes
- Allow both inline and reference-based in same config
Override Support (Optional)
toolsets:
- type: mcp
ref: search_tool
timeout: 60000 # Override specific propertyUse Cases
- Multi-agent Coordination: Teams of specialized agents share common tools
- Consistency at Scale: Ensure all agents timeout at same interval
- Version Management: Roll out tool updates systematically
- Configuration Clarity: Reduce duplication, improve readability
Acceptance Criteria
- Support
mcps:registry section in configuration - Support
ref:parameter to reference MCPs by name - Support optional property overrides when using
ref: - Clear error messages for invalid references
- Backward compatible with inline MCP definitions
- Documentation with examples
- Tests cover reference resolution and overrides
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels