1) In principle, the MSCA are open to researchers of all nationalities.
2) However, EU restrictive measures in place against a number of countries, which are all listed here: http://eeas.europa.eu/cfsp/sanctions/docs/measures_en.pdf
3) Most sanctions are enacted through EU Regulations, which are directly applicable, i.e. individual beneficiaries need to ensure compliance with them.
4) However, just because a researcher is a national of a specific country which is targeted by EU sanctions does not mean that he/she cannot be recruited or participate in the project:
First of all, many sanctions refer to 'residents', as opposed to 'nationals' of a certain country, meaning that a citizen of a particular country would not be targeted by sanctions if he/she has not been living in this country for some time. Conversely, this also means that also nationals of other countries can be targeted by EU sanctions, if they were resident in a particular country targeted by sanctions.
Therefore, in fact, a beneficiary would need to check on a case-by-case basis if the research project it undertakes and the researcher it recruits complies with EU restrictive measures.
Please note that in various EU sanctions, the part that would most likely apply to MSCA projects would be the prohibition on 'technical assistance' (defined as: "any technical support related to repairs, development, manufacture, assembly, testing, maintenance, or any other technical service, and may take forms such as instruction, advice, training, transmission of working knowledge or skills or consulting services; including verbal forms of assistance;") concerning certain sensitive technologies.
This would mean, in a concrete case e.g. concerning Iran, that a beneficiary would need to look into the Iran sanctions (Regulation 267/2012; http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2012:088:0001:0112:EN:PDF) and 1) see if the research project is dealing with the technology listed in the annexes on which there is a prohibition of technical assistance and then 2) to see if the researcher in question must be considered an Iranian resident or not.
In case of doubt, best to contact the competent national authorities (all listed in the relevant sanctions documents, for Iran e.g. the last pages of Regulation 267/2012).