File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
import sys
3
3
from contextlib import asynccontextmanager
4
+ from pathlib import Path
4
5
from typing import Literal
5
6
6
7
import anyio
@@ -66,6 +67,9 @@ class StdioServerParameters(BaseModel):
66
67
If not specified, the result of get_default_environment() will be used.
67
68
"""
68
69
70
+ cwd : str | Path | None = None
71
+ """The working directory to use when spawning the process."""
72
+
69
73
encoding : str = "utf-8"
70
74
"""
71
75
The text encoding used when sending/receiving messages to the server
@@ -101,6 +105,7 @@ async def stdio_client(server: StdioServerParameters):
101
105
[server .command , * server .args ],
102
106
env = server .env if server .env is not None else get_default_environment (),
103
107
stderr = sys .stderr ,
108
+ cwd = server .cwd ,
104
109
)
105
110
106
111
async def stdout_reader ():
You can’t perform that action at this time.
0 commit comments