  Free fermions on Hamming graphs $H(d,q)$ are considered and the entanglement
entropy for two types of subsystems is computed. For subsets of vertices that
form Hamming subgraphs, an analytical expression is obtained. For subsets
corresponding to a neighborhood, i.e. to a set of sites at a fixed distance
from a reference vertex, a decomposition in irreducible submodules of the
Terwilliger algebra of $H(d,q)$ also yields a closed formula for the
entanglement entropy. Finally, for subsystems made out of multiple
neighborhoods, it is shown how to construct a block-tridiagonal operator which
commutes with the entanglement Hamiltonian. It is identified as a BC-Gaudin
magnet Hamiltonian in a magnetic field and is diagonalized by the modified
algebraic Bethe ansatz.
