Position analysis and the evaluation of various performance indices are integral parts of iterative design of mechanisms using computers. To perform these tasks, one relies upon either a commercially available software or self-written codes. While the first option suffers from the lack of flexibility in terms of integration with other external modules such as an optimiser, the second one requires significant amounts of time and effort in terms of planning, programming, debugging, and code maintenance. In this paper, a unique solution to this problem is proposed, via the introduction of a meta-programming language called MML, developed for the specific purpose of modelling and analysing mechanisms. A few lines of codes in MML is enough to describe a mechanism, solve its position kinematic problem, and also to generate automatically programmes in C language that can be either compiled externally to create stand-alone analysis modules, or be integrated with any other system accepting a C module. Further, to complete the framework as a stand-alone analysis package, a Qt-based visualisation interface is added. It allows dynamic manipulation of the design parameters via the GUI elements, and updates the screen with the corresponding effects on motion and/or some pre-defined output function or performance index in the real time. The features and the usage of the framework is illustrated with the example of a Stephenson-III six-bar mechanism. The framework, however, is capable of handling more generic mechanisms and is designed to be easily extendable. It is hoped that the mechanism design community would find this framework of some interest and utility.