You can directly access this as follows:
from datasets import load_dataset

dataset = load_dataset("glue", "mrpc")

labels = dataset["train"].features["label"].names

id2label = {idx: label for idx, label in enumerate(labels)}
label2id = {label: idx for idx, label in enumerate(labels)}