EX-23.1 5 d529839dex231.htm EX-23.1 EX-23.1

Exhibit 23.1

Consent of Independent Registered Public Accounting Firm

We consent to the incorporation by reference in this Registration Statement on Form S-3 and related Prospectus of Mid Penn Bancorp, Inc. of our reports dated March 16, 2023, relating to the consolidated financial statements and the effectiveness of internal control over financial reporting of Mid Penn Bancorp, Inc. and Subsidiaries, appearing in the Annual Report on Form 10-K of Mid Penn Bancorp, Inc. for the year ended December 31, 2022.

We also consent to the reference to our firm under the heading “Experts” in such Prospectus.

/s/ RSM US LLP

Philadelphia, Pennsylvania

August 23, 2023