mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 23:08:04 -05:00
feat: add mcp_shttp_servers override to conversation initialization (#10171)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import re
|
||||
import shlex
|
||||
@@ -302,6 +304,13 @@ class MCPConfig(BaseModel):
|
||||
raise ValueError(f'Invalid MCP configuration: {e}')
|
||||
return mcp_mapping
|
||||
|
||||
def merge(self, other: MCPConfig):
|
||||
return MCPConfig(
|
||||
sse_servers=self.sse_servers + other.sse_servers,
|
||||
stdio_servers=self.stdio_servers + other.stdio_servers,
|
||||
shttp_servers=self.shttp_servers + other.shttp_servers,
|
||||
)
|
||||
|
||||
|
||||
class OpenHandsMCPConfig:
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user