A magnetocaloric cooling system comprising a solid body or bodies, such as a cylinder or cube, having a plurality of channels extending between a first end and a second end of the cylinder or cube and a magnet at least partially surrounding the cylinder or cube. A metallic mass, such as a rod or plate, is positioned within each channel and slides within a respective channel between two sliding extremities so that in each sliding extremity, a portion of each metallic mass extends beyond an end of the solid body. A motor is used for reciprocating the metallic masses between the sliding extremities and a heat exchange mechanism directs heating or cooling where desired.
 This invention was made with government support under Contract No. DE-AC05-00OR22725 awarded by the U.S. Department of Energy. The government has certain rights in the invention.