File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
examples/snippets/servers Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 55import sys
66
77from mcp .server .fastmcp import Context , FastMCP
8+ from mcp .server .session import ServerSession
89
910mcp = FastMCP ("Logging and stdio test" )
1011
1112
1213@mcp .tool ()
13- async def log (ctx : Context ) -> str :
14+ async def log (ctx : Context [ ServerSession , None ] ) -> str :
1415 await ctx .debug ("Debug message" )
1516 await ctx .info ("Info message" )
1617 print ("Stderr message" , file = sys .stderr )
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ async def _create_platform_compatible_process(
236236 command : str ,
237237 args : list [str ],
238238 env : dict [str , str ] | None = None ,
239- errlog : TextIO = sys . stderr ,
239+ errlog : TextIO | None = None ,
240240 cwd : Path | str | None = None ,
241241):
242242 """
You can’t perform that action at this time.
0 commit comments