File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 11import os
22import sys
33from contextlib import asynccontextmanager
4+ from pathlib import Path
45from typing import Literal
56
67import anyio
@@ -66,6 +67,9 @@ class StdioServerParameters(BaseModel):
6667 If not specified, the result of get_default_environment() will be used.
6768 """
6869
70+ cwd : str | Path | None = None
71+ """The working directory to use when spawning the process."""
72+
6973 encoding : str = "utf-8"
7074 """
7175 The text encoding used when sending/receiving messages to the server
@@ -101,6 +105,7 @@ async def stdio_client(server: StdioServerParameters):
101105 [server .command , * server .args ],
102106 env = server .env if server .env is not None else get_default_environment (),
103107 stderr = sys .stderr ,
108+ cwd = server .cwd ,
104109 )
105110
106111 async def stdout_reader ():
You can’t perform that action at this time.
0 commit comments