WASHINGTON — Prime-time television’s most committed political enthusiast, Leslie Knope, stood on the hotel balcony with her back to a view that would surely set her public servant’s heart racing: the postcard-ready front of the White House, bisected above roof height by the alabaster needle of the Washington Monument and, looming above, the imposing dome of the Capitol.

Leslie’s gray power suit was appropriate for the occasion, but the cherry-red Keds gave the game away. This was Amy Poehler, who once memorably played Hillary Rodham Clinton on “Saturday Night Live” and who now plays Leslie, who worships Mrs. Clinton, on the NBC comedy “Parks and Recreation,” shooting a scene on location: a balcony on the ninth floor of the elegant Hay-Adams Hotel. (The camera frame made sure not to include her footwear.)

The cast and crew of “Parks and Recreation” had come to Washington and its sweltering July heat for the glorious location shots and, more important, its senators. Barbara Boxer, Olympia Snowe and John McCain were on the way to take part in an episode set in Washington — “as long as Afghanistan doesn’t invade Kyrgyzstan,” said Michael Schur, the executive producer who runs “Parks and Recreation.” “We just found out they already had a vote today, so we’re just hoping they can actually take a break and show up.”

Nobody was anticipating the guest stars more than Ms. Poehler, who said she hoped Mr. McCain would remember “the time we shot a scene in the shower together.” That was on “SNL,” when Mr. McCain hosted the show in 2002. It hardly seemed like a moment anyone would be likely to forget, but Ms. Poehler said, “It’s all a beautiful, hazy blur what happened in there.”