BOSTON — Renowned endurance athlete Dave McGillivray will attempt to run the 123rd B.A.A. Boston Marathon just six months after undergoing open-heart, triple-bypass surgery Oct. 12.

McGillivray was the keynote speaker for the 2017 DeMar Marathon. One might say his determination to run shows shades of Clarence DeMar himself, who won the 1911 Boston Marathon despite pre-race doctor warnings of a heart murmur.

This will be McGillivray’s 47th consecutive running of the world-famous marathon, of which he is race director. He will make his attempt after completing his official race day duties.

“Without question, this will be my most challenging marathon ever,” McGillivray said. “The 30,000 runners in the race are my number one priority. I only start thinking about my own run later in the afternoon when the final finishers are nearing the end of the race.” Depending on how the day unfolds, he expects to start in the late afternoon and finish around 10 or 11 p.m.

This will be McGillivray’s 156th competitive marathon, his 47th Boston Marathon, and the 32nd time running the race at night.

McGillivray’s medical team is supportive but also cautious about his attempt to run the marathon so soon after surgery.

“Dave knows his own body better than anyone and I support his efforts as long as he takes it slow and remains patient throughout his run,” said Dr. David D’Alessandro, McGillivray’s heart surgeon from Massachusetts General Hospital.

McGillivray said he asked D’Alessandro before the surgery if he thought he could run the marathon six months later, and his surgeon said, “I would be extremely disappointed if you couldn’t.”

McGillivray was released from Massachusetts General Hospital four-and-a-half days after his surgery. He first started a walking program and eventually progressed to running without walking. He ran a half-marathon in early March; his longest run the past seven months has been 18 miles.

“I have my good days and I have my not-so-good days,” McGillivray said. “My breathing is still labored but I’m making progress. For me, the only bad day I could ever have anymore is if I didn’t wake up at all. I consider every day now as a gift.”

This year, 13 other running friends will join him, including nine who participated alongside McGillivray in the 2018 World Marathon Challenge, running seven marathons in seven days on seven continents. They will be supported by McGillivray’s brother, Bob, and longtime friend Ron Kramer, who will leap-frog the group down the course while providing water and food as needed. A few medical professionals will also join them as a precaution.

In addition to directing major, competitive road races like the Boston Marathon and the TD Beach to Beacon 10K in Maine as the owner of DMSE Sports, McGillivray, 64, is known for pioneering the marriage between philanthropy and athletics, completing feats of endurance for good causes.

This year, McGillivray will run the Boston Marathon as part of Team Big Heart, the marathon running team for the Joseph Middlemiss Big Heart Foundation with a personal fundraising goal of $100,000. The non-profit was formed by the parents of six-year-old Joseph Middlemiss, who died in September 2013 from cardiomyopathy.

The funds raised by McGillivray and others will be invested in the foundation’s mission to contribute to research for and spread awareness of childhood heart conditions while providing financial, social, and emotional assistance to families impacted by these illnesses.

“I can’t think of a more appropriate and deserving cause than this one,” explained McGillivray. His younger brother, Jack, was born with the same condition and only a year ago underwent a successful heart transplant procedure.

Speaking at a pre-DeMar pasta dinner in Keeene in 2017, McGillivray put a charge in runners with advice and stories meant to inspire.

“You’re all human interest stories,” he told the dozens of runners, family members and race staff assembled in the Marriott’s Courtyard Hotel. “You’re all inspirations — but because I have the mic, I’ll do it.”