The rising interest in Dirac materials, condensed-matter systems where low-energy electronic excitations are described by the relativistic Dirac Hamiltonian, entails a need for microscopic effective models to analytically describe their transport properties. Specifically, for the study of quantum transport these effective models must take into account the effect of microscopic scale interfaces and the presence of well-defined edges, while reproducing the correct band structure. We develop a general method to analytically compute the microscopic Green's function of Dirac materials valid for infinite, semi-infinite, and finite two-dimensional layers with zigzag or armchair edge orientations. We test our method computing the density of states, scattering probabilities and topological properties of germanene and semiconducting transition metal dichalcogenides, obtaining simple analytical formulas. Our results provide a useful analytical tool with low computational cost for the interpretation of transport experiments on Dirac materials which could be extended to describe additional degrees of freedom like extra layers, superconductivity, etc.