set query_command="~/.mutt/addgrep.sh '%s'").
It can be any program, and one is widely recommended: rolo.
Below is very short, basic script, but complex enough for me:
if [[ $# < 1 ]]
echo 'Grepping ~/.mutt/address_book.txt...'
grep $1 ~/.mutt/address_book.txt
The structure of address book is as follow:
First Sure <firstname.lastname@example.org>
"All variants" <email@example.com>