# This file was auto-generated by Fern from our API Definition.

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class McpServerIntegrationTransport(enum.StrEnum):
    """
    The transport protocol to use for communication with the MCP Server.
    """

    STREAMABLE_HTTP = "streamable-http"
    SSE = "sse"

    def visit(self, streamable_http: typing.Callable[[], T_Result], sse: typing.Callable[[], T_Result]) -> T_Result:
        if self is McpServerIntegrationTransport.STREAMABLE_HTTP:
            return streamable_http()
        if self is McpServerIntegrationTransport.SSE:
            return sse()
