The rheological characteristics of gastric and duodenal mucin solutions, the building blocks of the mucus layer that covers the epithelia of the two organs, were investigated using particle tracking microrheology. We used biochemically well characterized purified porcine mucins (MUC5AC and MUC2) as models for human mucins, to probe their viscoelasticity as a function of mucin concentration and pH. Furthermore, we used both reducing (dithiothreitol, DTT) and chaotropic agents (guanidinium chloride and urea) to probe the mesoscopic forces that mediate the integrity of the polymer network. At neutral pH both gastric and duodenal mucins formed self-assembled semi-dilute networks above a certain critical mucin concentration (c*) with the viscosity (η) scaling as η∼c(0.53±0.08) for MUC5AC and η∼c(0.53±0.06) for MUC2, where c is the mucin concentration. Above an even higher mucin concentration threshold (ce , the entanglement concentration) reptation occurs and there is a dramatic increase in the viscosity scaling, η∼c(3.92±0.38) for MUC5AC and η∼c(5.1±0.8) for MUC2. The dynamics of the self-assembled comb polymers is examined in terms of a scaling model for flexible polyelectrolyte combs. Both duodenum and gastric mucin are found to be pH switchable gels, gelation occurring at low pHs. There is a hundred-fold increase in the elastic shear modulus once the pH is decreased. The addition of DTT, guanidinium chloride and urea disassembles both the semi-dilute and gel structures causing a large increase in the compliance (decrease in their shear moduli). Addition of the polyphenol EGCG has a reverse effect on mucin viscoelasticity, that is, it triggers a sol-gel transition in semi-dilute mucin solutions at neutral pH.