We know that many important graphical structures in the world (biological networks, computing and communication networks, resource grids, lattices in physics, etc) are not tree-like, and that processes on graphs are affected significantly by the presence of short loops. It is therefore problematic that most of our tools and algorithms for analysing (processes on) finitely connected graphs, such as cavity methods, belief propagation type algorithms, and conventional replica analyses, require topologies that are locally tree-like. Some were extended with small loop corrections, but all tend to fail for graphs with many short loops. In this talk I present preliminary results of a new statistical mechanics method that is designed to handle analytically ensembles of large random graphs with prescribed degree sequences and prescribed loop statistics (via their adjacency spectra). It produces explicit closed equations in the infinite size limit, leading to Shannon entropies for ensembles of loopy graphs, and to solutions of models describing processes on such graphs. The familiar equations describing tree-like graphs are recovered as a simple limiting case.