This paper presents a general graph grammar for structure synthesis of mechanisms. Much of current mechanism design is based on a systematic method popularized by Freudenstein, Buchsbaum, Mruthyunjaya and Tsai (among others). Since it relies on algebraic abstractions of graph theoretic principles, a graph grammar is a more natural expression for the method. Our proposed mechanism grammar rules add vertices and loops to a start graph to obtain desired structural requirements. A specialized grammar for the structure synthesis of Epicyclic Gear Trains is presented. As is a grammar adaptation of an existing linear time algorithm for the detection of isomorphism. A valid graph grammar for structure synthesis of mechanisms enables the eventual automation of general atlas construction and atlas construction for specialized mechanism classes.