Skip to content

MPF commands

MPF offers multiple command-line commands. Almost all of those commands should be executed from within your MPF machine folder. If you want to run a command not inside your machine folder, you may include the path to the game folder as the first argument after the command name, BEFORE any of the dashed options.

Each of the following commands can take a variety of options, which have been omitted on this page to simplify the represented workflow steps. See the specific command reference pages to determine which command line options you will need for your particular use cases.

Commands for starting your game

To start the MPF game engine as well as the media controller, you can use:

$ mpf both

Alternatively your can run MPF and MC separately:

$ mpf game

and in another shell window:

$ mpf mc

Note: MPF MC is the media controller used before MPF 0.80. For MPF GMC with MPF 0.80+, see: Godot Media Controller

Commands to run alongside your game

Many commands can connect with the MPF game instance to assist with development tasks. For these, make sure your game is running (e.g. with game or both), and then run the command in another shell instance.

To start the interactive service cli, after starting your game run:

$ mpf service

To start the interactive monitor tool (which requires a separate install) run:

$ mpf monitor

Other commands

Some commands may need to be run without a running game.

If you want to see details about your hardware (while NOT running MPF in parallel):

$ mpf hardware scan

To update the firmware of your hardware controllers (if supported by your platform):

$ mpf hardware firmware_update

Full Command Reference

There are over a dozen commands for mpf, but it is also possible to run $ mpf without writing a command name at all. If you do not use any of the specific command names, you are defaulted to game.

So $ mpf by itself is the same as $ mpf game.

Optional Arguments

machine_folder

To use the machine_folder optional argument, you must include it after the command name, for example:

$ mpf game ./path/to/machine_folder -P

If you do not include this argument, your current folder will be assumed to be the machine folder.


Something missing or wrong? You can fix it!

This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?

Please help us! You can fix it yourself and be an official "open source" contributor!

It's easy! See our Beginner's guide to editing the docs.

Page navigation via the keyboard: < >

You can navigate this site via the keyboard. There are two modes:

General navigation, when search is not focused:

  • F , S , / : open search dialog
  • P , , : go to previous page
  • N , . : go to next page

While using the search function:

  • Down , Up : select next / previous result
  • Esc , Tab : close search
  • Enter : go to highlighted page in the results