  A search is presented for the lepton flavour violating decay $B^+ \rightarrow
K^+ \mu^- \tau^+$ using a sample of proton--proton collisions at centre-of-mass
energies of 7, 8, and 13 TeV, collected with the LHCb detector and
corresponding to a total integrated luminosity of 9 fb${}^{-1}$. The $\tau$
leptons are selected inclusively, primarily via decays with a single charged
particle. The four-momentum of the $\tau$ lepton is determined by using $B^+$
mesons from $B_{s2}^{*0} \rightarrow B^+ K^-$ decays. No significant excess is
observed, and an upper limit is set on the branching fraction $B(B^+
\rightarrow K^+ \mu^- \tau^+) < 3.9 \times 10^{-5}$ at 90% confidence level.
The obtained limit is comparable to the world-best limit.
