Scroll to navigation

MU-SERVER(1) General Commands Manual MU-SERVER(1)


mu-server - 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.

(<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.


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).



List available commands (and try with --verbose)

--eval <expression>

Evaluate a mu4e server s-expression


If set, allow for the output of some commands to use temp-files rather than directly through the emacs process input/output. This is noticeably faster for commands with a lot of output, esp. when the the temp-file uses a in-memory file-system.


As an indication for the relative performance, we can simulate something mu4e does; we take overall time of 50 such requests:

time build/mu/mu server --allow-temp-file --eval '(find :query "

(and --allow-temp-file for 1.11)

release time (sec)
1.8 8.6s
1.10 5.7s
1.11 (master) 2.8s


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.


-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.


Please report bugs at


Dirk-Jan C. Binnema <>


This manpage is part of mu 1.12.5.

Copyright © 2008-2024 Dirk-Jan C. Binnema. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.