Don't worry and don't stop the mucous as it is a defense mechanism against infection and as a response to noxious agents and allergic particles in the air.
It is good for you in the short term and shouldn't be suppressed.
Many people would "die" for a productive cough.
I don't know enough about your chest condition, or length of suffering to offer any advice, although if it is long standing, you would have been seen by a Respiratory Physician.
The causes of mucous production in the lungs is multiple, but probably the commonest cause is chronic bronchitis ( chronic pulmonary obstructive disease..COPD)