ABSTRACT Pores and sunspots are ideal environments for the propagation of guided magnetohydrodynamic (MHD) waves. However, modelling such photospheric waveguides with varying background quantities such as plasma density and magnetic field has thus far been very limited. Such modelling is required to correctly interpret MHD waves observed in pores and sunspots with resolved inhomogeneities such as light bridges and umbral dots. This study will investigate the propagation characteristics and the spatial structure of slow body MHD modes in a magnetic flux tube with a circular cross-section with inhomogeneous equilibrium density distribution under solar photospheric conditions in the short wavelength limit. For simplicity, the equilibrium density profile is taken to have a circular density enhancement or depletion. The advantage of this is that the strength, size, and position of the density inhomogeneity can be easily changed. Calculating the eigenfrequencies and eigenfunctions of the slow body modes is addressed numerically with use of the Fourier–Chebyshev Spectral method. The radial and azimuthal variation of eigenfunctions is obtained by solving a Helmholtz-type partial differential equation with Dirichlet boundary conditions. The inhomogeneous equilibrium density profile results in modified eigenvalues and eigenvectors. It was found that a localized density inhomogeneity leads to a decrease in the eigenvalues and the spatial structure of modes ceases to be a global harmonic oscillation, as the modes migrate towards regions of lower density. Comparing the homogeneous case and the cases corresponding to depleted density enhancement, the dimensionless phase speed undergoes a significant drop in its value (at least 40 per cent).