BackgroundBiliary tract cancer stands as a prevalent illness, posing significant risks to human health, where immune cells are pivotal in both its development and recovery processes. Due to the diverse functionalities exhibited by different immune cell phenotypes within the organism, and the relatively limited research on their relationship with biliary tract cancer, this study employed Mendelian randomization (MR) to explore their potential association, thereby aiding in a better understanding of the causal link between immune cell phenotypes and biliary tract cancer.MethodsIn this study, the causative association of 731 immunophenotype with biliary tract cancer was established using publicly accessible genome-wide association study (GWAS) genetic data through two-sample MR analysis. Sensitivity analyses assess horizontal pleiotropy and heterogeneity of the study findings.ResultsAmong the 731 immunophenotypes examined, a total of 26 immune cell phenotypes were found to exhibit positive results, indicating a significant association with the risk of biliary tract cancer. We confirmed that among these 26 types of immune cells, there are primarily 13 types of B cells; three types of classical dendritic cells (CDCs), including CD80 on myeloid DC, HLA DR on myeloid DC, and Myeloid DC %DC; one type of mature stage T cell,CD4RA on TD CD4+; six types of regulatory T cells; and three types of myeloid cells.