Mechanical forces are important for controlling cell migration. This protocol demonstrates the use of elastic hydrogels that can be deformed using a glass micropipette and a micromanipulator to stimulate cells with a local stiffness gradient to elicit changes in cell structure and migration.