feat: add mcp_shttp_servers override to conversation initialization (#10171)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Tim O'Farrell
2025-08-08 12:05:44 -06:00
committed by GitHub
parent 04ff4a025b
commit 18f8661770
4 changed files with 32 additions and 5 deletions

View File

@@ -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