The Gemara Eiruvin (104a) says that it is Assur to be Molid Kol or create sounds on Shabbos. There is a Machlokes in the gemara if this applies to any kind of noise or only a melodious kind of noise. Most of the Rishonim and the Shulchan Aruch (338:1) pasken that only melodious noise is assur. However the Vilna Gaon is machmir to assur all noise.The Orchos Shabbos (2:21:21) says based on this, that knocking on doors is permitted since it is not for music but just to get someone’s attention. Even the Vilna Gaon who assurs, holds it is permissible if you do it with a Shinui and knock in a non-conventional manner. However when knocking it would be assur to knock in a beat or rhythm.
Using a special knocker attached to the door may be more problematic. Even though it is not done in a melodious way, still it is an instrument made specially to make noise. In a Shaas HaDchak where your knock may not be heard otherwise, there are poskim that are matir.