Most molecular generative models do not consider starting from a given molecule, and are not appropriate for situations such as lead optimization. Additionally, existing methods that start generation from a given molecule have problems such as low similarity to the starting molecule. Therefore, in this study, we developed a molecular optimization method that starts generation from arbitrary molecules based on molecular graphs. Optimization is performed in a fragment-wise tree search according to a given evaluation function. Fragments are generated individually by MCTS in an atom-by-atom manner. The GCN model trained on the fragment dataset is used to improve the efficiency of fragment generation. In an experiment of optimizing QED as an example of the evaluation function, the generated compound not only improved the value of the evaluation function sufficiently but also had a high similarity to the starting compound. In addition, it was confirmed that this method searches near the starting compound compared to existing methods. Thus, this method is considered to be suitable for processes such as such as lead optimization, where compound candidates have already been obtained. Furthermore, this method can be used to mask important structures identified beforehand, such that they remain unchanged.