A planet spots the mothership, and mistakes it for an asteroid, so they send out a modified shuttle with mining stuff and a nuke on board. Mechanoids ignore it as they detected nothing on the planet that could in any way pose a real threat to them. Expert miners do some digging into the motherships hull, oblivious to the fact it is a ship.
As Mechanoids decide to take action, the unknown ship leaves, and they decide to shoot it down. They then pick up transmissions of some guy still on the hull as he says 'disgusting humanoid affection stuff' to his female offspring as he hits a button.
Every Mechanoid on the ship has their 6th sense light up like a christmas tree, and they suddenly realize there is a threat that is going to cause minimal damage but cause a series of chain reactions that will destroy the other ship.
About 5 minutes later, as the mechanoids are running around like headless chickens because runners can't fit down into the hole to get close enough to even TM the apparently 'augmented to be much more powerful than it was when the TM'ed the ship in the first place and decided to ignore them' bomb... boom... the hero dies, the ship hull cracks, stuff happens, a few minutes later, the mothership is an exploding wreck.
Get a hold of some orphan teen guy whose military father died while trying to hide some super sized special ship from the mechanoids, through many trials and events, the teen guy gets hooked up with a cute gal, a few aliens, finds the super sized special ship and is able to activate its systems as the Mechanoid mothership tries to carve it up with a beam weapon, which instead jump starts the super sized special ship, with more or less obliterates the mothership, and uses the energy and mass to create the planet Rob Jr.
Lure the Mechanoid Mothership into an area where they find a nice juicy planet to dissect... unfortunately, both the planet and the mothership are in the way of some sort of intergalactic highway, and the people making it take out the planet and the mechanoid mothership rather than simply waiting for a natural orbit to move it out of the way.
Take any sort of anime style ship or mecha, and put any sort of teenager or kid in charge of it. Wait a few seasons, er, months or years, for Mechanoid Mothership threat to be defeated, but with much of their homeworld/colony/station/mothership blasted to bits and much of the population wiped out in the process.
Get them involved in some sort of interplanetary conflict of 'elemental' based races fighting to protect their home(world)s, wait for main enemy to show up and turn the Mechanoid Mothership into an appetizer...
Load up a team of 10 people and 4 small VW Bug sized automated weapon systems, with the best technology and weapons possible, on some uber fast assault/transport ship made using the help of alien tech, to infiltrate the Mechanoid Mothership, blasting and blowing up a few things, before finally finding some key thing, blowing it up, and narrowly escaping as the Mechanoid Mothership explodes
To simply start getting really out there...
Call in MacGuyver, give him 1,000 credits, a portable hole, and access to a thrift shop, scrap yard, a department store, a well stocked estate, and a fixer-upper shuttle.
Mechanoid Mothership should be eliminated within an hour.
Contact Lonestar and his flying Winnebago, give him a case of assorted jams, and some liquid Swartz. The Mechanoids should be quickly made unable to detect incomming threats...
such as someone who warps in and beams a few thousand tribbles into the main area the Mechanoids store their nutrients on their mothership....
Sabotage mechanoid gene stocks with elephant DNA, and breed an army of super mice that can survive insertion into mechanoid ships via special armor piercing missiles... wait a while for new Mechanoids to display signs of wanting peanuts or playing in mud, then release the super mice missiles.
Go borrow (or steal) a point singularity weapon from someone that has one.
Go borrow (or steal) a star killer or system destroyer type weapon from someone that has one.
One of those iso-nucleic mines (or whatever they were called) mentioned by 7 of 9 in Star Trek Voyager against species 8472 (or whatever they were called)...
Estimated 2.5 million isoton yield (or was it 1 million isoton and 2.5 million megatons?) and a blast radius of 'an entire star system'.
Should suffice, is so powerful, then hopefully instead of psychic flashes of doom, the immense uber powered lethal force causes mechanoid's heads to explode due to overload of seeing a precognitive flash of 'something' more or less blasting a mothership into tiny bits in an instant...
Or just toss the Borg at them in general, and quietly pack up and move to a different dimension...
Or convince Q that the Mechanoids would be far more fun to play with than Picard or Janeway.
Call out the Lensmen?
Hijack the comm. systems of the Mechanoid Mothership and flood their comm. channels with 24/7 humanoid comedy shows and sitcoms to see if they will laugh themselves to death and leave a nice intact mechanoid mothership for anyone looking for one?
Summon forth the forces of the totally absurd, as a giant pool cue materializes out of nowhere, doing a bank shot with a nearby plant, which slams the mother ship into the corner pocket (a.k.a., a nearby star or black hole).
Mobilize a fleet of several dozen Doom Stars and laugh manically as one realizes that amassing that many potential planet killers is just plain overkill, and that no number of Wasps is going to do diddly squat to shields that shrug off anti-ship nukes like water off of a duck's back on top of keeping any mechanoid from getting anywhere near close enough to use any sort of TM ability, along with energy pulsar spatial distortion weapons that will likely tear apart any 'small craft' within thousands of km.