This paper proposes a grid forming Modular Matrix Converter Based Solid State Transformer for smart grids. The Modular Matrix Converter Based Solid State Transformer regulates the voltage amplitude and frequency of the low voltage grid, enabling sag and swell mitigation. Each module includes a three-phase Matrix Converter, connected to a three-phase High Frequency Transformer, whose secondaries are connected to three Single-Phase Matrix Converters. Input and output LC filters are required to guarantee nearly sinusoidal waveforms in the MV connection and in the LV grid.The three-phase Matrix Converter uses a modified High Frequency Space Vector Modulation, with a novel feature to guarantee the non-saturation of the High Frequency Transformer at 2kHz operation. To restore the waveform that would result from the original Space Vector Modulation the High Frequency Transformer is connected to three Single-Phase Matrix Converters. Combining the advantages of Matrix Converters with high frequency operation, the volume of the galvanic isolation transformer can be reduced, and using decoupled controllers, the output voltage waveforms are regulated both in amplitude and frequency, to form a low voltage grid.The proposed Modular Matrix Converter Based Solid State Transformer is simulated and the obtained results show that it is able to regulate the secondary side voltage and frequency, even in a bidirectional power flow operation scenario, allowing power factor correction in the local MV connection, and providing mitigation capability of voltage sags and swells up to 20%, therefore improving power quality in the smart grid.