We present a search for the decays of a neutral scalar boson produced by kaons decaying at rest, in the context of the Higgs portal model, using the MicroBooNE detector. We analyze data triggered in time with the Fermilab NuMI neutrino beam spill, with an exposure of $1.93times10^{20}$ protons on target. We look for monoenergetic scalars that come from the direction of the NuMI hadron absorber, at a distance of 100 m from the detector, and decay to electron-positron pairs. We observe one candidate event, with a Standard Model background prediction of $1.9pm0.8$. We set an upper limit on the scalar-Higgs mixing angle of $theta<(3.3-4.6)times10^{-4}$ at the 95% confidence level for scalar boson masses in the range $(100-200)$ MeV$/c^2$. We exclude at the 95% confidence level the remaining model parameters required to explain the central value of a possible excess of $K^0_Lrightarrowpi^0 ubar{ u}$ decays reported by the KOTO collaboration.