mtg-db is a Ruby gem containing data for all Magic: The Gathering cards and sets, in JSON format. The linked repository contains rake scripts to scrape new data and update the JSON files.
Spiders The Gatherer collecting info about MtG cards which are then put in an SQLite3 Db