The result of a search for flavor changing neutral currents (FCNC) through single top quark production in association with a photon is presented. The study is based on proton-proton collisions at a center-of-mass energy of 8 TeV using data collected with the CMS detector at the LHC, corresponding to an integrated luminosity of 19.8 fb(-1). The search for t gamma events where t -> Wb and W -> mu nu is conducted in final states with a muon, a photon, at least one hadronic jet with at most one being consistent with originating from a bottom quark, and missing transverse momentum. No evidence of single top quark production in association with a photon through a FCNC is observed. Upper limits at the 95% confidence level are set on the tu gamma and tc gamma anomalous couplings and translated into upper limits on the branching fraction of the FCNC top quark decays: B (t -> u gamma) < 1.3 x 10(-4) and B(t -> c gamma) < 1.7 x 10(-3). Upper limits are also set on the cross section of associated t gamma production in a restricted phase-space region. These are the most stringent limits currently available.