You cannot be sure that the server will hash the password before storing it. @Rory points out that it is a reasonable requirement which you could try to enforce by non-computer means, but it is not realistic to believe that all servers will do things properly. The solution is not to use the same password (or passwords which can be guessed from each other) for two distinct sites.
"Distinct" passwords can be generated from a "master password" with a cryptographic hash function (e.g. you hash the concatenation of the site name and the master password -- there are ways to botch that, but the principle is sound). Software exists for that. Or you can store randomly generated passwords in a file, symmetrically encrypted with a master password. Software exists for that, too. It could take several forms (an encrypted file; a SSH connection to a server which hosts the password file; a browser extension which uses a cryptographic hash function;...).
Either way, it is hard to do in your head only (curse that biological brain !), because it requires doing extensive computations and/or remembering many random elements.
I claim, however, that the "do it in your brain" scenario is not realistic. Why would you want to compute the whole thing in your brain ? That would be because the local machine on which you are about to type the password does not have the necessary software installed; that's a random machine in, say, a cybercafe. Hey, wait ! You are about to type your password on a cybercafe machine ? A machine which could be clock full of key loggers and other malware ? Now that's a bad idea. No need for a badly written server, in these conditions: you are quite good at doing unsafe things by yourself.
So the need for a password derivation/storage scheme which you can run "in your brain" is actually a need for being able to do something which is quite stupid, security-wise. So do not do it. If you cannot access a safe storage or generator for per-site passwords, then you are not in a context where you could safely use the said password anyway.