NASA did add docking capability to JWST for future servicing:
https://www.space.com/3833-nasa-adds-docking-capability-spac...
That article is from 2007 but it still had the docking ring as of 2013. Can't find any recent ones that confirm if it will still have the docking ring at launch.
But I don't think we have the capability as of now to actually service it in case something goes wrong. But given how technology is advancing, maybe we can when JWST reaches EOL in 10 years.