Other conditions that can cause visible mucus in the stool include bacterial infections, anal fissures, a bowel obstruction, or Crohn's disease (the second main form of IBD). Mucus is a clear, white, or yellow substance with the consistency of jelly that is produced by the mucus membrane of the large intestine. Mucus is also produced by other organs in the body, such as the lungs, where it helps to trap any foreign particles that are inhaled. In the intestines, mucus protects the inner lining and because it is slippery, it helps ease along the passage of stool.