Inline processing of magnetic resonance images allows fast feedback of analysis and immediate access to quantitative information. It further allows the development of adaptive MRI protocols. Here, we present GRAPE, a development platform for graphical programming to facilitate the development of adaptive magnetic resonance imaging (MRI) protocols. This platform provides tools to enable graphical creation, execution, and debugging of image analysis algorithms integrated with the MRI scanner, all within a graphical environment. GRAPE is demonstrated with the implementation of patient-specific optimization of the scan parameters of 3D fluid-attenuated inversion recovery (FLAIR) protocol to enhance the contrast of brain lesions in multiple sclerosis, performed on a 3.0 Tesla MRI scanner.