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

Class HTTPServerConfig

src/mcp_cli/config/server_models.py:10–32  ·  view source on GitHub ↗

HTTP/SSE server configuration.

Source from the content-addressed store, hash-verified

8
9
10class HTTPServerConfig(BaseModel):
11 """HTTP/SSE server configuration."""
12
13 name: str
14 url: str
15 headers: dict[str, str] = Field(default_factory=dict)
16 disabled: bool = False
17 tool_timeout: float | None = Field(
18 default=None, description="Per-server tool timeout"
19 )
20 init_timeout: float | None = Field(
21 default=None, description="Per-server init timeout"
22 )
23
24 model_config = {"frozen": True}
25
26 @field_validator("url")
27 @classmethod
28 def validate_url(cls, v: str) -> str:
29 """Validate URL format."""
30 if not v.startswith(("http://", "https://")):
31 raise ValueError("URL must start with http:// or https://")
32 return v
33
34
35class STDIOServerConfig(BaseModel):

Calls

no outgoing calls