We present the description and initial results of the TRAPUM (TRAnsients And PUlsars with MeerKAT) search for pulsars associated with supernova remnants (SNRs), pulsar wind nebulae and unidentified TeV emission. The list of sources to be targeted includes a large number of well-known candidate pulsar locations but also new candidate SNRs identified using a range of criteria. Using the 64-dish MeerKAT radio telescope, we use an interferometric beamforming technique to tile the potential pulsar locations with coherent beams which we search for radio pulsations, above a signal-to-noise of 9, down to an average flux density upper limit of 30 μJy. This limit is target-dependent due to the contribution of the sky and nebula to the system temperature. Coherent beams are arranged to overlap at their 50 per cent power radius, so the sensitivity to pulsars is not degraded by more than this amount, though realistically averages around 65 per cent if every location in the beam is considered. We report the discovery of two new pulsars; PSR J1831−0941is an adolescent pulsar likely to be the plerionic engine of the candidate PWN G20.0+0.0, and PSR J1818−1502appears to be an old and faint pulsar that we serendipitously discovered near the centre of a SNR already hosting a compact central object. The survey holds importance for better understanding of neutron star birth rates and the energetics of young pulsars.