langflow-ai/langflow · error · HTTPException
Host and port are not set in settings
Error message
Host and port are not set in settings
What it means
Error "Host and port are not set in settings" thrown in langflow-ai/langflow.
Source
Thrown at src/backend/base/langflow/api/v1/mcp_projects.py:867
should_generate_api_key = True
elif not settings_service.auth_settings.AUTO_LOGIN:
# No project auth settings but auto_login is disabled - generate API key
should_generate_api_key = True
elif project.auth_settings:
# When MCP_COMPOSER is enabled, only generate if auth_type is "apikey"
if project.auth_settings.get("auth_type") == "apikey":
should_generate_api_key = True
# 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:View on GitHub (pinned to 976ec789d2)
Solutions
- Set host and port in the Langflow settings before requesting the SSE URL.
When it happens
Trigger: Occurs when host and port are missing from server settings while building MCP client configuration.
Common situations: See trigger scenarios.
AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14).
Data as JSON: /api/errors/5aeb14a6fdd0897b.
Report an issue: GitHub.