Right now there are countermeasures for individual drones- but a swarm relies on outnumbering those defenses, which is often more practical to achieve than a really effective defense.
Israel's working on a portable laser truck- though it'd likely struggle against anything we'd call a swarm.
https://asiatimes.com/2020/02/a-new-anti-drone-system-shows-promising-results/
Likewise, Russia's Ornithology Service (shockingly a real thing) has a flock of anti drone falcons. Again, unlikely to be effective against a swarm.
https://www.themoscowtimes.com/2018/01/29/kremlin-trains-falcons-capable-of-taking-down-drones-a60311
Surprisingly, even the Phalanx CIWS of the AEGIS system is not very reliable against drones- if 8 attacked, 2.8 would get through.
https://www.quora.com/Why-cant-we-rely-on-the-Phalanx-CIWS-to-shoot-down-small-drones
It's the Dune effect, really. Because they're so slow, and so small, anything you calibrate for them would kill any birds that come within range. This would be a PR nightmare and likely waste a tremendous amount of ammunition.
What you might see is an adaptation of this anti drone gun- currently handheld, which makes it very unreliable against a swarm attack, or any fast moving drones. However, putting a jamming device like this tied to a Phalanx style automated fire control system would allow it to scramble anything it detected, and would likely not bother organic things it accidentally fired upon.
https://www.scmp.com/tech/china-tech/article/2095112/hk300000-drone-killer-guns-available-hong-kong
They are strictly soft kills though, forcing the drone to land or return to its origin.\
It's really a fascinating field of study, with so many different possible solutions.