MailSurgeon core feature, the 'Query Editor', connects directly to your application, allowing you to build mailing lists straight from your database, based on the logic only you know.
The basic setup process should take about 3 minutes. However, if you'd like your 'Query Editor' to be super-usable, spend some time with your database administrator to customize it for your needs.