langflow-ai/langflow · error · HTTPException

Invalid transport. Use 'sse' or 'streamablehttp'.

Error message

Invalid transport. Use 'sse' or 'streamablehttp'.

What it means

Error "Invalid transport. Use 'sse' or 'streamablehttp'." thrown in langflow-ai/langflow.

Source

Thrown at src/backend/base/langflow/api/v1/mcp_projects.py:876

        # Get settings service to build the SSE URL
        settings_service = get_settings_service()
        if settings_service.auth_settings.AUTO_LOGIN and not settings_service.auth_settings.SUPERUSER:
            # Without a superuser fallback, require API key auth for MCP installs.
            should_generate_api_key = True
        settings = settings_service.settings
        host = settings.host or None
        port = settings.port or None
        if not host or not port:
            raise HTTPException(status_code=500, detail="Host and port are not set in settings")

        # Determine command and args based on operating system
        os_type = platform.system()

        use_mcp_composer = should_use_mcp_composer(project)
        connection_urls: list[str]
        transport_mode = (body.transport or "sse").lower()
        if transport_mode not in {"sse", "streamablehttp"}:
            raise HTTPException(status_code=400, detail="Invalid transport. Use 'sse' or 'streamablehttp'.")

        if use_mcp_composer:
            try:
                auth_config = await _get_mcp_composer_auth_config(project)
                await get_or_start_mcp_composer(auth_config, project.name, project_id)
                composer_streamable_http_url = await get_composer_streamable_http_url(project)
                sse_url = await get_composer_sse_url(project)
                connection_urls = [composer_streamable_http_url, sse_url]
            except MCPComposerError as e:
                await logger.aerror(
                    f"Failed to start MCP Composer for project '{project.name}' ({project_id}): {e.message}"
                )
                raise HTTPException(status_code=500, detail=e.message) from e
            except Exception as e:
                error_msg = f"Failed to start MCP Composer for project '{project.name}' ({project_id}): {e!s}"
                await logger.aerror(error_msg)
                error_detail = "Failed to start MCP Composer. See logs for details."
                raise HTTPException(status_code=500, detail=error_detail) from e

View on GitHub (pinned to 976ec789d2)

Solutions

  1. Use transport 'sse' or 'streamablehttp'.

When it happens

Trigger: Occurs when an MCP client configuration request specifies a transport other than 'sse' or 'streamablehttp'.

Common situations: See trigger scenarios.


AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14). Data as JSON: /api/errors/b98e9305fc1b495d. Report an issue: GitHub.