Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Python/SDK/docs_src/client_transports/     Datei vom 5.10.2026 mit Größe 380 B image not shown  

Quelle  tutorial005.py   Sprache: Python

 

from mcp import Client
from mcp.client.streamable_http import streamable_http_client


async def main() -> None:
    transport = streamable_http_client(
        "http://localhost:8000/mcp",
        max_sse_event_size=32 * 1024 * 1024,
    )
    async with Client(transport) as client:
        result = await client.list_tools()
        print([tool.name for tool in result.tools])

Messung
CHZG
859810094

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland