No, you are wrong.
You need to compute logarithm of the mel filter bank energies after FFT and only then apply DCT. The number of energies of filterbanks should be about 20 or 40, after DCT you should get 20 or 40 numbers and take first 13.
What you did with FFT is all wrong.
You might want to read some MFCC code instead of doing something from scratch, there are many implementations out there, for example in sphinxbase: