Characteristic imsets are 0-1 vectors which correspond to Markov equivalence classes of directed acyclic graphs. The study of their convex hull, named the characteristic imset polytope, has led to new and interesting geometric perspectives on the important problem of causal discovery. In this paper we begin the study of the associated toric ideal. We develop a new generalization of the toric fiber product, which we call a quasi-independence gluing, and show that under certain combinatorial homogeneity conditions, one can iteratively compute a Gr\"obner basis via lifting. For faces of the characteristic imset polytope associated to trees, we apply this technique to compute a Gr\"obner basis for the associated toric ideal. We end with a study...