In order to improve the overall performance and practicability of MFC, anode materials with excellent conductivity, good corrosion resistance, large specific surface area and good biocompatibility should be selected. Modification can not only provide a large specific surface area and good biocompatibility for the growth of biofilm, but also make the anode surface easier for microbial colonization and substrate transfer, thus greatly reducing the polarization loss. Polyaniline (PANI) and polypyrrole (PPy), as the two most popular conductive polymers, can significantly reduce the internal resistance of the reactor and reduce the electron transfer impedance. It shows excellent performance in the process of electron transfer, and the synthesis method is relatively simple, so it is widely used in the study of MFC anode material modification.In this paper, polyaniline and polypyrrole were combined to construct a composite hydrogel electrode with aniline and pyrrole monomers at different molar ratios, forming a composite electrode with an inner layer of carbon cloth (CC) material and an outer layer of hydrogel material with good electrical conductivity. The electrochemical performance and power generation performance of the electrode were tested by various characterization and testing techniques. Different comparative experiments were used to optimize the electrode preparation conditions and determine the optimal doping ratio.