We reconcile the Hamiltonian formalism and the zero curvature representation in the approach to integrable boundary conditions for a classical integrable system in 1 + 1 space-time dimensions. We start from an ultralocal Poisson algebra involving a Lax matrix and two (dynamical) boundary matrices. Sklyanin's formula for the double-row transfer matrix is used to derive Hamilton's equations of motion for both the Lax matrix and the boundary matrices in the form of zero curvature equations. A key ingredient of the method is a boundary version of the Semenov-Tian-Shansky formula for the generating function of the time-part of a Lax pair. The procedure is illustrated on the finite Toda chain for which we derive Lax pairs of size 2 × 2 for previously known Hamiltonians of type BC N and D N corresponding to constant and dynamical boundary matrices respectively.