Hello,
Are You after this one?
https://www.cisco.com/c/en/us/td/docs/ios/iproute_bgp/command/reference/irg_book/irg_bgp4.html
set metric-type internal
To set the Multi Exit Discriminator (MED) value on prefixes advertised to external BGP (eBGP) neighbors to match the Interior Gateway Protocol (IGP) metric of the next hop
The JUNOS equivalent is:
set policy-options policy-statement IGP->MED term t1 then metric igp set protocols bgp group ebgp export IGP->MED
Also, if You are exporting IGP prefixes into BGP, the MED == IGP cost will be set automatically without any policy.
HTH
Thx
Alex