We have an API. It's a streaming websocket/JSON API, you connect to running MT and can get market data, trade, set up alerts, get notified when alerts fire, etc.
https://docs.google.com/document/d/15IvYQEYzSeftTSEdVhsptAguM0fGm9mTJFSDDAK7zWE
... which reminds me I gotta finish prettying the doc up.