It is likely that the user of a magic item must be a creature and thus that this would not work
The rules on actions are specifically the rules on "Action in Combat" and so outside of combat we fall back onto the general guidelines found on page 6:
- The DM Describes the environment.
- The players describe what they want to do.
- The DM narrates the results of the adventurers' actions.
And so it would seem that whether the magic mouth can use command words would be left up to the DM as they dictate the results of the actions.
There is no rule stating that only creatures can take actions, in fact, sentient magic items can have actions of their own. It is usually just impossible for an object to take an action but a magic mouth would perhaps be able to take actions that rely on speaking such as command words.
The section on "Activating a Magic Item" states:
Activating some magic items requires a user to do something in particular, such as holding the item and uttering a command word...
A magic item that requires the user to speak a command word
User (pun not intended) @slagmoth pointed out that when most people hear the word "user" they would assume a person and thus a creature, or at least not an object. If a user must be a creature this would automatically prevent magic mouth (and other objects) from being able to activate magic items including the Mirror of Life Trapping. This is strongest evidence that the magic mouth cannot do this.
Unfortunately items with command words use the word "you" when describing their activation. The word clearly does not mean only one specific person can control the mirror, instead anybody that knows its command words can manipulate the mirror. "You" is a general enough pronoun that it perhaps could include the magic mouth; However, it is clear that the person the magic mouth is replicating would not be activating the item, it would be the mouth itself. This is supported by the fact that magic mouth cannot provide the verbal components of a spell because verbal components are required to be said by the caster.
There is at least one problem that results from allowing the magic mouh to activate magic items:
If a magic item has a command word that cast a concentration spell typically the user of the magic item would be concentrating on the spell but in this case the magic mouth itself would have to be concentrating on the spell.
Though activating a magic item does not explicitly require the user to be a creature, attuning to a magic item does (DMG page 138):
Some magic items require a creature to form a bond with them before their magical properties can be used...
Without becoming attuned to an item that requires attunement, a creature gains only its nonmagical benefits...
Attuning to an item requires a creature to spend a short rest focused on only that item...
[T]he creature gains an intuitive understanding of how to activate any magical properties of the item, including any necessary command words...
The fact that attuning to a magic item, the method of learning its command words, requires one to be a creature is slight evidence that objects are not intended to activate magic items, but it does not help us in terms of using the actual available text.
Finally there is one particular line in the Mirror of Life Trapping's description which may provide evidence that a mouth cannot activate the mirror:
Any creature other than you that sees its reflection in the activated mirror...
In a standard English reading this would imply that "you" refers to a creature but it does not explicitly require this to be the case so this argument is very slight.
Overall we have three pieces of evidence pointing towards the magic mouth not being allowed to do this:
A user is unlikely to be interpreted so that objects qualify.
This would create some odd scenarios such as having a magic mouth concentrate on spells cast from magic items.
Attunement, a related mechanic, explicitly requires one to be a creature.