Purpose: Development of tools for 4D and/or adaptive planning workflow in the clinical setting, incorporating advanced dose algorithms for inverse planning, has been evolving slowly. The purpose of this work was to develop a framework for 4D and/or adaptive treatment planning in the clinical setting, incorporating Monte Carlo‐based dose calculation for optimization and dose calculation. Methods: The framework incorporates several modules for 4D and/or adaptive planning, including, (a) planning and optimization on individual, respiratory‐correlated CT datasets using a Monte‐Carlo‐based dose engine (EGSnrc/BEAMnrc for the head model and modified DOSXYZnrc for the patient calculation); (b) deformable image registration based on a finite element method (FEM); (c) dose accumulation involving mapping of energy and mass to the reference phase; (d) plan evaluation. For MC‐based optimization, beamlet 3D doses are computed and the inverse problem is solved using quadratic objective functions. Beamlet intensities are optimized using a gradient‐based search method. The framework was applied to a simulated lung phantom using FEM to simulate lung deformation. Beamlet‐doses were substituted into the re‐optimization objective function, minimized on the initial CT dataset. With the resultant beam configuration, the dose was calculated on the deformed image, and accumulated/mapped to the reference image to compute the “warped” dose. The treatment plan was then re‐optimized. Results: The MC‐based optimization procedure was verified using square field depth doses and found to be within 2% of measurements. The optimization was also applied to a clinical lung patient plan and was found produced a significantly more homogeneous distribution than the conventional pencil‐beam algorithm. For the example case, results indicate that the 90% iso‐dose coverage to the PTV was 97%, 78% and 96% for the initially planned, delivered, and re‐optimized doses, respectively. Conclusion: Initial results suggest that the framework may help facilitate use of 4D and adaptive planning in the clinical setting.