This paper presents design and dispatch optimization models of a solid-oxide fuel cell (SOFC) assembly for unconventional oil and gas production. Fuel cells are galvanic cells which electrochemically convert hydrocarbon-based fuels to electricity. The Geothermic Fuel Cell (GFC) concept involves utilizing heat from fuel cells during electricity generation to provide thermal energy required to pyrolyze kerogen into a mixture of oil, hydrocarbon gas and carbon-rich shale coke. We formulate a continuous, non-convex nonlinear program (NLP) in A Mathematical Programming Language (AMPL) to analyze the techno-economic characteristics of the GFC system. The problem is separated into a design model $$({{\mathcal {D}}})$$ and a dispatch model $$({{\mathcal {O}}})$$ . The GFC design problem determines the size and configuration of a single heater well. Specifically, we optimize the heater length and number of SOFC stacks in each assembly such that the maximum volume of oil shale is heated per well. Using the resulting design from $$({{\mathcal {D}}})$$ , the dispatch model $$({{\mathcal {O}}})$$ determines daily GFC operating conditions through variation in electric current, fuel utilization, and stoics of excess air. We optimize the system operating costs and the combined-heat-and-power efficiency, subject to geology heating demands, auxiliary component electric power demands and GFC system performance characteristics. Solutions to the design and dispatch problems are obtained using the IPOPT and KNITRO solvers. A case study shows that the optimal well-head cost of oil and gas produced using the GFC technology is about $39 bbl $$^{-1}$$ , which is comparable to that from other unconventional crude oil extraction techniques. The optimal dispatch strategy results in a maximum heating efficiency of 43% and a combined-heat-and-power efficiency of 79%. The Geothermic Fuel Cell’s performance is better than current in situ upgrading technologies that rely on electricity supplied from the grid at generation-and-transmission efficiencies near 33%.