The Line of Duty trio are in talks with Trainspotting author Welsh about a series centred on Connolly, who was a key figure in the 1916 Easter Rising.
Greenock-born Compston has said in the past playing Connolly would be his dream role, while Dunbar, who played Superintendent Ted Hastings in Line of Duty, said he intends to work on the script with the Edinburgh writer.
The 63-year-old Irish actor said he got in touch with Welsh through McClure's broadcaster partner Jonny Owen.
Speaking on the Out To Lunch with Jay Rayner podcast, Dunbar said: “I might be putting my toe in the water again regarding a script.
“I'm talking to Vicky and Martin and Irvine Welsh and a few people about the possibility of writing something about James Connolly, the revolutionary.
“Irvine fits in because of Edinburgh and James Connolly and the fact that he's a very good friend of Jonny Owen who is Vicky's partner.”
Last year, Compston revealed his ambition to play the revolutionary during an appearance on RTE show Ask Me Anything following his visit to Kilmainham Gaol, where Connolly was executed by a firing squad.
He said: “It was somewhere I had always wanted to go, that period of history fascinates me.
“I may be a bit young for it at the moment but to play James Connolly would be a dream role for me.
“I think people forget or people don’t know he was Scottish.
“Just going there and being in that environment, the history just seeps out of the walls.”
Last month, Compston denied singing along to pro-IRA lyrics while on stage at a Celtic convention in Las Vegas.
The actor issued a statement after a video emerged online from the event, in which he appeared on stage singing Daniel Boone's 1972 hit Beautiful Sunday.
But Compston said he had in fact been singing the original lyrics to the song, which has featured in Still Game.
Born of Irish immigrant parents in Edinburgh in 1868, Connolly left school when he was eleven to work with his brother at the Edinburgh Evening News as a printer’s ‘devil’, the boy who cleaned the inky rollers.
In 1893, he became involved with the Independent Labour Party formed by Keir Hardie.
He moved to Dublin where he founded the Irish Socialist Republican Party, becoming right-hand man to legendary trade unionist James Larkin.
The best-known period of his life came after 1914 and the creation of his socialist militia, the Irish Citizen Army.
Connolly was a key figure in the Easter Rising against British rule in Dublin.
He was tied to a chair when he was executed, aged 47, as he was unable to stand after being badly injured in the fighting.
Today, you have to look hard to find Connolly commemorated in Edinburgh, down in the Cowgate, where he was born.
Back then, the Cowgate was known as “Little Ireland”, and was one of the poorest slums in the city.
The plaque that marks Connolly’s birth can be found on a pillar of the arch of George IV Bridge, next to a row of Cowgate pubs.