In a new report, the IMF says governments should use the current strong economic growth to strengthen their finances.
The organisation also says that risks to global financial stability have increased.
It does, however, also say that the banking sector has become more resilient since the global financial crisis.
The IMF's assessment of the general economic outlook, published on Tuesday, was fairly upbeat for the near term.
But it did note there are risks, some of which are set out more fully in two reports just out, one on the stability of the financial system and the other focusing specifically on government finances around the world.
On governments, the IMF says "decisive action is needed now". It argues that by improving their finances when economic performance is strong, governments will have more scope to use tax cuts or increases in public spending to combat a future downturn.
Acting now also means they are less likely to have difficulty borrowing the money they need when the economy weakens.
There is criticism, in carefully chosen language, of the US, where President Donald Trump's administration is embarking on tax cuts at a time when the IMF judges the economy is close to full employment.
Policy there, the IMF says, "should be recalibrated to ensure that the government debt-to-GDP ratio declines over the medium term". That strongly implies a view that US should be moving in almost exactly the opposite direction to what it currently plans.
There is also a warning about risks of global financial instability. That is partly, though not only, about rising government debts.
Rising inflation and central banks' responses with higher interest rates could aggravate debt problems and could also hit the prices of financial assets.
There's a particular warning about China. The large scale and opaque nature of the financial system pose a risk to stability, the IMF says.
That said, the report also notes that Chinese banks have reduced their use of risky short-term borrowing, in response to tighter regulation.
The report also judges that the global banking system is stronger now than it was at the time of the crisis. But it adds that reforms need to continue.
One encouraging point is the IMF's views that crypto-assets - the likes of Bitcoin - do not currently appear to pose any risk to financial stability. But they could do if they become more widely used.
It says the technology behind these assets has the potential to make financial markets work more efficiently.
Source: BBC News