In this paper the tuned mass-damper-inerter (TMDI) is considered for passive vibration control and energy harvesting in harmonically excited structures. The TMDI couples the classical tuned mass-damper (TMD) with a grounded inerter: a two-terminal linear device resisting the relative acceleration of its terminals by a constant of proportionality termed inertance. In this manner, the TMD is endowed with additional inertia, beyond the one offered by the attached mass, without any substantial increase to the overall weight. Closed-form analytical expressions for optimal TMDI parameters, stiffness and damping, given attached mass and inertance are derived by application of Den Hartog's tuning approach to suppress the response amplitude of force and base-acceleration excited single-degree-of-freedom structures. It is analytically shown that the TMDI is more effective from a same mass/weight TMD to suppress vibrations close to the natural frequency of the uncontrolled structure, while it is more robust to detuning effects. Moreover, it is shown that the mass amplification effect of the inerter achieves significant weight reduction for a target/predefined level of vibration suppression in a performance-based oriented design approach compared to the classical TMD. Lastly, the potential of using the TMDI for energy harvesting is explored by substituting the dissipative damper with an electromagnetic motor and assuming that the inertance can vary through the use of a flywheel-based inerter device. It is analytically shown that by reducing the inertance, treated as a mass/inertia-related design parameter not considered in conventional TMD-based energy harvesters, the available power for electric generation increases for fixed attached mass/weight, electromechanical damping, and stiffness properties.