<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.26.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>3159</ContextCount>
  <ElementCount>372</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>564</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>9</UnitCount>
  <MyReports>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>75000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>75010 - Statement - CONSOLIDATED STATEMENTS OF ASSETS AND LIABILITIES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/StatementConsolidatedStatementsOfAssetsAndLiabilities3</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF ASSETS AND LIABILITIES</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>75020 - Statement - CONSOLIDATED STATEMENTS OF ASSETS AND LIABILITIES (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/StatementConsolidatedStatementsOfAssetsAndLiabilitiesParenthetical</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF ASSETS AND LIABILITIES (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>75030 - Statement - CONSOLIDATED STATEMENTS OF OPERATIONS (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/StatementConsolidatedStatementsOfOperationsUnaudited</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF OPERATIONS (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>75040 - Statement - CONSOLIDATED STATEMENTS OF CHANGES IN NET ASSETS (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/StatementConsolidatedStatementsOfChangesInNetAssetsUnaudited</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CHANGES IN NET ASSETS (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>75050 - Statement - CONSOLIDATED STATEMENTS OF CASH FLOWS (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/StatementConsolidatedStatementsOfCashFlowsUnaudited</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CASH FLOWS (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>75060 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_StatementCONSOLIDATEDSCHEDULEOFINVESTMENTSUnaudited</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>75070 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS (Unaudited) - Interest Rate Swap</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsUnauditedInterestRateSwap</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS (Unaudited) - Interest Rate Swap</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>75080 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS (Parenthetical) (unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_StatementCONSOLIDATEDSCHEDULEOFINVESTMENTSParentheticalUnaudited</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS (Parenthetical) (unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>75090 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Fair Value along with Transactions in Affiliated Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsUnauditedFairValueAlongWithTransactionsInAffiliatedInvestments</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Fair Value along with Transactions in Affiliated Investments</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>75100 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Fair Value along with Transactions in Controlled Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsUnauditedFairValueAlongWithTransactionsInControlledInvestments</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Fair Value along with Transactions in Controlled Investments</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>75110 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Commitments to Funds</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsUnauditedCommitmentsToFunds1</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Commitments to Funds</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>75120 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Commitments to Funds (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsUnauditedCommitmentsToFundsParenthetical</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Commitments to Funds (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>75130 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Acquisition Dates of Restricted Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsUnauditedAcquisitionDatesOfRestrictedSecurities</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Acquisition Dates of Restricted Securities</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>75140 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Composition of Portfolio at Cost by Control Designation, Investment Type and Industry</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsUnauditedCompositionOfPortfolioAtCostByControlDesignationInvestmentTypeAndIndustry</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Composition of Portfolio at Cost by Control Designation, Investment Type and Industry</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>75150 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Composition of Portfolio at Fair Value by Control Designation, Investment Type and Industry</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsUnauditedCompositionOfPortfolioAtFairValueByControlDesignationInvestmentTypeAndIndustry</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Composition of Portfolio at Fair Value by Control Designation, Investment Type and Industry</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>75160 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Summary of Percentage of Total Investment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsUnauditedSummaryOfPercentageOfTotalInvestment</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS (unaudited) - Summary of Percentage of Total Investment</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>995410 - Disclosure - Pay vs Performance Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/PvpDisclosure</Role>
      <ShortName>Pay vs Performance Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>995470 - Disclosure - N-2</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/cef/role/N2</Role>
      <ShortName>N-2</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>995480 - Disclosure - Organization</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureOrganization</Role>
      <ShortName>Organization</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>995490 - Disclosure - Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureSignificantAccountingPolicies</Role>
      <ShortName>Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>995500 - Disclosure - Related Party Agreements and Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureRelatedPartyAgreementsAndTransactions</Role>
      <ShortName>Related Party Agreements and Transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>995510 - Disclosure - Earnings Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureEarningsPerShare</Role>
      <ShortName>Earnings Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>995520 - Disclosure - Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureInvestments</Role>
      <ShortName>Investments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>995530 - Disclosure - Debt and Foreign Currency Transactions and Translations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureDebtAndForeignCurrencyTransactionsAndTranslations</Role>
      <ShortName>Debt and Foreign Currency Transactions and Translations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>995540 - Disclosure - Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureStockholdersEquity</Role>
      <ShortName>Stockholders' Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>995550 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureCommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>995560 - Disclosure - Financial Highlights</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureFinancialHighlights</Role>
      <ShortName>Financial Highlights</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>995580 - Disclosure - Subsequent Events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureSubsequentEvents</Role>
      <ShortName>Subsequent Events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>995590 - Disclosure - Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureSignificantAccountingPolicies</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>995600 - Disclosure - Earnings Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureEarningsPerShareTables</Role>
      <ShortName>Earnings Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureEarningsPerShare</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>995610 - Disclosure - Investments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureInvestmentsTables</Role>
      <ShortName>Investments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureInvestments</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>995620 - Disclosure - Debt and Foreign Currency Transactions and Translations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureDebtAndForeignCurrencyTransactionsAndTranslationsTables</Role>
      <ShortName>Debt and Foreign Currency Transactions and Translations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureDebtAndForeignCurrencyTransactionsAndTranslations</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>995630 - Disclosure - Stockholders' Equity (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureStockholdersEquityTables</Role>
      <ShortName>Stockholders' Equity (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureStockholdersEquity</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>995640 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureCommitmentsAndContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureCommitmentsAndContingencies</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>995650 - Disclosure - Financial Highlights (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureFinancialHighlightsTables</Role>
      <ShortName>Financial Highlights (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureFinancialHighlights</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>995670 - Disclosure - Organization - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureOrganizationAdditionalInformationDetails</Role>
      <ShortName>Organization - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>995680 - Disclosure - Significant Accounting Policies - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureSignificantAccountingPoliciesAdditionalInformationDetails</Role>
      <ShortName>Significant Accounting Policies - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>995690 - Disclosure - Related Party Agreements and Transactions - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/DisclosureRelatedPartyAgreementsAndTransactionsAdditionalInformationDetails</Role>
      <ShortName>Related Party Agreements and Transactions - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>995700 - Disclosure - Earnings Per Share - Schedule of Computation of Earnings (Loss) Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureEarningsPerShareScheduleOfComputationOfEarningsLossPerShareDetails</Role>
      <ShortName>Earnings Per Share - Schedule of Computation of Earnings (Loss) Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>995710 - Disclosure - Investments - Schedule of Composition of Investment Portfolio (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureInvestmentsScheduleOfCompositionOfInvestmentPortfolioDetail</Role>
      <ShortName>Investments - Schedule of Composition of Investment Portfolio (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>995730 - Disclosure - Investments - Schedule of Changes in Fair Value of Investments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureInvestmentsScheduleOfChangesInFairValueOfInvestmentsDetail</Role>
      <ShortName>Investments - Schedule of Changes in Fair Value of Investments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>995740 - Disclosure - Investments - Schedule of Changes in Fair Value of Investments (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureInvestmentsScheduleOfChangesInFairValueOfInvestmentsParentheticalDetail</Role>
      <ShortName>Investments - Schedule of Changes in Fair Value of Investments (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>995750 - Disclosure - Investments - Summary of Unobservable Inputs Used in Fair Value Measurements of Level 3 Investments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureInvestmentsSummaryOfUnobservableInputsUsedInFairValueMeasurementsOfLevel3InvestmentsDetail</Role>
      <ShortName>Investments - Summary of Unobservable Inputs Used in Fair Value Measurements of Level 3 Investments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>995760 - Disclosure - Investments - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureInvestmentsAdditionalInformationDetails</Role>
      <ShortName>Investments - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>995770 - Disclosure - Investments - Summary of Change in Capitalized PIK balance (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureInvestmentsSummaryOfChangeInCapitalizedPIKBalanceDetails</Role>
      <ShortName>Investments - Summary of Change in Capitalized PIK balance (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>995780 - Disclosure - Investments - Schedule of Foreign Currency Forward Contracts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/DisclosureInvestmentsScheduleOfForeignCurrencyForwardContractsDetails</Role>
      <ShortName>Investments - Schedule of Foreign Currency Forward Contracts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>995790 - Disclosure - Investments - Schedule of Derivative Instruments, Gail (Loss) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/DisclosureInvestmentsScheduleOfDerivativeInstrumentsGailLossDetails</Role>
      <ShortName>Investments - Schedule of Derivative Instruments, Gail (Loss) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>995800 - Disclosure - Debt and Foreign Currency Transactions and Translations - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/DisclosureDebtAndForeignCurrencyTransactionsAndTranslationsAdditionalInformationDetails</Role>
      <ShortName>Debt and Foreign Currency Transactions and Translations - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>995810 - Disclosure - Debt and Foreign Currency Transactions and Translations - Schedule of Outstanding Debt Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureDebtAndForeignCurrencyTransactionsAndTranslationsScheduleOfOutstandingDebtObligationsDetails</Role>
      <ShortName>Debt and Foreign Currency Transactions and Translations - Schedule of Outstanding Debt Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>995820 - Disclosure - Debt and Foreign Currency Transactions and Translations - Schedule of Outstanding Debt Obligations (Parenthetical) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureDebtAndForeignCurrencyTransactionsAndTranslationsScheduleOfOutstandingDebtObligationsParentheticalDetails</Role>
      <ShortName>Debt and Foreign Currency Transactions and Translations - Schedule of Outstanding Debt Obligations (Parenthetical) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>995830 - Disclosure - Debt and Foreign Currency Transactions and Translations - Summarizes Average and Maximum Debt Outstanding and Interest and Debt Issuance Cost (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureDebtAndForeignCurrencyTransactionsAndTranslationsSummarizesAverageAndMaximumDebtOutstandingAndInterestAndDebtIssuanceCostDetails</Role>
      <ShortName>Debt and Foreign Currency Transactions and Translations - Summarizes Average and Maximum Debt Outstanding and Interest and Debt Issuance Cost (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>995840 - Disclosure - Debt and Foreign Currency Transactions and Translations - Summarizes Average and Maximum Debt Outstanding and Interest and Debt Issuance Cost (Parenthetical) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureDebtAndForeignCurrencyTransactionsAndTranslationsSummarizesAverageAndMaximumDebtOutstandingAndInterestAndDebtIssuanceCostParentheticalDetails</Role>
      <ShortName>Debt and Foreign Currency Transactions and Translations - Summarizes Average and Maximum Debt Outstanding and Interest and Debt Issuance Cost (Parenthetical) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>995850 - Disclosure - Debt and Foreign Currency Transactions and Translations - Summary of Foreign Denominated Debt Outstanding on Senior Secured Facility (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureDebtAndForeignCurrencyTransactionsAndTranslationsSummaryOfForeignDenominatedDebtOutstandingOnSeniorSecuredFacilityDetails</Role>
      <ShortName>Debt and Foreign Currency Transactions and Translations - Summary of Foreign Denominated Debt Outstanding on Senior Secured Facility (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>995860 - Disclosure - Stockholders' Equity - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureStockholdersEquityAdditionalInformationDetails</Role>
      <ShortName>Stockholders' Equity - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>995870 - Disclosure - Stockholders' Equity - Schedule of Repurchase Plans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureStockholdersEquityScheduleOfRepurchasePlansDetails</Role>
      <ShortName>Stockholders' Equity - Schedule of Repurchase Plans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>995880 - Disclosure - Stockholders' Equity - Summary of Allocated Amounts to be Repurchased (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureStockholdersEquitySummaryOfAllocatedAmountsToBeRepurchasedDetails</Role>
      <ShortName>Stockholders' Equity - Summary of Allocated Amounts to be Repurchased (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>995890 - Disclosure - Commitments and Contingencies - Summary of Unfunded Commitments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureCommitmentsAndContingenciesSummaryOfUnfundedCommitmentsDetails</Role>
      <ShortName>Commitments and Contingencies - Summary of Unfunded Commitments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>995900 - Disclosure - Commitments and Contingencies - Summary of Unfunded Commitments (Parenthetical) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureCommitmentsAndContingenciesSummaryOfUnfundedCommitmentsParentheticalDetails</Role>
      <ShortName>Commitments and Contingencies - Summary of Unfunded Commitments (Parenthetical) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>995910 - Disclosure - Financial Highlights - Schedule of Financial Highlights (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureFinancialHighlightsScheduleOfFinancialHighlightsDetails</Role>
      <ShortName>Financial Highlights - Schedule of Financial Highlights (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>995920 - Disclosure - Financial Highlights - Schedule of Financial Highlights (Parenthetical) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureFinancialHighlightsScheduleOfFinancialHighlightsParentheticalDetails</Role>
      <ShortName>Financial Highlights - Schedule of Financial Highlights (Parenthetical) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>995930 - Disclosure - Mergers with AFT and AIF - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/DisclosureMergersWithAftAndAifAdditionalInformationDetails</Role>
      <ShortName>Mergers with AFT and AIF - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>995950 - Disclosure - Mergers with AFT and AIF - Summary of Allocation of Purchase Price to Assets Acquired and Liabilities Assumed (Parenthetical) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/DisclosureMergersWithAftAndAifSummaryOfAllocationOfPurchasePriceToAssetsAcquiredAndLiabilitiesAssumedParentheticalDetails</Role>
      <ShortName>Mergers with AFT and AIF - Summary of Allocation of Purchase Price to Assets Acquired and Liabilities Assumed (Parenthetical) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="mfic-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>995960 - Disclosure - Subsequent Events - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20260331/taxonomy/role/Role_DisclosureSubsequentEventsAdditionalInformationDetails</Role>
      <ShortName>Subsequent Events - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-Q" isDefinitelyFs="true" isUsgaap="true" original="mfic-20260331.htm">mfic-20260331.htm</File>
    <File>mfic-20260331.xsd</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="34">http://fasb.org/srt/2025</BaseTaxonomy>
    <BaseTaxonomy items="11411">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="2">http://xbrl.sec.gov/cef/2025</BaseTaxonomy>
    <BaseTaxonomy items="32">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>false</HasPresentationLinkbase>
  <HasCalculationLinkbase>false</HasCalculationLinkbase>
</FilingSummary>
