This paper proposes a design methodology of self-reconfigurable kinematics and control engine for modular and reconfigurable robots. A modular manipulator has been proposed to meet the requirement of task adaptation in versatile needs for service and industrial robot area and the function of self-reconfiguration is required to extend the application of modular robots. Kinematic and dynamic contexts are extracted from the module and assembly information and related codes are automatically generated including controller. Thus a user can easily build and use a modular robot without professional knowledge. Simulation results are presented to verify the validity of the proposed method.