The verb goes with the subject of the sentence - and the subject in your example is "eine Menge". Since "eine Menge" is only "one", the correct form is ist.
A common mistake that's currently spreading like a virus in the German language is not to mind the number of subjects, like "Schon jetzt wird 30 Prozent der Energie von Windkrafträdern gedeckt", which is wrong, because the subject ("30 Prozent der Energie") is really a plural (1% would be singular, 2% onwards are plural), so they "werden gedeckt".
Your second sentence in the first example is actually not clear. The verb in the relative clause may either refer to the "Menge" or the "Kontextinformationen", if the relative clause is to define which "Kontextinformationen" are in the "Menge".
Die Menge der Kontextinformationen, die notwendig sind
Die Menge der Kontextinformationen, die notwendig ist
are both correct, but the first one defines which "Kontextinformatione" are in the "Menge", the second one defines that the "Menge der Kontextinformationen" is "notwendig".
The interesting question is how the sentence continues, and there the verb must refer to the "Menge"!
While
Die Menge der Kontextinformationen, die notwendig sind, ist klar definiert
Die Menge der Kontextinformationen, die notwendig ist, ist klar definiert
are both correct,
Die Menge der Kontextinformationen, die notwendig sind, sind klar definiert
Die Menge der Kontextinformationen, die notwendig ist, sind klar definiert
are both wrong.