What is a MP file?
An MP file is a vector image file generated by MetaPost programming language to create pictures. Vector images created using MP file format are saved as EPS (Encapsulated PostScript) files. In addition, MetaPost comes distributed with TeX and Metafont frameworks and MP files can be generated from within the TEX and LTX files used by these applications. MP files contain drawing statements and mathematical algorithmic drawing for rendering the output EPS file. PDFTex engine can use the created EPS to generate PDF files directly.
MP File Format
MP files are saved to disc as binary files and generate EPS output when exported to output vector image file format. Drawings created using MetaPost are included in formatted form inside technical documents and journal publications created with LaTex.
MetaPost MP File Example
Following is an example, referenced from Berkeley Eductational Wiki, that contains an arrow and the letter “A” just above the middle of the arrow.
outputtemplate:="%j%c.mps"; beginfig(1); z1=(0,0); z2=(10mm,10mm); drawarrow(z1--z2); label.ulft(btex $A$ etex, .5[z1,z2]); endfig; bye