I'm going to assume the avoid / tame / deter options are off the table here. Assuming story line includes having to fight these lil buggers off, so you want the conflict afterall.
1 - Protect the airbags! Put a large 'net' around the ships outriggers. Pretty simple theory, a claw or bite would only be able to hit the net rigging around the bladder and not the bladder itself. Extra points if this has a sticky substance (or otherwise nasty to bite/claw substance).
2 - Protect the people. Armour the liner and have area's general passengers and not combat crew can hide in
3 - Sail redundancy. Lets face it, sails are hard to protect in these situations. Having multiple sails (including a 'backup' one that is hidden until deployed as a last resort) is a valid option.
For defensive reasons...don't use fire or explosives. Fire tends to set your own ship on fire (even if you don't hit your own ship, a serpent on fire hitting your sails is your ship on fire), while explosives will likely cause several holes in your own ship
You put this in the comment:
"Shooting stones out of a catapult would be very ineffective as these serpents are very small and agile"
That's semi correct. In traditional navy, there are 2 types of shot that are frequently used...cannonballs and grapeshot. Now it is true that the serpents being small and agile would be hard to hit with a single cannonball, however grapeshot is the 'shotgun' approach containing many little pellets. Same idea as duck hunting really, you are going to shoot a spray of bullets instead of a single large one.
For 12th century terms...a little early, but a Trebuchet is the single shot weapon while the Mangonel was the shotgun spray approach.
The Chinese had the Cho Ko Nu, however various 'hand ballistas' had been developed significantly earlier right around 0 AD. Cheiroballistra, it's Scorpian predecessors, and even the lithbolos (stone thrower) could all be effective. Of course, the Ballista https://en.wikipedia.org/wiki/Roman_siege_engines#Early_Roman_ballista is an undervalued piece of equipment...at 100 yards, a man size target could be easily targetted and struck reliably with a ballista (ballistas are considered more accurate than a 19th century musket by a large margin, with scorpians being the smaller and more accurate 'antipersonnel' version of ballista's).
More deceptive - sticky bits on the defensive rigging. Biological flight is usually a 'perfected' thing and it doesn't take much to throw a flying creature off...kinda like tying a sock around a cat kills the cats balance. Having pieces of sticky coated rope and rigging thats attached to the defensive mesh around the air bladders but will come loose if stuck to a creature can seriously mess up a flying attacker...serpent flies by and claws at the rigging, hits the net protection and has a sticky chunk of tar coat it's claw and arm that contacts its wing and sticks it's wing to itself preventing it's proper use would down a flying serpent.