fellow star-system-generator-creator.
So HDE did answer your question as far as I can tell... but I want to offer an alternative, which may not be a direct answer to the question your placed up there, but instead is hooking into the "mass is not enough" sentence.
I once had a similar problem, wondering what I do need to get a plausible star (and its star system) with as less data available as possible. So, if you are interested into abandoning the premise of knowing the spectral class first, keep on reading. Otherwise, thank you for your attention and good luck with your work!
So... still here? Well, I'm going to be as bold as I can become and say, that all you need to get a "plausible" star is its mass and its age. Mass is required to determine what It will become once the fusion kicks in, how it will look, what the internal plasma flow will look alike, its surface color, its size and the duration of its states of life.
But you need at least one additional parameter: its age at the point of checking. Without this, it will be a giant... quantum-like state, being a proto plasma cloud, a mainline-star and a super massive black hole at the same time.
Wit mass, you know its potential parameters at each state of its life, and with its age you know, in what state of life it is at the moment you are looking at it.
Take a star with ten times the mass of our sun... okay? How does it look after 4.5 B... M... come one, what was a "Milliarde" in English again?... Billion? Anyway, how would it look if its as old as our sun? Pretty black, I assume. But how would it look after about 500 Million years? Pretty blue. White-bluish... I assume.
From this point, you might get the spectral you where starting with:
Know its mass, you will know the durations of its states of life -> Know a mass and a time when you look at it, you may go for its current state of life -> From its mass and state of life, you may get its size -> from its mass and size, you may get its surface temperature -> from its mass and surface temperature, you may go for its spectral class.
sigh Well, I went out of the topic when I realized that the star was the easy part of the work. As soon as I tried to apply different levels of pressure to the layers of all celestial bodies, my planets, stars and whatnot startet to go for abnormal values (I remeber one special "brown dwarf", which got to much non-fusion material during creation and ended up with a chronosspere as big as half of the star system... that was the point where I had to admit defeat because of a lack of knowledge).
So, you might want to rethink your approach, but if you really need to insert a spectral class and get a proper star, my approach will be a bit... hard to use, because you had to create a dozend star(systems) and hope to get one which may fit your needs.
Anyway, happy system-creation!