<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.25.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>3337</ContextCount>
  <ElementCount>468</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>748</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>10</UnitCount>
  <MyReports>
    <Report instance="mfic-20251231.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/20251231/taxonomy/role/Role_DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="mfic-20251231.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/20251231/taxonomy/role/StatementConsolidatedStatementsOfAssetsAndLiabilities</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF ASSETS AND LIABILITIES</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="mfic-20251231.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/20251231/taxonomy/role/StatementConsolidatedStatementsOfAssetsAndLiabilitiesParenthetical</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF ASSETS AND LIABILITIES (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>75030 - Statement - CONSOLIDATED STATEMENTS OF OPERATIONS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/StatementConsolidatedStatementsOfOperations</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF OPERATIONS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>75040 - Statement - CONSOLIDATED STATEMENTS OF CHANGES IN NET ASSETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/StatementConsolidatedStatementsOfChangesInNetAssets</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CHANGES IN NET ASSETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>75050 - Statement - CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/StatementConsolidatedStatementsOfCashFlows</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>75060 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/StatementConsolidatedScheduleOfInvestments2</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>75070 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsParenthetical</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>75080 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS - Fair Value along with Transactions in Affiliated Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsFairValueAlongWithTransactionsInAffiliatedInvestments</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS - Fair Value along with Transactions in Affiliated Investments</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>75090 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS - Fair Value along with Transactions in Controlled Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsFairValueAlongWithTransactionsInControlledInvestments</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS - Fair Value along with Transactions in Controlled Investments</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>75100 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS - Commitments to Funds</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsCommitmentsToFunds</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS - Commitments to Funds</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>75110 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS - Commitments to Funds (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsCommitmentsToFundsParenthetical</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS - Commitments to Funds (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>75120 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS - Acquisition Dates of Restricted Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsAcquisitionDatesOfRestrictedSecurities</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS - Acquisition Dates of Restricted Securities</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>75130 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS - Composition of Portfolio at Cost by Control Designation, Investment Type and Industry</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsCompositionOfPortfolioAtCostByControlDesignationInvestmentTypeAndIndustry</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS - Composition of Portfolio at Cost by Control Designation, Investment Type and Industry</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>75140 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS - Composition of Portfolio at Fair Value by Control Designation, Investment Type and Industry</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsCompositionOfPortfolioAtFairValueByControlDesignationInvestmentTypeAndIndustry</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS - Composition of Portfolio at Fair Value by Control Designation, Investment Type and Industry</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>75150 - Statement - CONSOLIDATED SCHEDULE OF INVESTMENTS - Summary of Percentage of Total Investment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/StatementConsolidatedScheduleOfInvestmentsSummaryOfPercentageOfTotalInvestment</Role>
      <ShortName>CONSOLIDATED SCHEDULE OF INVESTMENTS - Summary of Percentage of Total Investment</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.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>17</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.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>18</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.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>19</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>995480 - Disclosure - Cybersecurity Risk Management, Strategy, and Governance</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureCybersecurityRiskManagementStrategyAndGovernance</Role>
      <ShortName>Cybersecurity Risk Management, Strategy, and Governance</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>995490 - Disclosure - Organization</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureOrganization</Role>
      <ShortName>Organization</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>995500 - Disclosure - Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureSignificantAccountingPolicies</Role>
      <ShortName>Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>995520 - Disclosure - Related Party Agreements and Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureRelatedPartyAgreementsAndTransactions</Role>
      <ShortName>Related Party Agreements and Transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>995530 - Disclosure - Earnings Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureEarningsPerShare</Role>
      <ShortName>Earnings Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>995540 - Disclosure - Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureInvestments</Role>
      <ShortName>Investments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>995550 - Disclosure - Debt and Foreign Currency Transactions and Translations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureDebtAndForeignCurrencyTransactionsAndTranslations</Role>
      <ShortName>Debt and Foreign Currency Transactions and Translations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>995560 - Disclosure - Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureStockholdersEquity</Role>
      <ShortName>Stockholders' Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>995570 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureCommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>995580 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureIncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>995590 - Disclosure - Financial Highlights</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureFinancialHighlights</Role>
      <ShortName>Financial Highlights</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>995610 - Disclosure - Senior Securities Table</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureSeniorSecuritiesTable</Role>
      <ShortName>Senior Securities Table</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>995620 - Disclosure - Mergers with AFT and AIF</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureMergersWithAftAndAif</Role>
      <ShortName>Mergers with AFT and AIF</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>995640 - Disclosure - Subsequent Events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureSubsequentEvents</Role>
      <ShortName>Subsequent Events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>995650 - Disclosure - Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureSignificantAccountingPolicies</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>995660 - Disclosure - Earnings Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureEarningsPerShareTables</Role>
      <ShortName>Earnings Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureEarningsPerShare</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>995670 - Disclosure - Investments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureInvestmentsTables</Role>
      <ShortName>Investments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureInvestments</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>995680 - Disclosure - Debt and Foreign Currency Transactions and Translations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureDebtAndForeignCurrencyTransactionsAndTranslationsTables</Role>
      <ShortName>Debt and Foreign Currency Transactions and Translations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureDebtAndForeignCurrencyTransactionsAndTranslations</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>995690 - Disclosure - Stockholders' Equity (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureStockholdersEquityTables</Role>
      <ShortName>Stockholders' Equity (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureStockholdersEquity</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>995700 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureCommitmentsAndContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureCommitmentsAndContingencies</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>995710 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureIncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureIncomeTaxes</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>995720 - Disclosure - Financial Highlights (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureFinancialHighlightsTables</Role>
      <ShortName>Financial Highlights (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureFinancialHighlights</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>995740 - Disclosure - Senior Securities Table (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureSeniorSecuritiesTableTables</Role>
      <ShortName>Senior Securities Table (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureSeniorSecuritiesTable</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>995750 - Disclosure - Mergers with AFT and AIF (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureMergersWithAftAndAifTables</Role>
      <ShortName>Mergers with AFT and AIF (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureMergersWithAftAndAif</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>995760 - Disclosure - Organization - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureOrganizationAdditionalInformationDetails</Role>
      <ShortName>Organization - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>995770 - Disclosure - Significant Accounting Policies - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureSignificantAccountingPoliciesAdditionalInformationDetails</Role>
      <ShortName>Significant Accounting Policies - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>995780 - Disclosure - Related Party Agreements and Transactions - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureRelatedPartyAgreementsAndTransactionsAdditionalInformationDetails</Role>
      <ShortName>Related Party Agreements and Transactions - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>995790 - Disclosure - Earnings Per Share - Schedule of Computation of Earnings (Loss) Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureEarningsPerShareScheduleOfComputationOfEarningsLossPerShareDetails</Role>
      <ShortName>Earnings Per Share - Schedule of Computation of Earnings (Loss) Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>995800 - Disclosure - Investments - Schedule of Composition of Investment Portfolio (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureInvestmentsScheduleOfCompositionOfInvestmentPortfolioDetail</Role>
      <ShortName>Investments - Schedule of Composition of Investment Portfolio (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>995810 - Disclosure - Investments - Schedule of Changes in Fair Value of Investments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureInvestmentsScheduleOfChangesInFairValueOfInvestmentsDetail</Role>
      <ShortName>Investments - Schedule of Changes in Fair Value of Investments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>995820 - Disclosure - Investments - Schedule of Changes in Fair Value of Investments (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureInvestmentsScheduleOfChangesInFairValueOfInvestmentsParentheticalDetail</Role>
      <ShortName>Investments - Schedule of Changes in Fair Value of Investments (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>995830 - 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/20251231/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>51</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>995840 - Disclosure - Investments - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureInvestmentsAdditionalInformationDetails</Role>
      <ShortName>Investments - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>995850 - Disclosure - Investments - Summary of Change in Capitalized PIK balance (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureInvestmentsSummaryOfChangeInCapitalizedPIKBalanceDetails</Role>
      <ShortName>Investments - Summary of Change in Capitalized PIK balance (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>995860 - Disclosure - Investments - Summarized Financial Information of Subsidiary (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureInvestmentsSummarizedFinancialInformationOfSubsidiaryDetails</Role>
      <ShortName>Investments - Summarized Financial Information of Subsidiary (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>995870 - Disclosure - Debt and Foreign Currency Transactions and Translations - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureDebtAndForeignCurrencyTransactionsAndTranslationsAdditionalInformationDetails</Role>
      <ShortName>Debt and Foreign Currency Transactions and Translations - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>995880 - Disclosure - Debt and Foreign Currency Transactions and Translations - Schedule of Outstanding Debt Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureDebtAndForeignCurrencyTransactionsAndTranslationsScheduleOfOutstandingDebtObligationsDetails</Role>
      <ShortName>Debt and Foreign Currency Transactions and Translations - Schedule of Outstanding Debt Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>995890 - Disclosure - Debt and Foreign Currency Transactions and Translations - Schedule of Outstanding Debt Obligations (Parenthetical) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/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>57</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>995910 - 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/20251231/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>58</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>995920 - 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/20251231/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>59</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>995930 - 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/20251231/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>60</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>995940 - Disclosure - Stockholders' Equity - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureStockholdersEquityAdditionalInformationDetails</Role>
      <ShortName>Stockholders' Equity - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>995950 - Disclosure - Stockholders' Equity - Schedule of Repurchase Plans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureStockholdersEquityScheduleOfRepurchasePlansDetails</Role>
      <ShortName>Stockholders' Equity - Schedule of Repurchase Plans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>995960 - Disclosure - Stockholders' Equity - Summary of Allocated Amounts to be Repurchased (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureStockholdersEquitySummaryOfAllocatedAmountsToBeRepurchasedDetails</Role>
      <ShortName>Stockholders' Equity - Summary of Allocated Amounts to be Repurchased (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>995970 - Disclosure - Commitments and Contingencies - Summary of Unfunded Commitments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureCommitmentsAndContingenciesSummaryOfUnfundedCommitmentsDetails</Role>
      <ShortName>Commitments and Contingencies - Summary of Unfunded Commitments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>995980 - Disclosure - Commitments and Contingencies - Summary of Unfunded Commitments (Parenthetical) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureCommitmentsAndContingenciesSummaryOfUnfundedCommitmentsParentheticalDetails</Role>
      <ShortName>Commitments and Contingencies - Summary of Unfunded Commitments (Parenthetical) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>995990 - Disclosure - Income Taxes - Summary of Tax Character of Distributions Paid to Stockholders (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureIncomeTaxesSummaryOfTaxCharacterOfDistributionsPaidToStockholdersDetails</Role>
      <ShortName>Income Taxes - Summary of Tax Character of Distributions Paid to Stockholders (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>996000 - Disclosure - Income Taxes - Summary of Reconciliation of Net Increase in Net Assets Resulting from Operations to Taxable Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureIncomeTaxesSummaryOfReconciliationOfNetIncreaseInNetAssetsResultingFromOperationsToTaxableIncomeDetails</Role>
      <ShortName>Income Taxes - Summary of Reconciliation of Net Increase in Net Assets Resulting from Operations to Taxable Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>996010 - Disclosure - Income Taxes - Components of Accumulated Losses on Tax Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureIncomeTaxesComponentsOfAccumulatedLossesOnTaxBasisDetails</Role>
      <ShortName>Income Taxes - Components of Accumulated Losses on Tax Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>996020 - Disclosure - Income Taxes - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureIncomeTaxesAdditionalInformationDetails</Role>
      <ShortName>Income Taxes - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>996030 - Disclosure - Financial Highlights - Schedule of Financial Highlights (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureFinancialHighlightsScheduleOfFinancialHighlightsDetails</Role>
      <ShortName>Financial Highlights - Schedule of Financial Highlights (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>996040 - Disclosure - Financial Highlights - Schedule of Financial Highlights (Parenthetical) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureFinancialHighlightsScheduleOfFinancialHighlightsParentheticalDetails</Role>
      <ShortName>Financial Highlights - Schedule of Financial Highlights (Parenthetical) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>996050 - Disclosure - Selected Quarterly Financial Data (Unaudited) - Schedule of Selected Quarterly Financial Data (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureSelectedQuarterlyFinancialDataUnauditedScheduleOfSelectedQuarterlyFinancialDataDetails</Role>
      <ShortName>Selected Quarterly Financial Data (Unaudited) - Schedule of Selected Quarterly Financial Data (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>996060 - Disclosure - Senior Securities Table - Schedule of Information About Senior Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureSeniorSecuritiesTableScheduleOfInformationAboutSeniorSecuritiesDetails</Role>
      <ShortName>Senior Securities Table - Schedule of Information About Senior Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>996070 - Disclosure - Senior Securities Table - Schedule of Information About Senior Securities (Parenthetical) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureSeniorSecuritiesTableScheduleOfInformationAboutSeniorSecuritiesParentheticalDetails</Role>
      <ShortName>Senior Securities Table - Schedule of Information About Senior Securities (Parenthetical) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>996080 - Disclosure - Mergers with AFT and AIF - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureMergersWithAftAndAifAdditionalInformationDetails</Role>
      <ShortName>Mergers with AFT and AIF - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>996090 - Disclosure - Mergers with AFT and AIF - Summary of Allocation of Purchase Price to Assets Acquired and Liabilities Assumed (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/DisclosureMergersWithAftAndAifSummaryOfAllocationOfPurchasePriceToAssetsAcquiredAndLiabilitiesAssumedDetails</Role>
      <ShortName>Mergers with AFT and AIF - Summary of Allocation of Purchase Price to Assets Acquired and Liabilities Assumed (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>996100 - 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/20251231/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>77</Position>
    </Report>
    <Report instance="mfic-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>996110 - Disclosure - Subsequent Events - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midcapfinancialic.com/20251231/taxonomy/role/Role_DisclosureSubsequentEventsAdditionalInformationDetails</Role>
      <ShortName>Subsequent Events - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</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-K" isDefinitelyFs="true" isUsgaap="true" original="mfic-20251231.htm">mfic-20251231.htm</File>
    <File>mfic-20251231.xsd</File>
  </InputFiles>
  <SupplementalFiles>
    <File>img238408141_0.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="33">http://fasb.org/srt/2025</BaseTaxonomy>
    <BaseTaxonomy items="11505">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="133">http://xbrl.sec.gov/cef/2025</BaseTaxonomy>
    <BaseTaxonomy items="15">http://xbrl.sec.gov/cyd/2025</BaseTaxonomy>
    <BaseTaxonomy items="42">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>
