{"record":{"id":"663f2636d8f96924","repo":"langflow-ai/langflow","slug":"mcp-configuration-can-only-be-installed-from-a-loc","errorCode":null,"errorMessage":"MCP configuration can only be installed from a local connection","messagePattern":"MCP configuration can only be installed from a local connection","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"src/backend/base/langflow/api/v1/mcp_projects.py","lineNumber":832,"sourceCode":"    if request.client:\n        return request.client.host\n\n    # Fallback if we can't determine the IP - use a non-local IP\n    return \"255.255.255.255\"  # Non-routable IP that will never be local\n\n\n@router.post(\"/{project_id}/install\")\nasync def install_mcp_config(\n    project_id: UUID,\n    body: MCPInstallRequest,\n    request: Request,\n    current_user: CurrentActiveMCPUser,\n):\n    \"\"\"Install MCP server configuration for Cursor, Windsurf, or Claude.\"\"\"\n    # Check if the request is coming from a local IP address\n    client_ip = get_client_ip(request)\n    if not is_local_ip(client_ip):\n        raise HTTPException(status_code=500, detail=\"MCP configuration can only be installed from a local connection\")\n\n    removed_servers: list[str] = []  # Track removed servers for reinstallation\n    try:\n        project = await verify_project_access(project_id, current_user)\n\n        # Check if project requires API key authentication and generate if needed\n        generated_api_key = None\n\n        # Determine if we need to generate an API key\n        should_generate_api_key = False\n        if not get_settings_service().settings.mcp_composer_enabled:\n            # When MCP_COMPOSER is disabled, check auth settings or fallback to auto_login setting\n            settings_service = get_settings_service()\n            if project.auth_settings:\n                # Project has auth settings - check if it requires API key\n                if project.auth_settings.get(\"auth_type\") == \"apikey\":\n                    should_generate_api_key = True\n            elif not settings_service.auth_settings.AUTO_LOGIN:","sourceCodeStart":814,"sourceCodeEnd":850,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/v1/mcp_projects.py#L814-L850","documentation":"Error \"MCP configuration can only be installed from a local connection\" thrown in langflow-ai/langflow.","triggerScenarios":"Occurs when an MCP configuration install is attempted from a non-local (remote) client connection.","commonSituations":"See trigger scenarios.","solutions":["Run the MCP configuration install from the same machine that hosts the Langflow server (local connection)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}