mu-server - Man Page

the mu backend for the mu4e e-mail client


mu [common-options] server


mu server starts a simple shell in which one can query and manipulate the mu database. The output uses s-expressions. mu server is not meant for use by humans, except for debugging purposes. Instead, it is designed specifically for the mu4e e-mail client.

In this man-page, we document the commands mu server accepts, as well as their responses. In general, the commands sent to the server are s-expressions of the form:

(<command-name> :param1 value1 :param2 value2)

For example, to view a certain message, the command would be:

(view :docid 12345)

Parameters can be sent in any order; they must be of the correct type though. See lib/utils/mu-sexp-parser.hh and lib/utils/ in source-tree for the details.

Output Format

mu server accepts a number of commands, and delivers its results in the form:


\376 (one byte 0xfe), followed by the length of the s-expression expressed as an hexadecimal number, followed by another \377 (one byte 0xff), followed by the actual s-expression.

By prefixing the expression with its length, it can be processed more efficiently. The \376 and \377 were chosen since they never occur in valid UTF-8 (in which the s-expressions are encoded).

Server Options


List available commands (and try with --verbose)

--eval <expression>

Evaluate a mu4e server s-expression


use a non-default directory to store and read the database, write the logs, etc. By default, mu uses the XDG Base Directory Specification (e.g. on GNU/Linux this defaults to ~/.cache/mu and ~/.config/mu). Earlier versions of mu defaulted to ~/.mu, which now requires --muhome=~/.mu.

The environment variable MUHOME can be used as an alternative to --muhome. The latter has precedence.

Common Options

-d, --debug

makes mu generate extra debug information, useful for debugging the program itself. By default, debug information goes to the log file, ~/.cache/mu/mu.log. It can safely be deleted when mu is not running. When running with --debug option, the log file can grow rather quickly. See the note on logging below.

-q, --quiet

causes mu not to output informational messages and progress information to standard output, but only to the log file. Error messages will still be sent to standard error. Note that mu index is much faster with --quiet, so it is recommended you use this option when using mu from scripts etc.


causes mu to not output log messages to standard error, in addition to sending them to the log file.


do not use ANSI colors. The environment variable NO_COLOR can be used as an alternative to --nocolor.

-V, --version

prints mu version and copyright information.

-h, --help

lists the various command line options.

Reporting Bugs

Please report bugs at


Dirk-Jan C. Binnema <>

See Also


Referenced By