Synchronous load (for backward compat during transition).
(cls, config_path: Path)
| 186 | |
| 187 | @classmethod |
| 188 | def load_sync(cls, config_path: Path) -> MCPConfig: |
| 189 | """Synchronous load (for backward compat during transition).""" |
| 190 | import json |
| 191 | |
| 192 | if not config_path.exists(): |
| 193 | return cls() |
| 194 | |
| 195 | data = json.loads(config_path.read_text()) |
| 196 | return cls.model_validate(data) # type: ignore[no-any-return] |
| 197 | |
| 198 | @classmethod |
| 199 | def load_from_file(cls, config_path: Path) -> MCPConfig: |
no outgoing calls