We study the effects of an $ab$ surface on the vortex-solid to vortex-liquid transition in layered superconductors in the limit of vanishing interlayer Josephson coupling. We derive the interaction between pancake vortices in a semi-infinite sample and adapt the density functional theory of freezing to this system. We obtain an effective one-component order-parameter theory which can be used to describe the effects of the surface on vortex-lattice melting. Due to the absence of protecting layers in the neighborhood of the surface, the vortex lattice formed near the surface is more susceptible to thermal fluctuations. Depending on the value of the magnetic field, we predict either a continuous or a discontinuous surface melting transition. For intermediate values of the magnetic field, the surface melts continuously, assisting the formation of the liquid phase and eliminating the hysteresis above the melting transition, a prediction consistent with experimental results. For very low and very high magnetic fields, the surface melts discontinuously. The two different surface melting scenarios are separated by two surface multicritical points, which we locate on the melting line.