ἀπεκρίθη Θωμᾶς καὶ εἶπεν αὐτῷ ὁ κύριός μου καὶ ὁ Θεός μου.
The thing which immediately stands out for me here is that underlined is a TSKTS construction. In the bible, TSKTS (article substantive kai article substantive) constructions almost invariably connote two different individuals. Now, in order to conduct proper exegesis, we must always stay within the bounds of what the grammar allows us to do, and in this case the grammar is telling us "two individuals are in view" in the expression ὁ Κύριός μου καὶ ὁ Θεός μου.
But the words are said to one individual (εἶπεν αὐτῷ) . So grammar leads us to think one way but the superficial context seems to push us the other way. What do we do in a situation like this ? Simple, trust the grammar, and find an interpretation which does not violate it. In John 20:28 this is quite easily done if we realize that although Thomas said these words to Jesus, he was addressing both Jesus and the Father who is in Jesus. The actual (not superficial) context supports this understanding.
For the proper context we have to visit Jesus' last known conversation with doubting Thomas and Phillip in John 14 . Here, in Thomas' presence Phillip tells Jesus that seeing the Father is enough for him :
Λέγει αὐτῷ Φίλιππος Κύριε, δεῖξον ἡμῖν τὸν Πατέρα, καὶ ἀρκεῖ ἡμῖν.λέγει αὐτῷ ὁ Ἰησοῦς Τοσοῦτον χρόνον μεθ’ ὑμῶν εἰμι καὶ οὐκ ἔγνωκάς με, Φίλιππε; ὁ ἑωρακὼς ἐμὲ ἑώρακεν τὸν Πατέρα· πῶς σὺ λέγεις Δεῖξον ἡμῖν τὸν Πατέρα;οὐ πιστεύεις ὅτι ἐγὼ ἐν τῷ Πατρὶ καὶ ὁ Πατὴρ ἐν ἐμοί ἐστιν; τὰ ῥήματα ἃ ἐγὼ λέγω ὑμῖν ἀπ’ ἐμαυτοῦ οὐ λαλῶ· ὁ δὲ Πατὴρ ἐν ἐμοὶ μένων ποιεῖ τὰ ἔργα αὐτοῦ.
In response, Jesus tells Thomas and Phillip that to see him (Jesus) is to see the Father because the Father is in him (Jesus). Yet Thomas still doesn't understand. Fast forward to John 20:28 , to the next known conversation Thomas has with Jesus and our unfinished story of doubting Thomas finds a happy ending. Here Thomas understands that the Father works through Jesus, even raising Jesus from the dead, and thus to "see" Jesus is to see the Father , hence Thomas' "my lord (i.e. Jesus) and my God (i.e. the Father) " eureka cry. This interpretation explains the TSKST . It also explains the nominative ὁ κύριός rather than the vocative κύριε, which is another powerful indicator that Thomas was not addressing Jesus as his lord and God.