  We develop the multi-band BCS model of superconductivity in the ultrathin
films using the orthogonal tight-binding approximation for constructing the
electron wavefunctions. This allows for relatively simple determination of the
band structure near the Fermi level as well as the electron-electron
interaction matrix elements of the BCS type. The model is applied to the
ultrathin MgB$_2$(0001) films, for which the critical temperature values are
calculated in the thickness range 2...10 MgB$_2$ layers. The importance of the
boundary conditions is emphasised, as either boron or magnesium layers may
cover the film. It is found that films thinner than 4 layers show substantial
decrease in the critical temperature. The charge spillage outside the geometric
boundaries of the film, which is allowed in our model, suppresses $T_c$
oscillations and weakens its dependence on film covering layer composition.
