No, a 10 speed MTB cassette does not need a spacer. The reason for this is because the cogset on a 10 speed mountain bike is designed to work with a specific freehub body. This freehub body has dimensions that are different from those of an 8 or 9 speed Shimano-style cassette hub, so the cogs fit snugly against one another and don't require any additional space between them.