LBDB is a address book database which can connect to many sources using modules (see homepage for more information), for instance mutt. It can be queried from the command line or integrated into an editor.
To enable modules edit ~/lbdbrc to something like:
MODULES_PATH="$MODULES_PATH ~/.lbdb/modules/" METHODS="m_sup m_gmail"
Put the following file, m_sup, in the directory ~/.lbdb/modules/: https://gist.github.com/4704061