I need an semi-organic structure large enough to fit a dense kasbah village on top, that protrudes from a shallow sea.
additional info, maybe unimportant: planet orbits a red dwarf star tidally locked in the habitable zone, breathable atmosphere but unpleasant, located on the night or twilight side of the planet. Other than a large ice cap glacier on the night-side there aren't really any other land masses (maybe a sun-scorched area on the day-side, but not habitable). The sea is basically melt from the glacier, possibly too salty to support life?
My vague idea is that a mining company bioengineered this thing to filter and collect some trace element from this remote planet. Its "cells" are chambers of fresh water, and it concentrates the mineral in it's outer "skin". Eventually, hundreds of years later after the structure matured, the concentrated mineral would have been harvested by grinding down the mountain – except for whatever reason the economics have changed, and that element is now unimportant or cheaply manufactured. The mining company went bust eons ago, and squatters moved in and drained the upper chambers to live inside. The structure naturally wicks moisture through it's skin, so the chambers will eventually refill with fresh water if they are not pumped out.
The planet is a backwater off the main trade routes. Trade Syndicate Corporations control the small harbor, but most of the locals live in a semi-lawless kasbah, smuggling contraband or servicing space sailors. The farmers who live deep below might never associate with top-siders or off-worlders. Top-side is a slum of unhealthy people suffering from the atmosphere, but just under that in the highest cells are businesses, markets, tea houses, brothels, etc. I imagine large older cells each as big as a stadium honeycombing the top of the mountain. The native population would be a few hundred thousand, with an additional sailor/harbor population of about twenty thousand.
Originally I was trying to make it be based on a vegetable, but now I'm leaning towards modeling it from a wart, as this seems to be more or less the structure I was imagining: a cluster of cells that push up to form a low protruding mountain, and also go deep underground.
I don't plan to delve into the science of how it was created, other than to casually mention that squatters moved in and over many generations repurposed the structure. The upper cells that are longest inhabited are probably "dead" now, but deeper underground cells still function and collect fresh water. The whole structure is haphazardly riddled with manmade tunnels and drainage pipes, something between an ant hill and a sewer world below, and on top a dense little kasbah city looking something like Shibam in Yemen.
I guess this is partly a reality check, but I'd also appreciate some practical ideas about how deep underground people could live and potentially have farms. Would pockets of CO₂ be a hazard? Is geothermal heat or pressure a problem (would they get the bends)? Should I go with this wart idea (I like it because it's revolting)? What else am I missing?