If California can invoke State Nullification for medical marijuana, Montana can do so regarding gun rights.
Also, there was a grand tradition in the old west that applies here. Montana can forbid state officers from assisting federals as the try to enforce their gun laws in Montana. This can include Montana jails and lockups. None of this need be available for federal use. This was a Big reason that marshals used to need good relations with the sheriff back in the frontier days.
The libs have even reinforced the validity of this, all over the country, by forbidding local law enforcement from assisting the Feds on illegal immigration issues.