In all suits in equity and in all actions or proposed actions at law, whether arising ex contractu or ex delicto, it shall be lawful for an attorney at law either before suit or action is brought, or after suit or action is brought, to contract with his client for legal services rendered or to be rendered him for a certain portion or percentage of the proceeds of any settlement of his client's claim or cause of action, either before the institution of suit or action, or at any stage after the institution of suit or action, and upon notice in writing by the attorney who has made such agreement with his client, served upon the defendant or defendants, or proposed defendant or defendants, that he has such an agreement with his client, stating therein the interest he has in such claim or cause of action, then said agreement shall operate from the date of the service of said notice as a lien upon the claim or cause of action, and upon the proceeds of any settlement thereof for such attorney's portion or percentage thereof, which the client may have against the defendant or defendants, or proposed defendant or defendants, and cannot be affected by any settlement between the parties either before suit or action is brought, or before or after judgment therein, and any defendant or defendants, or proposed defendant or defendants, who shall, after notice served as herein provided, in any manner, settle any claim, suit, cause of action, or action at law with such attorney's client, before or after litigation instituted thereon, without first procuring the written consent of such attorney, shall be liable to such attorney for such attorney's lien as aforesaid upon the proceeds of such settlement, as per the contract existing as herein provided between such attorney and his client.
§ 484.140, RSMo