A qualified charitable distribution (QCD) can only be taken from a traditional or Roth IRA. It cannot be taken from a SEP or SIMPLE-IRA. However, SEPs and SIMPLE-IRAs can be rolled over to an IRA and then QCDs can be taken from the IRA.
This is generally adjusted gross income increased by certain items such as tax-free foreign earned income. MAGI usually is used to determine phaseouts of certain deductions and credits.