Target Display Mode between two MacBook Pro
Only some of the non-5k display iMacs have target display mode. No MacBooks have (yet) had that capability as part of their hardware.

You'll need to do screen sharing or some other software solution if you need it.