This paper addresses the problem of few-shot anomaly generation, which has emerged as a practical solution for augmenting the scarce anomaly data in the field of industrial quality control. The anomaly generator must simultaneously satisfy three requirements: preserving the normal background, accurately overlapping the anomaly with a mask, generating anomalies at semantically valid locations, and generating realistic and diverse appearances. Existing diffusion-based methods satisfy at most two of these requirements: global anomaly generators corrupt the background, and mask-based generators often fail when the mask is inaccurate or misplaced. In this paper, we propose Mask-guided inpainting with multi-level perturbations and context-aware alignment (MAGIC) to address these three issues. MAGIC directly addresses background corruption and alignment errors by fine-tuning a stable diffusion painting backbone to preserve the normal region and ensure that the synthesized anomalies strictly conform to the provided mask. To offset the diversity loss due to fine-tuning, MAGIC adds two complementary perturbation strategies: (i) Gaussian prompt-level perturbation applied during fine-tuning and inference expands the global appearance of anomalies while avoiding low-quality text appearance, and (ii) mask-based spatial noise injection enriches local text variations. In addition, a context-aware mask alignment module forms semantic correspondences and realigns the masks to ensure that all anomalies are reasonably contained within the host objects, thereby removing out-of-boundary artifacts. Following a consistent identical evaluation protocol on the MVTec-AD dataset, MAGIC outperforms existing state-of-the-art techniques.