At the risk of ruining this for myself: The best time to go to Oyster House is when no one’s there.

First comes the lunch crush, when lint-rolled office types pack in for clam rolls, Cape May Salts and surreptitious Bloody Caesars. That’s followed by the boisterous buck-per-shuck happy hour, a 120-minute window that stuffs the bar with revelers. This leads into dinner, when the room accommodates a steady shuffle of cutesy couples and groups with big eyes for Little Shemogues.

A few moments of calm in this rarely calm room reveal contradictory details, but some background is required to grasp Oyster House in widescreen. Celebrating its 40th year in business this summer, Philly’s Oyster House is up for canonization by typical restaurant standards, but its big-city bloodline can be traced back further, to the halcyon days of the American oyster bar.

♦♦♦

Establishments like this one have been giving it to us raw since the 17th century and still stake a claim along our dining spectrum, though their appeal, and their function, has evolved. Some, like Oyster House, have ridden the wave of intensifying tastes, redefining how they do things. Others haven’t changed a bit. A simple truth connects them all, no matter their relationship with modernity: Eating oysters, in a carefully tuned atmosphere that encourages you to keep eating them, is elemental.

As M.F.K. Fisher put it, “Men have enjoyed eating oysters since they were not much more than monkeys.” Though commercial oyster-selling has its roots in coastal nations like France, the United Kingdom and the Netherlands, humans have been sucking them down for millennia. According to Mark Kurlansky’s The Big Oyster, archaeologists date human bivalve consumption along America’s East Coast all the way back to 6950 B.C. A genetic predilection may have influenced where in America the earliest European interlopers chose to settle. In Sex, Death and Oysters, Robb Walsh cites Robert de La Salle’s eagerly advocating for Louis XIV to claim oyster-rich Louisiana for France, given the Sun King’s soft spot for shuckables.

New York Bay, too, was stuffed to the gills with oyster beds, which led to Manhattan’s early reputation as an epicenter for oyster commerce. Opened in 1641, the Dutch-built Stadt Herberg is among the earliest recorded examples of an oyster-shucking establishment in America. The tally of comparable oyster bars would swell here in subsequent centuries. (The name of Pearl Street, in lower Manhattan, is not incidental.) Though many of these bars were dark, inexpensive subterranean lairs catering to a blue-collar clientele — proto-fast food, basically — oyster obsession leapfrogged class divides. “They were food for gourmets, gourmands, and those who were simply hungry; tantalizing the wealthy in stately homes and sustaining the poor in wretched slums; a part of city commerce and a part of international trade,” writes Kurlansky.

The mid-1800s through the early 1900s, give or take a few years, is considered the golden age of oyster consumption in America, though once-robust estuaries were beginning to show signs of wear by the turn of the 20th century. Landmarks like Boston’s Union Oyster House (opened in 1826); New York’s Grand Central Oyster Bar & Restaurant (1913); Acme Oyster House (1910) and Casamento’s (1919) in New Orleans; and Swan Oyster Depot (1912) in San Francisco popped up in this window. All still shuck today.

Philadelphia was way in on this action. In 1881, a United States Bureau of Fisheries report identified 379 oyster bars in the City of Brotherly Love alone. Twenty years after that study, Kelly’s on Mole Street, the spiritual predecessor of today’s Oyster House, would open.

Sam Mink took over Kelly’s from the Kelly family in 1947. As an attorney, he did not have much restaurant experience, so when circumstances demanded he take on a more hands-on role with the business, he recruited his kids to help. “It was part of the responsibility in the family,” says David Mink, Sam’s son, who worked the cash register as a teenager. Right near Philly’s gargantuan City Hall, Kelly’s became a de facto clubhouse for judges, lawyers and politicos. In 1961, the restaurant celebrated the repeal of a 1771 conservation act prohibiting oyster sales between May and September by lighting a copy of the law ablaze, as influential men in suits stood on and cheered.

In 1969, city construction forced the restaurant to relocate, but Sam would pass away before the debut of Kelly’s 2.0. David, then a senior art history major at Cornell, dropped out of school to take over the business. He ran it for a few years before deciding it wasn’t for him; the Minks sold, and David moved to Israel with his now-wife.

