GROUCHO Marx famously wrote: "I don't want to belong to any club that will have me as a member". Marx quoted his resignation letter tendered to Milton Berle's private members showbiz haunt, the Friars Club of Beverley Hills, in his 1959 autobiography, Groucho and Me. Immortalised in this way, Marx's words tapped into a form of wilful outsiderdom courted by would-be geniuses ever since.

Even outsiders, however, have to belong somewhere, as three very different Edinburgh Festival Fringe shows may demonstrate this year. In The Red Shed, Mark Thomas presents a loving homage to the forty-seven foot wooden hut that forms the Wakefield Labour Club, where he cut his stand-up teeth.

In his play, The Club, Ruaraidh Murray sets up a fictionalised account of life in The Tardis, the Clerkenwell-based railway arch turned 1990s hedonist's hang-out, where Brit-artists rubbed up against great train robbers, Boy George was on the decks and absinthe was all the rage.

By contrast, Expensive S*** focuses on a Nigerian toilet attendant in a fictional Glasgow club inspired by a real life establishment which was discovered to have two-way mirrors that allowed men to observe women in the Ladies next door. Adura Onashile's new play, which forms part of this year's Made in Scotland programme, contrasts this with revolutionary musician Fela Kuti's very different Shrine club in Lagos, where the toilet attendant once dreamed of becoming a dancer.

In different ways, each play acknowledges a day to day need to come together, be it to campaign, or just to let off steam through laughter, music and dance.

“The Red Shed is this amazing place place that informed me when I was starting out,” says Thomas. He first performed at the venue while a drama student at the nearby Breton Hall college. “Me and my mates got involved in the Trades Council, and would do these benefit shows there that we'd write in the afternoon and perform at night. We first went in 1981, which was a very political time, and we very quickly got involved in left wing activism.”

This set Thomas off on a road which has seen him combine stand-up, activism and theatre in a series of increasingly autobiographical shows that include Cuckooed and the Herald Angel-winning Bravo Figaro. Through all of these, Thomas has fused the personal and the political that reflects his roots at the Red Shed.

“What the Red Shed does is embody a sense of working class history. It's fifty years old, and it's full of this incredible mix of people who have led campaigns, and during the miner's strike in the 1980s fed 150 miners' families. Everyone there is an ordinary person who has done extraordinary things. People who go there have won and lost, and there's this real sense of a continuum in this place where everybody's welcome.”

Everybody was welcome too at Fela Kuti's Shrine club, where the radical singer and activist held court, and the Nigerian toilet attendant in Expensive S*** was a witness.

“The Shrine wasn't a club like a club in the west,” Onashile says of the club. “It was a big courtyard with stalls selling food and a stage for the band. It was very cheap and open to anyone, and people went there to hear the truth. This was a time of military dictatorship and people being killed, and there was nothing Fela didn't say about that. There was a sense of pan-Africanism, and going against the grain, and of galvanising the uneducated and the poor. Fela had a commune, Kalakuta, and he never turned anyone away from it, but somehow the revolution didn't feature gender equality, even though women were so important, and dancing, singing and performing with Fela onstage.”

Onashile's last work to appear on the Fringe was the award-winning HeLa, which charted the life of Henrietta Lacks, the black woman whose cell stems were taken without permission in 1951, and which were used as raw material for some of the most significant scientific breakthroughs since. Her new show, which she has written and directed in a production presented by the recently established Scottish Theatre Producers in association with the Traverse Theatre, parallels the story of Fela Kuti's club with the toilet attendant's conflicting experience in Glasgow.

“On one level the toilets in a club are a private space,” says Onashile “But there is also this awkward social interaction between these attendants, who are often of Nigerian descent, and who don't get paid. The play moves between the woman's experience in this club where men gaze at women through a two-way mirror, and the Shrine, and it becomes about how much agency or power women have.”

For Murray, there were no such barriers at the Tardis, where he began working behind the bar in the late 1990s, shortly after he left drama school in London. Brit-pop, Brit-Art and Loaded magazine were in the ascendant, along with a culture of hedonism that crossed class divides.

“For me it was like a pirate ship,” he says of the Tardis. “It was full of people who'd all come down to London and found like-minded people there, people who didn't want to conform to the norm. So you'd have retired gangsters getting on famously with playwrights, and it didn't matter what your race or sexual orientation was. It was a family.”

Murray's fifth Fringe play, following successes with Big Sean, Mikey and Me, Box Man, Bathtime and Allie, focuses on club manager George's fictionalised attempt to stave off a hostile takeover bid by gangsters, in between attempting to stage the best party in the world, where even Dustin Hoffman and Sting might show face.

“The reason I've written the play is partly to document everything that happened, because there's nothing really online about it,” says Murray. “But it's also to try and make sense of why people come together like that, in a way that's trying to get away from authority and not giving a f***. There's something great about that.”

In different ways, all three plays are about communities which form, and keep on forming, no matter what levels of gentrification or political disenfranchisement are thrown at them.

“What the Red Shed embodies for me,” says Thomas, “is a place where solidarity still means something, and where anyone can come for help, and that's a very beautiful thing.”

Murray, meanwhile, on the lookout for today's version of the Tardis. “When I find it,” he says, “I'll let you know, and you can come along to the promised land.”

Onashile's Expensive S*** is perhaps more complex than the other two plays. “I want to celebrate Fela's music,” Onashile says, “but I also want to question certain things. You have to be careful at the end of the play that you don't say everything's okay, because it isn't.”

The Red Shed, Traverse Theatre, July 31-August 28; The Club, Gilded Balloon Teviot, August 3-29; Expensive S***, Traverse Theatre, August 4-28.

www.traverse.co.uk; www.gildedballoon.co.uk