"In order to resolve the Korean peninsula nuclear issue, China has been making unremitting efforts and we have been playing an important and constructive role," Geng said.
"To sum up, our contributions are recognised by all and our efforts are indispensable."
Trump wrote on Twitter that while he appreciated the efforts of President Xi Jinping and China to help with North Korea, "it has not worked out. At least I know China tried!"
The tweet came a day after the death of Otto Warmbier -- a US student who returned in a coma from a prison in North Korea -- and on the eve of a US-China strategic security dialogue.
Since coming to office Trump has tried to get Beijing to put pressure on its ally Pyongyang to curb its nuclear and missile programmes.
It was unclear if the tweet was a signal that those efforts are perceived to have failed. That conclusion could be seen as a warning of unilateral US action to follow.
Geng said China has played a "positive constructive" role regarding North Korea because it is a responsible member of the international community, and "not because of any pressure from other countries".
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)