<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.22.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>315</ContextCount>
  <ElementCount>465</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>87</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>7</UnitCount>
  <MyReports>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>100000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>100010 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_StatementConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>100020 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_StatementConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>100030 - Statement - Consolidated Statements of Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_StatementConsolidatedStatementsOfIncome</Role>
      <ShortName>Consolidated Statements of Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>100040 - Statement - Consolidated Statements of Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_StatementConsolidatedStatementsOfComprehensiveIncome</Role>
      <ShortName>Consolidated Statements of Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>100050 - Statement - Consolidated Statements of Shareholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_StatementConsolidatedStatementsOfShareholdersEquity</Role>
      <ShortName>Consolidated Statements of Shareholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>100060 - Statement - Consolidated Statements of Shareholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_StatementConsolidatedStatementsOfShareholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Shareholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>100070 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_StatementConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>100080 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>100090 - Disclosure - New Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/DisclosureNewAccountingPronouncements</Role>
      <ShortName>New Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>100100 - Disclosure - Implemented Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureImplementedAccountingPronouncements</Role>
      <ShortName>Implemented Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>100110 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureLeases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>100120 - Disclosure - Revenue Recognition</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureRevenueRecognition</Role>
      <ShortName>Revenue Recognition</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>100130 - Disclosure - Notes Payable</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureNotesPayable</Role>
      <ShortName>Notes Payable</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>100140 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureIncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>100150 - Disclosure - Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureBenefitPlans</Role>
      <ShortName>Benefit Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>100160 - Disclosure - Shareholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureShareholdersEquity</Role>
      <ShortName>Shareholders' Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>100170 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureCommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>100180 - Disclosure - Intangible Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureIntangibleAssets</Role>
      <ShortName>Intangible Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>100190 - Disclosure - Related Party Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureRelatedPartyTransactions</Role>
      <ShortName>Related Party Transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>100200 - Disclosure - Segment Reporting</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSegmentReporting</Role>
      <ShortName>Segment Reporting</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>100210 - Disclosure - Acquisitions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureAcquisitions</Role>
      <ShortName>Acquisitions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>100220 - Disclosure - Subeqent Events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/DisclosureSubeqentEvents</Role>
      <ShortName>Subeqent Events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>100230 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>100240 - Disclosure - Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>100250 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureLeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureLeases</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>100260 - Disclosure - Revenue Recognition (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureRevenueRecognitionTables</Role>
      <ShortName>Revenue Recognition (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureRevenueRecognition</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>100270 - Disclosure - Notes Payable (Tables)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureNotesPayableTables</Role>
      <ShortName>Notes Payable (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureNotesPayable</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>100280 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureIncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureIncomeTaxes</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>100290 - Disclosure - Benefit Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureBenefitPlansTables</Role>
      <ShortName>Benefit Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureBenefitPlans</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>100300 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureCommitmentsAndContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureCommitmentsAndContingencies</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>100310 - Disclosure - Intangible Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureIntangibleAssetsTables</Role>
      <ShortName>Intangible Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureIntangibleAssets</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>100320 - Disclosure - Segment Reporting (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSegmentReportingTables</Role>
      <ShortName>Segment Reporting (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSegmentReporting</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>100330 - Disclosure - Acquisitions (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureAcquisitionsTables</Role>
      <ShortName>Acquisitions (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureAcquisitions</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>100340 - Disclosure - Summary of Significant Accounting Policies - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesAdditionalInformationDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>100350 - Disclosure - Summary of Significant Accounting Policies - Estimated Useful Lives and Residual Values of Company's Rental Equipment (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesEstimatedUsefulLivesAndResidualValuesOfCompanySRentalEquipmentDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Estimated Useful Lives and Residual Values of Company's Rental Equipment (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>100360 - Disclosure - Summary of Significant Accounting Policies - Property, Plant and Equipment (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesPropertyPlantAndEquipmentDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Property, Plant and Equipment (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>100370 - Disclosure - Summary of Significant Accounting Policies - Weighted-Average Common Stock Used to Calculate Basic and Diluted Earnings Per Share (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesWeightedAverageCommonStockUsedToCalculateBasicAndDilutedEarningsPerShareDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Weighted-Average Common Stock Used to Calculate Basic and Diluted Earnings Per Share (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>100380 - Disclosure - Summary of Significant Accounting Policies - Summary of Allowance for Doubtful Accounts Activity (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesSummaryOfAllowanceForDoubtfulAccountsActivityDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Summary of Allowance for Doubtful Accounts Activity (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>100390 - Disclosure - Leases - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureLeasesAdditionalInformationDetail</Role>
      <ShortName>Leases - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>100400 - Disclosure - Leases - Summary of Supplemental Cash flow Information Related to Leases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureLeasesSummaryOfSupplementalCashFlowInformationRelatedToLeasesDetail</Role>
      <ShortName>Leases - Summary of Supplemental Cash flow Information Related to Leases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>100410 - Disclosure - Leases - Summary of Maturities of Operating Lease Liabilities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureLeasesSummaryOfMaturitiesOfOperatingLeaseLiabilitiesDetail</Role>
      <ShortName>Leases - Summary of Maturities of Operating Lease Liabilities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>100430 - Disclosure - Leases - Summary of Maturities of Operating Lease Payments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureLeasesSummaryOfMaturitiesOfOperatingLeasePaymentsDetail</Role>
      <ShortName>Leases - Summary of Maturities of Operating Lease Payments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>100440 - Disclosure - Leases - Minimum Lease Payments Receivable and Net Investment Included in Accounts Receivable for Leases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureLeasesMinimumLeasePaymentsReceivableAndNetInvestmentIncludedInAccountsReceivableForLeasesDetail</Role>
      <ShortName>Leases - Minimum Lease Payments Receivable and Net Investment Included in Accounts Receivable for Leases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>100450 - Disclosure - Leases - Future Minimum Lease Payments under Non-Cancelable Finance Leases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureLeasesFutureMinimumLeasePaymentsUnderNonCancelableFinanceLeasesDetail</Role>
      <ShortName>Leases - Future Minimum Lease Payments under Non-Cancelable Finance Leases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>100460 - Disclosure - Revenue Recognition - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureRevenueRecognitionAdditionalInformationDetail</Role>
      <ShortName>Revenue Recognition - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>100470 - Disclosure - Revenue Recognition - Summary of Disaggregates the Company's Revenue by Lease and Non Lease (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureRevenueRecognitionSummaryOfDisaggregatesCompanySRevenueByLeaseAndNonLeaseDetail</Role>
      <ShortName>Revenue Recognition - Summary of Disaggregates the Company's Revenue by Lease and Non Lease (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>100480 - Disclosure - Notes Payable - Components of Notes Payable (Detail)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureNotesPayableComponentsOfNotesPayableDetail</Role>
      <ShortName>Notes Payable - Components of Notes Payable (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>100490 - Disclosure - Notes Payable - Components of Notes Payable (Parenthetical) (Detail)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureNotesPayableComponentsOfNotesPayableParentheticalDetail</Role>
      <ShortName>Notes Payable - Components of Notes Payable (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>100500 - Disclosure - Notes Payable - Schedule of Future Minimum Payments under Unsecured Revolving Lines of Credit and 3.68% Senior Notes and 3.84% Senior Notes (Detail)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureNotesPayableScheduleOfFutureMinimumPaymentsUnderUnsecuredRevolvingLinesOfCreditAnd368SeniorNotesAnd384SeniorNotesDetail</Role>
      <ShortName>Notes Payable - Schedule of Future Minimum Payments under Unsecured Revolving Lines of Credit and 3.68% Senior Notes and 3.84% Senior Notes (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>100510 - Disclosure - Notes Payable - Additional Information (Detail)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureNotesPayableAdditionalInformationDetail</Role>
      <ShortName>Notes Payable - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>100520 - Disclosure - Notes Payable - Schedule of Information Related to Lines of Credit (Detail)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureNotesPayableScheduleOfInformationRelatedToLinesOfCreditDetail</Role>
      <ShortName>Notes Payable - Schedule of Information Related to Lines of Credit (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>100530 - Disclosure - Income Taxes - Schedule of Income Before Provision (Benefit) for Income Taxes (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureIncomeTaxesScheduleOfIncomeBeforeProvisionBenefitForIncomeTaxesDetail</Role>
      <ShortName>Income Taxes - Schedule of Income Before Provision (Benefit) for Income Taxes (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>100540 - Disclosure - Income Taxes - Provision (Benefit) for Income Taxes (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureIncomeTaxesProvisionBenefitForIncomeTaxesDetail</Role>
      <ShortName>Income Taxes - Provision (Benefit) for Income Taxes (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>100550 - Disclosure - Income Taxes - Reconciliation of U.S. Federal Statutory Tax Rate to Company's Effective Tax Rate (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureIncomeTaxesReconciliationOfUSFederalStatutoryTaxRateToCompanySEffectiveTaxRateDetail</Role>
      <ShortName>Income Taxes - Reconciliation of U.S. Federal Statutory Tax Rate to Company's Effective Tax Rate (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>100560 - Disclosure - Income Taxes - Deferred Income Taxes Related to Temporary Differences between Tax Bases of Assets and Liabilities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureIncomeTaxesDeferredIncomeTaxesRelatedToTemporaryDifferencesBetweenTaxBasesOfAssetsAndLiabilitiesDetail</Role>
      <ShortName>Income Taxes - Deferred Income Taxes Related to Temporary Differences between Tax Bases of Assets and Liabilities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>100570 - Disclosure - Income Taxes - Deferred Income Taxes Related to Temporary Differences between Tax Bases of Assets and Liabilities (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureIncomeTaxesDeferredIncomeTaxesRelatedToTemporaryDifferencesBetweenTaxBasesOfAssetsAndLiabilitiesParentheticalDetail</Role>
      <ShortName>Income Taxes - Deferred Income Taxes Related to Temporary Differences between Tax Bases of Assets and Liabilities (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>100580 - Disclosure - Income Taxes - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureIncomeTaxesAdditionalInformationDetail</Role>
      <ShortName>Income Taxes - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>100590 - Disclosure - Benefit Plans - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureBenefitPlansAdditionalInformationDetail</Role>
      <ShortName>Benefit Plans - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>100600 - Disclosure - Benefit Plans - Summary of Company's Option Activity (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureBenefitPlansSummaryOfCompanySOptionActivityDetail</Role>
      <ShortName>Benefit Plans - Summary of Company's Option Activity (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>100610 - Disclosure - Benefit Plans - Options Outstanding and Options Exercisable by Exercise Price with Weighted-Average Remaining Contractual Life for Options Outstanding and Weighted-Average Exercise Price (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureBenefitPlansOptionsOutstandingAndOptionsExercisableByExercisePriceWithWeightedAverageRemainingContractualLifeForOptionsOutstandingAndWeightedAverageExercisePriceDetail</Role>
      <ShortName>Benefit Plans - Options Outstanding and Options Exercisable by Exercise Price with Weighted-Average Remaining Contractual Life for Options Outstanding and Weighted-Average Exercise Price (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>100620 - Disclosure - Benefit Plans - Summary of Company's Restricted Stock Units Activity (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureBenefitPlansSummaryOfCompanySRestrictedStockUnitsActivityDetail</Role>
      <ShortName>Benefit Plans - Summary of Company's Restricted Stock Units Activity (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>100630 - Disclosure - Shareholders' Equity - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureShareholdersEquityAdditionalInformationDetail</Role>
      <ShortName>Shareholders' Equity - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>100640 - Disclosure - Commitments and Contingencies - Minimum Payments under Leases, Exclusive of Property Taxes and Insurance (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureCommitmentsAndContingenciesMinimumPaymentsUnderLeasesExclusiveOfPropertyTaxesAndInsuranceDetail</Role>
      <ShortName>Commitments and Contingencies - Minimum Payments under Leases, Exclusive of Property Taxes and Insurance (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>100650 - Disclosure - Commitments and Contingencies - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureCommitmentsAndContingenciesAdditionalInformationDetail</Role>
      <ShortName>Commitments and Contingencies - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>100660 - Disclosure - Intangible Assets - Summary of Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureIntangibleAssetsSummaryOfIntangibleAssetsDetail</Role>
      <ShortName>Intangible Assets - Summary of Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>100670 - Disclosure - Intangible Assets - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureIntangibleAssetsAdditionalInformationDetail</Role>
      <ShortName>Intangible Assets - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>100680 - Disclosure - Related Party Transactions - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureRelatedPartyTransactionsAdditionalInformationDetail</Role>
      <ShortName>Related Party Transactions - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>100690 - Disclosure - Segment Reporting - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSegmentReportingAdditionalInformationDetail</Role>
      <ShortName>Segment Reporting - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>100700 - Disclosure - Segment Reporting - Summarized Financial Information for Company's Reportable Segments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSegmentReportingSummarizedFinancialInformationForCompanySReportableSegmentsDetail</Role>
      <ShortName>Segment Reporting - Summarized Financial Information for Company's Reportable Segments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>100710 - Disclosure - Segment Reporting - Summarized Financial Information for Company's Reportable Segments (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureSegmentReportingSummarizedFinancialInformationForCompanySReportableSegmentsParentheticalDetail</Role>
      <ShortName>Segment Reporting - Summarized Financial Information for Company's Reportable Segments (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>100720 - Disclosure - Acquisitions - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureAcquisitionsAdditionalInformationDetail</Role>
      <ShortName>Acquisitions - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>100730 - Disclosure - Acquisitions - Summary of Purchase Price Allocations Reflecting Estimated Fair Values of Assets Acquired and Liabilities Assumed (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureAcquisitionsSummaryOfPurchasePriceAllocationsReflectingEstimatedFairValuesOfAssetsAcquiredAndLiabilitiesAssumedDetail</Role>
      <ShortName>Acquisitions - Summary of Purchase Price Allocations Reflecting Estimated Fair Values of Assets Acquired and Liabilities Assumed (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>100740 - Disclosure - Acquisitions - Summary of Pro Forma Data (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/Role_DisclosureAcquisitionsSummaryOfProFormaDataDetail</Role>
      <ShortName>Acquisitions - Summary of Pro Forma Data (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="mgrc-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>100750 - Disclosure - Subsequent Events - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.mgrc.com/20221231/taxonomy/role/DisclosureSubsequentEventsAdditionalInformationDetails</Role>
      <ShortName>Subsequent Events - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <Logs>
    <Log type="Warning">[ix-0514-Hidden-Fact-Eligible-For-Transform] WARN: 5 fact(s) appearing in ix:hidden were eligible for transformation: dei:CurrentFiscalYearEndDate, mgrc:LessorOperatingLeaseRentalProductsUsefulLives, us-gaap:LesseeOperatingLeaseRenewalTerm, us-gaap:LessorOperatingLeaseRenewalTerm, us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1 -  mgrc-20221231.htm 8</Log>
  </Logs>
  <InputFiles>
    <File doctype="10-K" original="mgrc-20221231.htm">mgrc-20221231.htm</File>
    <File>mgrc-20221231.xsd</File>
    <File>mgrc-20221231_cal.xml</File>
    <File>mgrc-20221231_def.xml</File>
    <File>mgrc-20221231_lab.xml</File>
    <File>mgrc-20221231_pre.xml</File>
    <File>mgrc-ex21_1.htm</File>
    <File>mgrc-ex23_1.htm</File>
    <File>mgrc-ex31_1.htm</File>
    <File>mgrc-ex31_2.htm</File>
    <File>mgrc-ex32_1.htm</File>
    <File>mgrc-ex32_2.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="1">http://fasb.org/srt/2022</BaseTaxonomy>
    <BaseTaxonomy items="1150">http://fasb.org/us-gaap/2022</BaseTaxonomy>
    <BaseTaxonomy items="37">http://xbrl.sec.gov/dei/2022</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
