Skip to content

Commit afc2aef

Browse files
committed
Drop code example from InMemoryTransport
1 parent 8fdfa69 commit afc2aef

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/mcp/client/_memory.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,6 @@ class InMemoryTransport:
2121
This transport starts the server in a background task and provides
2222
streams for client-side communication. The server is automatically
2323
stopped when the context manager exits.
24-
25-
Example:
26-
```python
27-
from mcp.client import Client, ClientSession
28-
from mcp.server.mcpserver import MCPServer
29-
from mcp.client.memory import InMemoryTransport
30-
31-
server = MCPServer("test")
32-
async with InMemoryTransport(server) as (read_stream, write_stream):
33-
async with ClientSession(read_stream, write_stream) as session:
34-
await session.initialize()
35-
# Use the session...
36-
```
3724
"""
3825

3926
def __init__(self, server: Server[Any] | MCPServer, *, raise_exceptions: bool = False) -> None:

0 commit comments

Comments
 (0)