A better question might be, should you run a marathon barefoot? Firstly, yes you can run a marathon barefoot. Abebe Bikala did that on 10 September 1960 at the Rome Olympics, winning the gold medal without shoe. Abebe was a last minute addition to the Ethiopian team for the marathon and the team did not have the sponsors shoes available in his size, so he just did it barefoot. He certainly showed that it could be done and there have been other examples of other runners since then who have run a marathon barefoot. Abebe Bikala was certainly adopted as somewhat of a hero for the recent short lived barefoot running fad. It did not matter to them that he went on to wind the following Olympic gold medal in Tokyo 4 years later, this time wearing running shoes and running faster.
As to the question if you should, then that is a different answer. Those who tend to run marathons barefoot tend to do so to make a point, so there is no harm in that. The important point is that you need to be well adapted to running barefoot. A marathon is hard and brutal on the body. It will be hard on the feet and if those feet are used to running in shoes, then it will be even harder on the feet if you want to do a marathon barefoot. A period of transition in the training is needed to adapt the feet to those loads. You will probably finish a marathon slower without shoes. Now we have shoe that have energy returning foams and carbon fiber plates that make the running more economical and return energy following the ground strike. The same goes for barefoot as these shoes, you need to be adapted to running in them before the marathon.