Skip to content

Commit e39adaf

Browse files
Update src/mcpm/schemas/full_server_config.py
Co-authored-by: qodo-merge-pro[bot] <151058649+qodo-merge-pro[bot]@users.noreply.github.com>
1 parent 278334c commit e39adaf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/mcpm/schemas/full_server_config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ def to_dict(self) -> Dict:
7272
def to_server_config(self) -> ServerConfig:
7373
"""Convert FullServerConfig to a common server configuration format"""
7474
# Check if this is an HTTP server
75-
if self.installation == "http" and self.url:
76-
# For HTTP servers, use the headers field directly
75+
if self.installation == "http":
76+
if not self.url:
77+
raise ValueError(f"URL is required for HTTP server '{self.name}'")
7778
return RemoteServerConfig(name=self.name, url=self.url, headers=self.headers)
7879
else:
7980
# Default to STDIO for all other cases

0 commit comments

Comments
 (0)