Partial answer, too long for comments:
TL;DR: It does have a payload ring, for potential grabbing, but it is not without issues.
In 2007 it was reported by a single news source:
NASA is adding a docking ring to the James Webb Space Telescope (JWST) just in case a visit by astronauts aboard a future Orion Crew Exploration Vehicle is needed to complete deployment of the multibillion-dollar orbiting observatory. The U.S. space agency made the announcement May 10 during the unveiling of a full-scale model of the JWST on the National Mall here.
"However, what if you have a bad day when you put this thing a million miles out and everything folds out except for an antenna ... it gets stuck? Or a solar panel doesn't fold out completely, and you say, 'gee, I wish we could send an astronaut just to give it a kick'?"
Weiler said NASA Administrator Mike Griffin asked the James Webb team two years ago to examine whether it was worthwhile to design the telescope to accommodate a visit from Orion.
According to Weiler, it is.
Although this google search really confused me:
24 Dec 2021 — Ahead of launch, the James Webb Space Telescope was loaded into the ... Megan Fox's Engagement Ring Was Designed to Hurt if She Takes it Off.
And it has never been confirmed nor denied or even been in the news since.
It only seems to be discussed in social media /forum circles.
NASA had experiments for robotic refueling in space.
NASA had experiments for robotic docking of un-cooperative spacecraft in space.
NASA actually has an office for looking at future servicing of OOS spacecraft.
NASA actually has had multiple programs over the years where they looked into various docking systems in which to capture satellites that were not cooperating, among them I've seen harpoons, engine nozzle spikes and grabbers.
OrbitFab has signed its first contract to be an in-space refueling service earlier this month.
Enter Northrop Grumman Space Systems' MEV, which operates on a very similar principle to those studied by NASA and many other companies in the last few years. It is only NG that has actually got this going that we know about (China was seen to be doing some odd maneuvers around other satellites in the GEO but I have not heard more)
Look at how MEV docks with its target:
Can you see what it is docking on to here. Something that JWST lacks.
Not to say that something can't be adapted and then get that to grab on to an alternative, structural piece of JWST.
Draw back of MEV is it worked well for out to GEO because it was under constant control and communication by ground support services.
With the long communication delays to L2 it is likely any kind of effort would have to be mostly automated, lacking the kind of finesse that could only be provided when under constant uninterrupted supervision.
But back to JWST:
The trouble with JWST is not just lack of accessible ports for refueling (Fill/drain ports are visible on the bus, but how accessible are they?) but lack readily accessible parts for docking or otherwise grabbing on to, and certainly not without potentially damaging something.
JWST lacks a major engine nozzle, and lacks a clear ring for docking.
It has a payload ring but I don't fancy grabbing that without doing something to those parts arrayed in and around it.
Presumably this is the launch vehicle interface ring mentioned elsewhere from when mated to the Ariane launcher but it is far more low profile than other rings seen where they cater for docking/grabbing.
Typical Payload Ring:
JWST actual Payload Ring:
Payload adapter and Marman Clamp, covering the payload ring:
Pretty slim without the extra parts after spacecraft separation.
NASA has a robotic gripper already developed to clamp on to them:
It looks too bulky for that ring on JWST though.
Just saying it is not impossible but it seems unlikely unless a major effort ,and budget to go with it, is approved.
So, Does JWST have hardware that could be used as a docking fixture by repair spacecraft?
Yes and no. For the type of operations that MEV for example uses now, no.
Could a future vehicle deal with what JWST has to offer in terms of grabbing on to something if not that ring? Possibly...
In terms of perhaps grabbing on to what JWST has now, NASA has this going on:
Compact Long-Reach Robotic Arm
back to JWST:
This is the view from below of the JWST bus:
Shows location of thrusters and payload ring, and the OSR covered parts - possibly radiators (note how the actual ring itself is covered with OSR) - arrayed around the inside of the ring.
If the 'future grabbing device' was gentle it could conceivably grab the outside of the ring and the inside of the (potentially) radiator segment for docking; or better yet just grab the exterior of the ring, like grabbing a jam jar top, avoiding the radiators on the interior of the ring.
And, a late edit:
I saw this before but sort of dismissed it ..because I sought a different solution.
But given the situation with the accessibility of the spacecraft separation ring / payload ring on JWST and the OP's comments, i came back to it:
A grip on the outside of the payload/spacecraft separation ring.
Whereas most other solutions looked at some sort of grapple of a point or part, the populated inside section of the payload ring required a look at a simultaneous multi-point grapple of the exterior of that ring.
Of course what happens after that given the shift of center of mass, etc is another thing, but perhaps with initial docking like this achieved, the rest could follow.
This comes from a joint UK and Israeli venture that was signed back in 2018. The venture was up for sale by 2020 without a single launch.
It was called Space Drone but it is set to change. Astroscale, itself with a limited servicing OOS solution (could only dock with compatible satellites), bought the IP, assets and sought to hire the staff.
The spacecraft... uses electric propulsion to maneuver to its target satellite, attaching to the satellite’s launch vehicle interface ring.
This venture is seen as a direct competitor to (former Orbital ATK) NGS MEV which currently has two spacecraft in operation.