At a little past seven on Sunday night, the bar at the Ritz in Oak Bluffs was lined with Islanders eating, drinking, chatting and observing as three young musicians set up their instruments.

“Shall we do this?” electric guitarist Sean McMahon asked over the microphone. “Yeah!” cried several voices in the crowd.

The trio, with Mr. McMahon’s brother Griffin on Roland keyboard and Jeremiah Roberts on drums, launched into their first number — the uptempo gospel standard “I Woke Up this Morning With My Mind Stayin’ on Jesus.”

Griffin McMahon on the keys. — Mark Alan Lovewell

Bar patrons, glasses in hand, sang along with the chorus, shouted “Hallelujah!” and burst into cheers and applause as the song ended.

So began another night of Dirty Gospel, the McMahon brothers’ Sunday night series at the Ritz. More customers came through the door, filling up tables and applauding enthusiastically as the group played inspirational hits like Norman Greenbaum’s Spirit in the Sky, Stevie Wonder’s Higher Ground, George Harrison’s My Sweet Lord, along with more traditional gospel tunes.

Leading the group on guitar and vocals, his long hair spilling out from beneath a brimmed hat, Sean McMahon reminded some in the crowd of a young Bob Dylan. Griffin McMahon’s strong left hand held down the bass and his rollicking keyboard solos drew applause, while Mr. Roberts propelled the beat.

“They’re amazing,” said Elizabeth Bradley, who sat at a table next to the band, knitting and smiling throughout the set. A teacher at the Tisbury School, Ms. Bradley said she came out for the show because “I love gospel and I love music.”

There’s no cover charge for Dirty Gospel, just a tip jar for cash contributions and song requests alike. And three weeks into a residency that’s expected to last through the summer, Sean said every show has brought a bigger audience than the one before.

“This is just the third night, but attendance has been doubling each time,” said the 30-year-old singer-songwriter, who moved to the Vineyard full-time last fall.

The core trio — Sean, Griffin, and a rotating cast of drummers — welcomes guest performers as well. On Sunday, Siren Mayhew sang Amazing Grace and the week before, 10 members of the choir at St. Andrew’s Church in Edgartown turned out to sing William Dawson’s Ain’a That Good News.

“It’s fantastic,” said choir member Kimberly McGrath. “We know all the songs.”

The McMahons are originally from western Massachusetts, but the Dirty Gospel concept appears to have originated in Brooklyn. While living in New York city, Sean became involved in ministry at an Episcopalian church called Bushwick Abbey that meets in the back of a bar. For the past 10 years, the congregation’s music director, Reverend Vince Anderson, has been playing a weekly Dirty Gospel show there.

The brothers McMahon with Jeremiah Roberts on drums. — Mark Alan Lovewell

“Working with him is pretty much what inspired me to do it,” Sean said. “I saw that people love that feel-good energy.”

“All of the songs are about love,” he added. “We’re small on the God talk and big on the good time.”

Before moving to New York, Sean studied contemporary improvisation at the New England Conservatory of Music in Boston, where he focused primarily on composition.

“It was a good time to be there,” he recalled. “I was classmates with all the Lake Street Dive kids,” referring to the celebrated indie pop-swing band formed by Conservatory students in the early 2000s.

Formerly called Third Stream, the conservatory’s eclectic program exposed him to musical traditions from around the world — many of them spiritual in nature, such as devotional music from India and Sufi songs from Pakistan. Though raised in a secular household, Sean found himself drawn to ministry and while in New York audited classes at Union Theological Seminary.

“I’ve preached on a few occasions as a layman,” he said. “I have not been ordained.”

His younger brother Griffin, meanwhile, had been smitten as a teen by organ music and wound up studying the instrument at the Juilliard School in New York, then moving to the Vineyard in 2016 for his job as organist and choir director at St. Andrew’s.

After visiting a few times to play with Griffin at Island venues, Sean made the move himself in 2017. He now lives in West Tisbury, working at Mocha Mott’s in Vineyard Haven and pursuing his music career both on and off-Island.

Because an Australian recording artist shares his name (“I literally have a doppelganger on the opposite end of the earth”), Mr. McMahon generally works under different monikers depending on the type of music he’s playing.

On Island, the groups he leads with Griffin are known as the Brothers McMahon. He also plays and records in a folk-psychedelic mode as the singer-songwriter Workman Song, and has a western Massachusetts project named Tidwell’s Treasure that he describes as “jazz-metal-circus.”

Some Workman Song and Tidwell’s Treasure recordings are available through online platforms such as Spotify and Bandcamp. Sean also has what he calls a “back catalog” of unreleased recordings, including an album of piano ballads — and he continues to record about five new songs a month.

“I’m trying to figure out a smart way to release them so people hear about them and listen to them,” he said.

While based on the Vineyard now, Sean frequently travels off-Island for performances around New England. That doesn’t leave much time for traditional church-going: “Sunday mornings are hard for me, because I tend to work very hard on Saturday nights,” he confessed.

But by the time Sunday night rolls around, Sean is ready to rock the Ritz in gospel style.

Dirty Gospel at the Ritz: Sundays, 7 p.m. to 9 p.m.