Green’s Dictionary of Slang

thought foundry n.

(US) the brain.

[US]B. Fisher A. Mutt in Blackbeard Compilation (1977) 40: Several insanity witnesses [...] all agreed that Mutt was twisted in the thought foundry.