How do I add Material Output node when it does not show up automatically?
The node editor works with three different types of nodes.



By default the node editor is configured for compositing .

Change to the Material node editor :



More info: 

https://www.blender.org/manual/editors/node_editor/introduction.html#node-tree-types

https://www.blender.org/manual/editors/node_editor/editor.html