View the source code for this module on GitHub: https://github.com/mcp-use/mcp-use/blob/main/libraries/python/mcp_use/server/runner.py
Server runner for different transport types API Documentation
from mcp_use.server.runner import ServerRunner
method runSignatureTransport protocol to use (“stdio”, “streamable-http” or “sse”)Host to bind toPort to bind toWhether to enable auto-reload
def run(
transport: Literal = "streamable-http",
host: str = "127.0.0.1",
port: int = 8000,
reload: bool = False
):
method run_streamable_http_asyncSignatureString valueInteger valueBoolean flag
def run_streamable_http_async(host: str = "127.0.0.1", port: int = 8000, reload: bool = False):
method serve_starlette_appSignatureParameter valueString valueInteger valueParameter valueBoolean flag
def serve_starlette_app(
starlette_app: starlette.applications.Starlette,
host: str = "127.0.0.1",
port: int = 8000,
transport: Literal | None = None,
reload: bool = False
):
Was this page helpful?