♦♦♦

A change of heart brought David back to his hometown to launch a new business, Sansom Street Oyster House, in 1976. He knew the climate for oyster eaters had shifted dramatically from the Kelly’s days, in large part to shifting marine ecology. “A long time ago, oysters were plentiful and inexpensive. There used to be an oyster bar in every parish in Philadelphia, but they were all gone,” says David. “They went the way of the buggy whip.”

The menu then was straight-up. Long Island Blue Points were the primary oyster. Shrimp cocktail, broiled fish, deviled crab, fried and steamed seafood and a handful of sandwiches rounded out the non-raw. Snapper soup, a stratifying Philly specialty finished with chopped egg and a drizzled spiral of sherry, went for 75 cents a cup. Other local signatures had their place, too — shad and shad roe; fried oysters and chicken salad, a pairing thought to have originated with the African-American chefs of Philly’s affluent private social clubs.

The clientele was straight-up, too. Still plenty of men in suits, given the concentration of law firms around Sansom Street at that time. But the restaurant also drew from Philadelphia’s enormous working class, students and secretaries and cops and construction workers who happened to be equally particular about where they got their seafood.

Like Kelly’s before it, David’s operation, a long, narrow luncheonette replete with wood paneling, was a family affair. David’s son, Sam, born the same year the restaurant opened and named for the grandfather he never got to meet, was swiftly indoctrinated, hoisted onto a milk carton at the salad station to help out when he wasn’t in school. By the late ’90s, David was ready to take a step back. He asked Sam, fresh out of college and living in San Francisco, if he was interested in buying in — a luxury of choice he never had when he was his son’s age. “I said no, and my sister said no, too,” says Sam. “I didn’t want my father’s restaurant. At least not at 23 years old.”

Sansom Street Oyster House would sell in 2000 to a chef outside the family; he would eventually file for bankruptcy, leaving David, who still owned the building, with the keys. Though Sam, who by then was working as a line cook and server in San Francisco, initially passed on the opportunity to make the Oyster House his own, he took his second shot, overhauling every inch and reopening under his own watch in 2009. “I didn’t want to just come in and paint the walls. I wanted to knock it down and open a brand-new restaurant,” says Sam. “It had to change. It couldn’t stay where it was.”

Though the physical transformation was dramatic — opened and brightened considerably, with no paneling to speak of — the culinary shift was comparably massive. “I knew [tastes] had changed,” says Sam. “I wanted to offer something new. I didn’t want to do broiled bluefish and pick your two sides. I wanted composed dishes with local ingredients.”

Those aforementioned Philly classics have earned hall-of-fame menu status, and there are aesthetic nods to the past throughout — those opulent oyster plates; the nod-to-Kelly’s “Mole Street” sign sitting on a shelf behind the 13-seat cocktail bar, just above the scotch. (Though retired, David is still involved; he visits the South Philly fish markets every morning to handpick product for the coming day.)

But Oyster House has blossomed into a contemporary restaurant in its own right. Chef Brett Naylor works off a highly seasonal menu — see his current soft-shell crab setup, with bulgur wheat, asparagus and the Latin touches of pepitas and roasted poblano sauce. The oyster selection, once limited to Long Island, now reaches from the Mid-Atlantic all the way up past New England into Canada. The cocktail bartenders are among Philly’s most talented and consistent. They’re on Instagram.

Oyster House has much more in common with buzzy modern seafood houses around the U.S. — L&E in Los Angeles, the Walrus and Carpenter in Seattle, Eventide in Cambridge, Massachusetts, the Ordinary in Charleston, South Carolina — than the golden-age shucking stations that laid the groundwork for this new generation. But Sam Mink is content paying rent in both worlds — a delicately calibrated approach that holds the past and the future in identical stead. Due to shifts in consumer desire, economic scale and aquaculture, the American oyster bar is no longer synonymous with thrift or working-class dining, but at Oyster House, the past will always inform the present.

“I never want anyone to say the words ‘chic’ or ‘hip’ when they describe us,” says Sam. “I want it to be accessible to all.”

Oyster House, 1516 Sansom St., Philadelphia, PA 19102; 215-567-7683; oysterhousephilly.com