EXHIBIT 23.1
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
We consent to the incorporation by reference in the Registration Statement (No.333-271227) on Form N-2 of our reports dated February 25, 2025, relating to the consolidated financial statements of Midcap Financial Investment Corporation (the “Company”) and the effectiveness of internal control over financial reporting appearing in the Annual Report on Form 10-K of the Company for the year ended December 31, 2024.
/s/ Deloitte & Touche LLP
New York, New York
February 25, 2025