MCPcopy Create free account
hub / github.com/IBM/mcp-cli / load_sync

Method load_sync

src/mcp_cli/config/models.py:188–196  ·  view source on GitHub ↗

Synchronous load (for backward compat during transition).

(cls, config_path: Path)

Source from the content-addressed store, hash-verified

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:

Callers 6

load_runtime_configFunction · 0.80
load_from_fileMethod · 0.80
base_configMethod · 0.80
test_servers_aliasMethod · 0.80

Calls

no outgoing calls

Tested by 4

base_configMethod · 0.64
test_servers_aliasMethod · 0.64