This study presents a tool for solving the Optimal Power Flow (OPF) problem in mixed Direct Current (DC) and Alternating Current (AC) systems. It allows to analyse the optimal operation of multiple independent systems, DC connected and linked to the AC system, from a steady state point of view and for several objective functions. The tool, implemented through implemented through MATLAB® Optimization toolbox is benchmarked with another OPF tool, implemented in MATPOWER®. Both tools lead to the same results for the system analysed when minimising losses and one minimising the deviation from a preset voltage profile. A sensitivity analysis is performed to assess the influence of DC and AC grid parameters on the operation of the system.