PANAMA — In the wee hours of Friday morning, Danilo Pérez climbed onstage at his jazz club here to play a set. Mr. Pérez, the Panama-born pianist and composer who has for more than a decade been a member of Wayne Shorter’s acclaimed quartet, had already headlined shows for the Panama Jazz Festival, which he founded 12 years ago. There he had performed alongside the Puerto Rican saxophonist Miguel Zenón and his fellow Panamanian, the salsa singer Rubén Blades, and in the festival’s gala concert at the 106-year-old National Theater.

And here he was, at 1:30 a.m. Friday, sitting behind the grand piano in the intimate Danilo’s Jazz Club, the city’s only performance space dedicated exclusively to jazz, now packed with friends and visitors. He was joined by John Patitucci, the Shorter quartet bassist, and a host of international musicians and students, eager to improvise alongside the masters. Nêgah Santos, 24, a Brazilian powerhouse in denim shorts, gave her congas a workout; Samuel Batista, 24, a Panamanian in his third year at the Berklee College of Music in Boston, drew full-throated cheers with his saxophone. The jam lasted until closing time, and afterward Mr. Pérez gathered his young charges at a cocktail table to dispense encouragement and wisdom. “This kind of thing wakes you up, right?” he said, grinning.

Even in jazz, which has a long tradition of mentorship, Mr. Pérez, 49, has emerged as a singular figure. Nearly 30 years after he left his native Panama to study jazz composition at Berklee, he has made promoting musicianship in Panama — using music as a springboard, cultural unifier and teaching tool — his life’s work. In 2005, a year after he started the jazz festival with his family, he created the Danilo Pérez Foundation, a nonprofit center for music education and outreach; the festival, which draws as many as 30,000 people over its six-day run each January, provides money for the foundation. The club, which opened last February at the new American Trade Hotel, a luxe outpost of the Ace Hotel chain, is, in his view, the last piece of the puzzle.

“Having a club really helps to focus the work,” Mr. Pérez said, “to provide a space to connect with all these people who are eager to hear more music.” For musicians, a year-round place to perform is “a double blessing,” he added. He had Mr. Shorter’s sound engineer develop the acoustics with the aim of recording there, à la the Village Vanguard. “We hope that with the club, Panama becomes the capital of jazz in Latin America,” Mr. Pérez said.