In the sentence: "This is the only mammal that can fly," "This is the only mammal" is indeed the main clause. The term "independent" may in fact be misleading because main clauses often contain elements that link them with subordinate or dependent clauses, and if we take the latter ones out, the main clause will appear to be incomplete.
In the sentence at issue, that word within the main clause establishing a liaison with the subordinate one is, oviously, the adjective "only".
In this other sentence:
- This bird is so strong that it can fly for hours,
the main clause is "This bird is so strong," but once again we find an element that links it with the dependent clause "that it can fly for hours." That element is the adverb "so."
The question is, then, how to spot the main clause in a sentence. You'd better forget about calling it independent. The main clause will be the one that is not introduced by a subordinating word, be it a relative pronoun or adverb or a conjunction.
Notice that the relative (dependent) clause "that can fly" is introduced by the relative (subordinating) pronoun "that": then, that is the dependent clause and whatever remains is the main clause.
In the other example I provided, the adverbial (dependent) clause of result "that it can fly for hours" is introduced by the subordinating conjunction "that": then, that is the dependent clause and whatever remains is the main clause.
The main clause may be even shorter. In a sentence like: "Whoever arrives first is the winner," the subject "Whoever arrives first" is a nominal (dependent) clause, so only the predicate "is the winner" is the main clause, with an implicit or tacit subject "he/she". In a sentence like: "Say what you think," the direct object "what you think" is a content (dependent) clause and only the verb "Say" (with the tacit subject "you") is the main clause.
The main clause is actually "independent" in what we call the "deep structure" of the sentence, and sticking to the words that appear "on the surface" will not help you detect it, nor will the concept of a standalone, independent clause always help. The best thing for you to do is discard all the dependent clauses (not phrases), that is, smaller embedded sentences consisting of subject and predicate, and the main clause will be what remains.