Let Client take StdioServerParameters directly (#3321)

This commit is contained in:
Max 2026-08-17 14:31:21 +01:00 • committed by GitHub
commit e473cca6a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,4 @@
from mcp import Client, StdioServerParameters
from mcp.client.stdio import stdio_client
server = StdioServerParameters(
command="uv",
@ -9,6 +8,6 @@ server = StdioServerParameters(
async def main() -> None:
async with Client(stdio_client(server)) as client:
async with Client(server) as client:
result = await client.list_tools()
print([tool.name for tool in result.tools])