When Mary Logan, widow of U.S. Sen. John A. Logan of Illinois, penned her 1901 memoir, “Thirty Years in Washington,” she reflected on the deepest desires of the society women who visited the White House. “Some visitors plead for just a glimpse of Mrs. President,” she wrote, “but being assured that this is impossible they sometime seek to compromise by asking permission to peep at the White House kitchen.”

According to historian William Seale, in the early days that “peep” was literal: Tourists entering the north side of the building could look down directly into the kitchen. Knowing that few would be lucky enough to visit the executive mansion, Logan provided a photograph of the first family’s private kitchen. Amid the coal-fired range, tables, pots and pans stands a nameless African American woman dutifully preparing coffee. Unwittingly, that photograph brought into plain view a rich but hidden legacy. Since the days of George Washington, African Americans have worked in presidential kitchens as stewards acquiring provisions, as assistants doing prep work and cleanup and as chefs preparing the meals — those last often presiding over the entire culinary operation.

That fact seems obvious now, but I never really thought about it until I began researching for and writing a history of soul food, years after I had worked in the Clinton White House. Had I known, I would have poked my head in the kitchen a few times and asked a few questions while deeply inhaling the aroma of rich food and rich history.

Those cooks took various paths to the White House kitchen. Some presidents brought their slaves and family servants. That helped them maintain some culinary continuity with life before the presidency and, in the case of the slaves, saved the presidents from paying for the labor in the decades before such household costs were covered by taxpayers.

Other slaves and servants were loaned from wealthy families in the District who welcomed the opportunity to assist a president in need. The rest were skilled cooks who were hired outright or recommended to the first family by a friend.

The prevalent racial attitudes of the 1800s and much of the 1900s placed African Americans as a “natural” fit for the kitchen. Thus, cooking was one of the few professions in which African Americans were encouraged to hone their skills and make a living. They excelled and soon earned a collective reputation that rivaled, and at times exceeded, that of French chefs.

When 23rd president Benjamin Harrison and his wife, Caroline, fired their French chef and hired Dolly Johnson, a free black woman who had worked for them in Indianapolis, the move made national headlines. This is in jarring contrast with the recent headlines we’ve seen asking, “Where are all of the black chefs?” Then, as now, they were there doing their thing, hiding in plain sight.

Once in the kitchen, African American presidential chefs were a tremendous asset in cultivating the president’s public image. Since the earliest days of our republic, Americans have been concerned that their president preferred the haute cuisine required for entertaining Washington’s social elites and foreign dignitaries over the foods of everyday people. Presidents became skilled at reassuring the public that they preferred comfort food — often made by black cooks — over fancy food. Picture Franklin Delano Roosevelt gnawing on broiled pig’s feet, John F. Kennedy devouring a bowl of seafood chowder or Ronald Reagan grubbing on mac and cheese.

This presidential love of comfort food often created tension in the kitchen between the classically trained European chefs and the “home-trained” black cooks who consistently won the hearts of the First Diners and their guests. The White House table featured such soulful favorites as fried chicken, greens, okra and sweet potato pie next to consomme and blancmange. Many presidents chose to mediate the tension by having the black cooks make the private meals while the European chefs handled grand entertainments.

Perhaps the trickiest situation was the often-comical dance of the first lady and the White House physician instructing the cooks to keep the president on a strict diet, while the president demanded — pleaded for, really — something fried, salty or sweet. Guess who usually won?

The contributions of African American cooks went beyond the kitchen, particularly when the cooks advocated for civil rights. Some protested the racial caste system by escaping from their presidential masters, as Washington’s renowned and enslaved cook Hercules did in 1797. For decades after emancipation, frustrated civil rights leaders who couldn’t get an audience in the Oval Office would bend the ear of African American presidential cooks with the fervent hope that they would do the same when the president came to the dining table.

Maid and part-time cook Lizzie McDuffie served as an effective go-between during the Franklin Roosevelt administration and even hit the campaign trail in 1936 to bolster her boss’s electoral chances with African American voters in key cities. Zephyr Wright, Lyndon Johnson’s longtime family cook, became a face of the civil rights movement because Johnson used her humiliating Jim Crow experiences to sway reluctant congressmen to support the 1964 Civil Rights Act. Johnson also trusted Wright as the equivalent of an “insta-poll” by regularly asking her how he was doing with his African American constituency.

Wright represented the zenith of influence that African Americans have had on the presidential kitchen. Jacqueline Kennedy placed an emphasis on European food prepared by European-trained chefs, which began the gradual phase-out of the African American cooks who lacked such formal training. Once they retired or moved on, few African Americans replaced them.

Yet the legacy of African American presidential chefs is not collecting dust in presidential archives, in old cookbooks or in the fading memories of former first families. It’s alive right now, with three African Americans serving in the Obama White House kitchen alongside executive chef Cristeta Comerford, the Air Force One stewards and the staff cooks on loan from the military in the White House mess and at Camp David.

As culinary talents, family confidants and civil rights advocates, these men and women have done our nation the invaluable service of nourishing the most powerful men on Earth and their families. What you’ve read is the view with this unique window on the presidency just slightly cracked open. As the success of the 2013 movie “The Butler” has shown, people are hungry for more than a peep at what happens behind the scenes in the White House.

It’s time for a closer look at the kitchen, to learn more about the diverse group of people who made it great.

Miller, former special assistant to President Bill Clinton, is the author of “Soul Food: The Surprising Story of an American Cuisine, One Plate at a Time” (The University of North Carolina Press, 2013). He’s working on a TV documentary about African American presidential chefs entitled “The President’s Kitchen Cabinet” and conducts a Kickstarter crowd-funding campaign for it at https://