Skip to content

Commit c202c12

Browse files
committed
updated readme
1 parent 3e9506d commit c202c12

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

README.v2.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,11 +2215,7 @@ from mcp.client.streamable_http import streamable_http_client
22152215

22162216
async def main():
22172217
# Connect to a streamable HTTP server
2218-
async with streamable_http_client("http://localhost:8000/mcp") as (
2219-
read_stream,
2220-
write_stream,
2221-
_,
2222-
):
2218+
async with streamable_http_client("http://localhost:8000/mcp") as (read_stream, write_stream):
22232219
# Create a session using the client streams
22242220
async with ClientSession(read_stream, write_stream) as session:
22252221
# Initialize the connection
@@ -2397,7 +2393,7 @@ async def main():
23972393
)
23982394

23992395
async with httpx.AsyncClient(auth=oauth_auth, follow_redirects=True) as custom_client:
2400-
async with streamable_http_client("http://localhost:8001/mcp", http_client=custom_client) as (read, write, _):
2396+
async with streamable_http_client("http://localhost:8001/mcp", http_client=custom_client) as (read, write):
24012397
async with ClientSession(read, write) as session:
24022398
await session.initialize()
24032399

0 commit comments

Comments
 (0)