fix: allow stable mcp source ids

This commit is contained in:
lda
2026-06-08 20:24:42 +07:00 Verified
parent 9d5382dea6
commit 3f04ee6ace
2 changed files with 21 additions and 6 deletions
+1 -5
View File
@@ -46,15 +46,11 @@ class McpSourceConnection:
metadata: dict[str, object] = field(default_factory=dict)
def __post_init__(self) -> None:
provider, account = parse_connection_id(self.id)
parse_connection_id(self.id)
if not self.provider:
raise ValueError("provider must not be empty")
if not self.account:
raise ValueError("account must not be empty")
if provider != self.provider or account != self.account:
raise ValueError(
"MCP source connection id must match provider/account fields"
)
@property
def server(self) -> str: