langflow-ai/langflow · error · HTTPException
OAuth authentication is not yet implemented for MCP server c
Error message
OAuth authentication is not yet implemented for MCP server creation during project creation.
What it means
Raised while creating an MCP server during project creation when the project template/config requests auth_type='oauth' for the MCP endpoint. OAuth-backed MCP proxies are not implemented in this code path, so instead of producing a broken server config the API returns HTTP 501 with this message and logs a warning. It is an explicit capability gap, not a transient failure.
Source
Thrown at src/backend/base/langflow/api/utils/mcp/config_utils.py:443
streamable_http_url = await get_project_streamable_http_url(user_starter_folder.id)
# Prepare server config (similar to new project creation)
if default_auth.get("auth_type", "none") == "apikey":
command = "uvx"
args = [
*mcp_sdk_constraint_args(),
"mcp-proxy",
"--transport",
"streamablehttp",
"--headers",
"x-api-key",
unmasked_api_key.api_key,
streamable_http_url,
]
elif default_auth.get("auth_type", "none") == "oauth":
msg = "OAuth authentication is not yet implemented for MCP server creation during project creation."
logger.warning(msg)
raise HTTPException(status_code=501, detail=msg)
else: # default_auth_type == "none"
# No authentication - direct connection
command = "uvx"
args = [
*mcp_sdk_constraint_args(),
"mcp-proxy",
"--transport",
"streamablehttp",
streamable_http_url,
]
server_config = {"command": command, "args": args}
# Add to user's MCP servers configuration
await logger.adebug(f"Adding MCP server '{server_name}' for user {user.username}")
await update_server(
server_name,
server_config,
user,View on GitHub (pinned to 976ec789d2)
Solutions
- Change the MCP server's auth_type to 'apikey' (supported: proxy forwards x-api-key) or 'none' and retry project creation
- Front the streamable-http MCP endpoint with an external OAuth broker yourself, then use 'none' for the internal hop
- Track upstream releases for OAuth MCP support instead of retrying — retrying unchanged will keep returning 501
Example fix
// before
"default_auth": {"auth_type": "oauth"}
// after
"default_auth": {"auth_type": "apikey", "api_key": "..."} Defensive patterns
Strategy: fallback
Validate before calling
SUPPORTED_MCP_AUTH = {"none", "apikey"}
def mcp_auth_supported(server_def: dict) -> bool:
return server_def.get("default_auth", {}).get("auth_type", "none") in SUPPORTED_MCP_AUTH Try / catch
try:
create_project(template)
except HTTPStatusError as e:
if e.response.status_code == 501 and "OAuth" in e.response.text:
for s in template["mcp_servers"]:
s.setdefault("default_auth", {})["auth_type"] = "apikey"
create_project(template) # retry with supported auth
else:
raise Prevention
- Template-validate auth_type against the supported set before calling project creation
- Never ship oauth MCP configs against this server version; gate them by feature detection
- Front oauth-protected endpoints with an external broker and use none/apikey for the internal hop
When it happens
Trigger: POST project-creation (or project-from-template) API whose MCP server definition sets default_auth.auth_type='oauth'; config_utils.py hits the oauth branch, logs, and raises HTTPException(501).
Common situations: Importing a project template authored for a newer/enterprise Langflow that supports OAuth MCP; hand-writing an mcp config with oauth expecting the proxy to handle the token dance.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
Related errors
- Failed to reload bundle
- Failed to download files: ${response.statusText}
- Invalid file type
- Project owner not found
- This project is configured for OAuth authentication, but the
AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14).
Data as JSON: /api/errors/ed31cbaf57798933.
Report an issue: GitHub.