MCPcopy
hub / github.com/modelcontextprotocol/python-sdk / StdioServerParameters

Class StdioServerParameters

src/mcp/client/stdio.py:93–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91
92
93class StdioServerParameters(BaseModel):
94 command: str
95 """The executable to run to start the server."""
96
97 args: list[str] = Field(default_factory=list)
98 """Command line arguments to pass to the executable."""
99
100 env: dict[str, str] | None = None
101 """Extra environment variables, merged over get_default_environment()."""
102
103 cwd: str | Path | None = None
104 """The working directory to use when spawning the process."""
105
106 encoding: str = "utf-8"
107 """Text encoding for messages to and from the server."""
108
109 encoding_error_handler: Literal["strict", "ignore", "replace"] = "strict"
110 """Encoding error handler; see https://docs.python.org/3/library/codecs.html#error-handlers."""
111
112
113@asynccontextmanager

Calls

no outgoing calls