The exact equations for surface waves over an uneven bottom can be formulated as a Hamiltonian system, with the total energy of the fluid as Hamiltonian. If the bottom variations are over a length scale L that is longer than the characteristic wavelength ¿, approximating the kinetic energy for the case of "rather long and rather low" waves gives Boussinesq type of equations. If in the case of an even bottom one restricts further to uni-directional waves, the Korteweg-de Vries (KdV) is obtained. For slowly varying bottom this uni-directionalization will be studied in detail in this part I, in a very direct way which is simpler than other derivations found in the literature. The surface elevation is shown to be described by a forced KdV-type of equation. The modification of the obtained KdV-equation shares the property of the standard KdV-equation that it has a Hamiltonian structure, but now the structure map depends explicitly on the spatial variable through the bottom topography. The forcing is derived explicitly, and the order of the forcing, compared to the first order contributions of dispersion and nonlinearity in KdV, is shown to depend on the ratio between ¿ and L; for very mild bottom variations, the forcing is negligible. For localized topography the effect of this forcing is investigated. In part II the distortion of solitary waves will be studied.