We perform first-principles pseudopotential calculations to investigate the dielectric response for MgB2, and calculate the Coulomb repulsion parameter mu(*) using the full dielectric matrix approach. The calculated value for mu(*) is 0.118 when the Debye energy omega(D) of MgB2 is used for the phononic cutoff energy omega(c), while mu(*)=0.151 for omega(c)=0.5 eV. We find that the local-field effect is significant due to the covalent nature of chemical bonds, enhancing the dielectric screening and thereby reducing the Coulomb repulsion parameter. In addition, due to the small density of states at the Fermi level, the value of mu(*) is smaller than those obtained from first principles for Nb and Li. We also examine the anisotropy of the Coulomb repulsion mu(k,k(')) on the Fermi surface, and find that the repulsions between the sigma and pi bands are much smaller than those within the sigma and pi bands.