The influence of anisotropy on the transport current in MgB2 polycrystalline bulk samples and wires is discussed. A model for the critical current density is proposed, which is based on anisotropic London theory, grain boundary pinning and percolation theory. The calculated currents agree convincingly with experimental data and the fit parameters, especially the anisotropy, obtained from percolation theory agree with experiment or theoretical predictions.