Skip to content

Commit 4af7fe4

Browse files
committed
Allow config_path to use ~ for home dir
1 parent f9d48d6 commit 4af7fe4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/mcp/client/config/mcp_servers_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ def from_file(cls, config_path: Path | str, use_pyyaml: bool = False) -> "MCPSer
110110
if isinstance(config_path, str):
111111
config_path = Path(config_path)
112112

113+
config_path = config_path.expanduser()
114+
113115
with open(config_path) as config_file:
114116
# Check if YAML parsing is requested
115117
should_use_yaml = use_pyyaml or config_path.suffix.lower() in (".yaml", ".yml")

0 commit comments

Comments
 (0)