Sealing up "end grain" on MDF is not a task for liquids of any kind, they will continue to soak in and cause some degree of swelling of the edges. I recommend using a caulk (a paintable caulk). I have used that appliance paint on plywood bathroom cabinet doors; primer, spray, sand, spray, sand...