ST. LOUIS -- Pirates right-hander James McDonald didn't have his best stuff in his first regular-season start on Tuesday night at Busch Stadium, but he took a step forward.
Sidelined for a stretch of Spring Training with a strained oblique muscle, McDonald gave Pittsburgh a chance to win. But the Pirates' lineup struggled after a two-run homer by first baseman Lyle Overbay in the first inning, and the Cardinals pulled out a 3-2 victory.
"It was progress," McDonald said. "I got into some situations, but I'm proud of the way I controlled the situations and got out of jams. I didn't have my great stuff today, but I had enough stuff to compete and keep my team in the game, so I was happy."
McDonald allowed two runs on four hits over 4 2/3 innings, with four walks and four strikeouts. He threw 87 pitches, with 51 for strikes, and worked out of trouble in the first and fourth innings.
"His arm was strong," Pirates manager Clint Hurdle said. "Threw some good breaking balls. Command a little iffy right now, but he battled. To almost get through five and give up two runs, it was a good step forward for him. He got up in the higher 80s with his pitches from 69 last time. He needs to get in front of hitters a little bit more. He was behind a lot of hitters today. But I thought it was a good effort for him."
Overbay said: "He pitched real well. He got into a little jam and he got out of it. We have to stay away from those big innings. He gave us a chance. Hopefully he can build off that."
Pittsburgh (3-2) was trying to secure its second road series victory of the season but struggled throughout the lineup against Cardinals starter Kyle McClellan and three relievers.
McClellan, who was making his first Major League start after three seasons as a reliever, allowed two runs on six hits over six innings with seven strikeouts and one walk.
"He was effective and he was good down," Hurdle said. "A good mix of pitches. He controlled our bat speed. A lot of swing-and-miss stuff."
Overbay and center fielder Andrew McCutchen had two hits apiece, which accounted for half of the Pirates' eight hits. Pittsburgh was 1-for-8 with runners in scoring position, left seven runners stranded and combined for 11 strikeouts.
"I think we're kind of doubting our game plan a little bit," Overbay said. "You end up taking the pitches that you should be hitting and swinging at their pitches. It's just a matter of getting up and making sure we're swinging at our pitches and not letting the pitcher dictate what we want to swing at."
Overbay salvaged a leadoff double by left fielder Jose Tabata and gave the visitors an early lead in the first inning with his first home run as a Pirate, a long two-out, two-run shot off McClellan that he launched into the Cardinals' bullpen in right field.
"Curveball," McClellan said. "I'll take that every time. We know he's a good two-strike breaking ball hitter. You tip your hat. He hit it, I hung it. It wasn't exactly where I wanted it, but I'll take my chances on throwing my curveball. But again, you tip your hat there."
The Cardinals (2-3) couldn't record a hit off McDonald until the fourth inning, when right fielder Lance Berkman pounded a leadoff double off the left-field wall. Berkman then scored when the next batter, left fielder Allen Craig, knocked an RBI single up the middle.
St. Louis knocked McDonald out of the game in the fifth inning after Albert Pujols followed up back-to-back singles by shortstop Ryan Theriot and center fielder Colby Rasmus with a sacrifice fly to center field that tied the score at 2.
The Cardinals took the lead in the seventh inning, after two batters reached base against lefty reliever Garrett Olson. He was relieved by right-hander Chris Resop, who then allowed an RBI single through the left side of the infield by Pujols to give St. Louis a 3-2 lead.
"He made a good pitch to Pujols," Hurdle said. "He got a two-hopper and it found the hole."
The Pirates couldn't take advantage of runners in scoring position in the sixth, seventh or eighth innings.
Ryan Doumit got a pinch-hit single off Cardinals closer Ryan Franklin with two outs in the bottom of the ninth and was replaced on the basepaths by Josh Rodriguez, who was making his Major League debut as a pinch-runner. But then pinch-hitter Steven Pearce, in his first at-bat of the season, struck out to end the game as Franklin recorded his first save on the year.
Nate Latsch is a contributor to MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.