The rapid pace of urbanization has brought about a plethora of challenges for urban communities, prompting the advocacy of collaborative governance as a means to tackle management issues effectively. However, fostering strong collaboration among multiple governance entities remains a significant hurdle in urban communities governance. This study addresses this challenge by exploring the complex structure of urban communities' collaborative governance systems, with a focus on enhancing collaborative governance capability. Drawing on Bayesian network (BN) theory and utilizing the case of Jinan, this article investigates the intrinsic mechanisms of achieving collaboration in urban communities. This study establishes a Bayesian network model for collaborative governance of urban communities, providing a visual representation of the intricate interactions among multiple governance entities. We employ a data-knowledge-driven approach for BN structure learning. This approach tackles issues such as the lack of cyclic dependency capability and the impact of small datasets on model accuracy. Furthermore, we analyze the collaborative mechanism through Bayesian reasoning. The findings underscore the pivotal entities and five key factors that significantly influence collaborative governance capability. Lastly, policy implications are drawn to enhance the collaborative governance capability of urban communities.