The selection and design of the kinematic diagram of the mechanism is the first stage in the creation of a technical device. In the design process, an optimization task inevitably arises, during the solution of which it is necessary to choose the best one from the proposed options according to certain criteria. This article proposes a software solution to automate this process. On the example of the synthesis of a planar mechanism by a given function of the output joint, the advantages of this automated approach are shown. When solving, the two methods are used: enumerating various geometric parameters for a given structural diagram of the mechanism and solving the forward kinematic problem, followed by finding the minimum of the target function, as well as solving the inverse kinematic problem for a given structural diagram of the mechanism.