Example from the Unicorn in the MM:
[SECTION]
Magic Weapons. The unicorn's weapon attacks are magical.
[TABLE="class: stats monster"]
[TR]
[TD="class: mon__stat-header-underline, colspan: 6"]Actions
[/TD]
[/TR]
[TR="class: action"]
[TD="class: mon__sect-row-inner, colspan: 6"]Multiattack. The unicorn makes two attacks: one with its hooves and one with its horn.
Hooves. Melee Weapon Attack: +7 to hit, reach 5 ft., one target. Hit: 11 (2d6 + 4) bludgeoning damage.
Horn. Melee Weapon Attack: +7 to hit, reach 5 ft., one target. Hit: 8 (1d8 + 4) piercing damage.[/TD]
[/TR]
[/TABLE]
[/SECTION]
Hooves and Horn are considered weapons for the purposes of the "Magic Weapons" trait.
Keep in mind that any creature that can wield a weapon can be given a +1 dagger or whatever to make it's attacks magical. Don't want the PCs to get hold of those? It might be that the goblin guards all have +1 goblinoid shortswords which only act magical when attuned by a goblinoid. Or a beast might have a magical collar that grants magical properties to its attacks, but loses its powers when removed from said beast. Etc.
FWIW, here's the complete (I think) list of official WotC monsters (with type, CR, and source) that possess this "Magic Weapons" trait:
Stone Giant Statue Construct 0 SKT
Merrenoloth Fiend (yugoloth) 3 MTF
Couatl Celestial 4 MM
Nimblewright Construct 4 WDH
Flesh Golem Construct 5 MM
Mezzoloth Fiend (yugoloth) 5 MM
Reduced-Threat Flesh Golem Construct 5 TftYP
Tomb Guardian Construct 5 ToA
Unicorn Celestial 5 MM
Spiked Tomb Guardian Construct 6 ToA
White Abishai Fiend (devil) 6 MTF
Air Elemental Myrmidon Elemental 7 MTF
Armanite Fiend (demon) 7 MTF
Black Abishai Fiend (devil) 7 MTF
Dhergoloth Fiend (yugoloth) 7 MTF
Earth Elemental Myrmidon Elemental 7 MTF
Fire Elemental Myrmidon Elemental 7 MTF
Oni Giant 7 MM
Water Elemental Myrmidon Elemental 7 MTF
Canoloth Fiend (yugoloth) 8 MTF
Clay Golem Construct 9 MM
Gray Slaad Aberration (shapechanger) 9 MM
Hydroloth Fiend (yugoloth) 9 MTF
Nycaloth Fiend (yugoloth) 9 MM
Reduced-Threat Clay Golem Construct 9 TftYP
Amber Golem Construct 10 CoS
Crystal Golem Construct 10 WDMM
Death Slaad Aberration (shapechanger) 10 MM
Huge Stone Golem Construct 10 SKT
Reduced-Threat Stone Golem Construct 10 TftYP
Statue of Vergadain Construct 10 WDMM
Stone Dragon Statue Construct 10 TftYP
Stone Golem Construct 10 MM
Stonecloak Construct 10 WDMM
Animated Statue of Lolth Construct 11 WDMM
Gynosphinx Monstrosity 11 MM
Sphinx of Judgment Monstrosity 11 GGR
Yagnoloth Fiend (yugoloth) 11 MTF
Arcanaloth Fiend (yugoloth) 12 MM
Ki-rin Celestial 12 VGM
Mad Golem Construct 12 WDMM
Oinoloth Fiend (yugoloth) 12 MTF
Ultroloth Fiend (yugoloth) 13 MM
Green Abishai Fiend (devil) 15 MTF
Nabassu Fiend (demon) 15 MTF
Iron Golem Construct 16 MM
Marilith Fiend (demon) 16 MM
Steel Predator Construct 16 MTF
Titivilus Fiend (devil) 16 MTF
Androsphinx Monstrosity 17 MM
Blue Abishai Fiend (devil) 17 MTF
Bael Fiend (devil) 19 MTF
Balor Fiend (demon) 19 MM
Red Abishai Fiend (devil) 19 MTF
Pit Fiend Fiend (devil) 20 MM
Astral Dreadnought Monstrosity (titan) 21 MTF
Hutijin Fiend (devil) 21 MTF
Moloch Fiend (devil) 21 MTF
Molydeus Fiend (demon) 21 MTF
Geryon Fiend (devil) 22 MTF
Zaratan Elemental 22 MTF
Baphomet Fiend (demon) 23 MTF
Empyrean Celestial (titan) 23 MM
Fraz-Urb'luu Fiend (demon) 23 MTF
Juiblex Fiend (demon) 23 MTF
Zuggtmoy Fiend (demon) 23 MTF
Graz'zt Fiend (demon, shapechanger) 24 MTF
Yeenoghu Fiend (demon) 24 MTF
Demogorgon Fiend (demon) 26 MTF
Orcus Fiend (demon) 26 MTF
Zariel Fiend (devil) 26 MTF
Tiamat Fiend 30 RoT