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

Class STDIOServerConfig

src/mcp_cli/config/server_models.py:35–58  ·  view source on GitHub ↗

STDIO server configuration.

Source from the content-addressed store, hash-verified

33
34
35class STDIOServerConfig(BaseModel):
36 """STDIO server configuration."""
37
38 name: str
39 command: str
40 args: list[str] = Field(default_factory=list)
41 env: dict[str, str] = Field(default_factory=dict)
42 disabled: bool = False
43 tool_timeout: float | None = Field(
44 default=None, description="Per-server tool timeout"
45 )
46 init_timeout: float | None = Field(
47 default=None, description="Per-server init timeout"
48 )
49
50 model_config = {"frozen": True}
51
52 @field_validator("command")
53 @classmethod
54 def validate_command(cls, v: str) -> str:
55 """Validate command is not empty."""
56 if not v or not v.strip():
57 raise ValueError("Command cannot be empty")
58 return v.strip()
59
60
61class OAuthConfig(BaseModel):

Calls

no outgoing calls