Would improvised weapons work with cantrips like Green-Flame Blade and Booming Blade?


Green-Flame Blade:

As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell’s range, otherwise the spell fails.

This states that so long as the attack is a melee attack made with a weapon, you may use this cantrip and apply its affects. I realize improvised weapon has weapon in the name, and is under the weapons category, but it would also mean that I can use a mug as an improvised weapon with Booming Blade. I see no reason why this would not work, but I’m still curious to see how others may interpret this.