The Wizard's Transmuter's Stone May Fulfill your needs
The Wizard who specializes in the School of Transmutation can, at sixth level, create a Transmuter's Stone that stores transmutation magic. You can have one active stone at a time.(PHB, p. 119)
The rules do not explicitly allow you to put a Magic Mouth or Alarm spell on it, but since you can imbue it with infravision out to 60' (explicitly provided for in that class ability), and Darkvision is a second level spell effect, you can probably convince your DM that a spell of similar or lesser power level may be imbued into this stone (Magic Mouth is a second level spell). Alarm being a first level spell may an even easier sell to your DM.
But, what if your DM is a very "RAW" sort?
The DMG (p. 129) allows for enchanting some items on (Crafting Magic Items). Since you only need to be 3d level to cast that spell, you may be able to argue for a Common or Uncommon item classification. However, since it's a sixth level class ability, a more conservative DM may call for it to be a Rare item. The cost and time to create such an item of the agreed quality is spelled out explicitly in the DMG - your DM will have his input as well (it's a Downtime Activity).
The table on page 285 of the DMG would support this being an Uncommon item with a spell power greater than 1 and less than 3 in the case of Magic Mouth, and a Common item in the case of the first level Alarm spell.
If you go the "Craft a Magic Item" route, don't bother with the Transmuter's Stone. Just work with your DM on the cost and time to make the Alarm rocks per the table on page 285, and the details on page 129.
To put an Alarm spell on one rock should take you 4 game days and 100 gp.
This answer was based primarily on the core rules (PHB, MM, DMG) but if you have / use Xanathar's Guide to Everything at your table, you could instead use Tiny Servant as explained in VictorB's most excellent answer.