Preheat oven to 350°F (175°C).
Mix graham cracker crumbs and melted butter in a bowl. Press into a pie dish to form the crust.
Bake crust for 10 minutes. Let cool.
In a saucepan, combine sugar, cocoa, cornstarch, and salt. Gradually whisk in milk.
Cook over medium heat, stirring constantly, until mixture thickens and boils. Boil for 1 minute.
Remove from heat. Gradually whisk half of the hot mixture into beaten egg yolks, then return to saucepan.
Cook for 2 more minutes, stirring constantly. Remove from heat and stir in butter and vanilla.
Pour filling into crust. Chill for at least 4 hours before serving.