The recent publications of the DENIS Catalogue towards the Magellanic Clouds (MCs) with more than 1.3 million sources identified in at least two of the three DENIS filters (I J K_s) and of the incremental releases of the 2MASS point source catalogues (J H K_s) covering the same region of the sky, provide an unprecedented wealth of data related to stellar populations in the MCs. In order to build a reference catalogue of stars towards the Magellanic Clouds, we have performed a cross-identification of these two catalogues. This implied developing new tools for cross-identification and data mining. This study is partly supported by the Astrovirtel program that aims at improving access to astronomical archives as virtual telescopes. The main goal of the present study is to validate new cross-matching procedures for very large catalogues, and to derive results concerning the astrometric and photometric accuracy of these catalogues. The cross-matching of large surveys is an essential tool to improve our understanding of their specific contents. This approach can be considered as a new step towards a Virtual Observatory.