langflow-ai/langflow · warning · ValueError

Unsupported operating system for Claude configuration

Error message

Unsupported operating system for Claude configuration

What it means

Raised by get_config_path() in Langflow's MCP projects API when the requested client is 'claude' but the operating system is neither Darwin nor Windows/WSL. The Claude Desktop config path is only implemented for macOS (~/Library/Application Support/Claude), regular Windows (%APPDATA%), and WSL; on any other platform — plain Linux, FreeBSD, etc. — the function refuses with this ValueError because Claude Desktop does not ship for those systems.

Source

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

                        ]
                        if user_dirs:
                            return user_dirs[0] / "AppData" / "Roaming" / "Claude" / "claude_desktop_config.json"

                    if not Path("/mnt/c").exists():
                        msg = "Windows C: drive not mounted at /mnt/c in WSL"
                        raise ValueError(msg)

                    msg = "Could not find valid Windows user directory in WSL"
                    raise ValueError(msg)
                except (OSError, CalledProcessError) as e:
                    await logger.awarning("Failed to determine Windows user path in WSL: %s", str(e))
                    msg = f"Could not determine Windows Claude config path in WSL: {e!s}"
                    raise ValueError(msg) from e
            # Regular Windows
            return Path(os.environ["APPDATA"]) / "Claude" / "claude_desktop_config.json"

        msg = "Unsupported operating system for Claude configuration"
        raise ValueError(msg)

    msg = "Unsupported client"
    raise ValueError(msg)


def remove_server_by_urls(config_data: dict, urls: Sequence[str] | str) -> tuple[dict, list[str]]:
    """Remove any MCP servers that use one of the specified URLs from config data.

    Returns:
        tuple: (updated_config, list_of_removed_server_names)
    """
    normalized_urls = _normalize_url_list(urls)
    if not normalized_urls:
        return config_data, []

    if "mcpServers" not in config_data:
        return config_data, []

View on GitHub (pinned to 976ec789d2)

Solutions

  1. Use a supported client for Linux environments: get_config_path supports 'cursor' (~/.cursor/mcp.json) and 'windsurf' (~/.codeium/windsurf/mcp_config.json), which work on plain Linux.
  2. If you need Claude Desktop integration, run Langflow (or the config-writing step) on the Windows/macOS host where Claude Desktop is installed, or from WSL so the Windows path resolution applies.
  3. If your environment is WSL but the release string lacks 'microsoft' (rare custom kernels), fix the detection by ensuring you are in a real WSL kernel, or patch is_wsl detection to also check for /proc/sys/fs/binfmt_misc/WSLInterop.

Example fix

# before
path = await get_config_path("claude")  # raises on plain Linux

# after
client = "cursor" if platform.system() == "Linux" else "claude"
path = await get_config_path(client)
Defensive patterns

Strategy: type-guard

Validate before calling

import platform

def claude_client_supported_on_this_os() -> bool:
    os_type = platform.system()
    is_wsl = os_type == "Linux" and "microsoft" in platform.uname().release.lower()
    return os_type in {"Darwin", "Windows"} or is_wsl

Type guard

SUPPORTED_CLIENTS_BY_OS = {
    "Darwin": {"cursor", "windsurf", "claude"},
    "Windows": {"cursor", "windsurf", "claude"},
    "Linux": {"cursor", "windsurf"},  # claude only when WSL
}

def client_supported(client: str, os_type: str, is_wsl: bool) -> bool:
    key = "Windows" if (os_type == "Windows" or is_wsl) else os_type
    return client.strip().lower() in SUPPORTED_CLIENTS_BY_OS.get(key, set())

Try / catch

try:
    path = await get_config_path(client)
except ValueError as e:
    if "Unsupported operating system" in str(e):
        # pick a Linux-capable client or skip silently
        path = await get_config_path("cursor")
    else:
        raise

Prevention

When it happens

Trigger: Calling get_config_path("claude") on a Linux host where platform.uname().release does not contain 'microsoft' (bare Linux server, Docker container, CI runner) — os_type is 'Linux', is_wsl is False, so neither the Windows/WSL branch nor Darwin matches and the raise at mcp_projects.py:1288 fires.

Common situations: Deploying Langflow on a Linux VM/container and expecting the Claude client check/install endpoints to work; developers on Linux desktops testing the MCP client-configuration API with client='claude'; CI pipelines that exercise MCP routes against Linux runners.

Related errors


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