Prefectures usually require you to show that you have been living in France for five continuous years in order to qualify for a ‘permanent’ carte (usually this is without absences of more than six months).
Otherwise, you can apply for a short-term card. Living in Monaco is no different from living in the UK for this.
Under EU rules, strictly speaking, a right of permanent residency is gained automatically by an EU citizen after any five-year period in another EU country (during which they must have met certain criteria, including supporting themselves or working).
This right may not then be lost unless you leave the country for more than two years. However, French officials may not accept this and in any case it sounds as if you were away from France for longer than two years.
Applying for French nationality also usually requires a period of five continuous years living in France when you apply.
One exception is where you previously attended a French-speaking school over a period of five years or more but for this you must also have the nationality of a francophone country.
There is a reduction to two years for anyone who previously attended higher education in France for two years or more and successfully passed their course.
People who were born in France to foreign parents have a right to claim French nationality under certain conditions but these do not apply in your case.
If you have the brevet des collèges or the French baccalauréat, you do not have to take a further French test to submit an application once you qualify.