Adaptive immunity recognises and responds to tumours, although they are part of the immunological 'self'. T cells, both CD4+ and CD8+ play a key role in the process, and the specific set of receptors which recognise tumour antigens therefore has the potential to provide prognostic biomarkers for tracking tumour growth after cancer therapy, including immunotherapy. Most published data on the T cell repertoire continues to rely on commercial proprietary methods, which often do not allow access to the raw data, and are difficult to validate. We describe an open-source protocol for amplifying, sequencing and analysing T cell receptors which is economical, robust, sensitive and versatile. The key experimental step is the ligation of a single stranded oligonucleotide to the 3' end of the T cell receptor cDNA, which allows easy amplification of all possible rearrangements using only a single set of primers per locus, while simultaneously introducing a unique molecular identifier to label each starting cDNA molecule. After sequencing, this molecular identifier can be used to correct both sequence errors and the effects of differential PCR amplification efficiency, thus producing a more accurate measure of the true T cell receptor frequency within the sample. Samples are then tagged with unique pairs of indices, facilitating robotic scale-up and significantly reducing cross-sample contamination from index hopping. This method has been applied to the analysis of tumour infiltrating lymphocytes and matched peripheral blood samples from patients with a variety of solid tumours.