<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.10.0.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>421</ContextCount>
  <ElementCount>454</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>86</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>7</UnitCount>
  <MyReports>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>100000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>100010 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/StatementConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>100020 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/StatementConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>100030 - Statement - Consolidated Statements of Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/StatementConsolidatedStatementsOfIncome</Role>
      <ShortName>Consolidated Statements of Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>100040 - Statement - Consolidated Statements of Comprehensive Income (Loss)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/StatementConsolidatedStatementsOfComprehensiveIncomeLoss</Role>
      <ShortName>Consolidated Statements of Comprehensive Income (Loss)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>100050 - Statement - Consolidated Statements of Comprehensive Income (Loss) (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/StatementConsolidatedStatementsOfComprehensiveIncomeLossParenthetical</Role>
      <ShortName>Consolidated Statements of Comprehensive Income (Loss) (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>100060 - Statement - Consolidated Statements of Changes In Shareholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/StatementConsolidatedStatementsOfChangesInShareholdersEquity</Role>
      <ShortName>Consolidated Statements of Changes In Shareholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>100070 - Statement - Consolidated Statements of Changes In Shareholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/StatementConsolidatedStatementsOfChangesInShareholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Changes In Shareholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>100080 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/StatementConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>100090 - Disclosure - Basis of Presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureBasisOfPresentation</Role>
      <ShortName>Basis of Presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>100100 - Disclosure - Acquisition</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisition</Role>
      <ShortName>Acquisition</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>100110 - Disclosure - Investment Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureInvestmentSecurities</Role>
      <ShortName>Investment Securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>100120 - Disclosure - Loans and Allowance for Loan and Lease Losses</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLosses</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>100130 - Disclosure - Fair Value Measurement</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureFairValueMeasurement</Role>
      <ShortName>Fair Value Measurement</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>100140 - Disclosure - Guarantees and Commitments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureGuaranteesAndCommitments</Role>
      <ShortName>Guarantees and Commitments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>100150 - Disclosure - Subordinated Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureSubordinatedDebt</Role>
      <ShortName>Subordinated Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>100160 - Disclosure - Defined Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureDefinedBenefitPlans</Role>
      <ShortName>Defined Benefit Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>100170 - Disclosure - Accumulated Other Comprehensive Loss</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLoss</Role>
      <ShortName>Accumulated Other Comprehensive Loss</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>100180 - Disclosure - Preferred Stock</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosurePreferredStock</Role>
      <ShortName>Preferred Stock</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>100190 - Disclosure - Restricted Common Stock</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureRestrictedCommonStock</Role>
      <ShortName>Restricted Common Stock</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>100200 - Disclosure - Revenue Recognition</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureRevenueRecognition</Role>
      <ShortName>Revenue Recognition</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>100210 - Disclosure - Earnings per Common Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureEarningsPerCommonShare</Role>
      <ShortName>Earnings per Common Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>100220 - Disclosure - Recent Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureRecentAccountingPronouncements</Role>
      <ShortName>Recent Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>100230 - Disclosure - Subsequent Event</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureSubsequentEvent</Role>
      <ShortName>Subsequent Event</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>100240 - Disclosure - Revenue Recognition (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureRevenueRecognitionPolicies</Role>
      <ShortName>Revenue Recognition (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureRecentAccountingPronouncements</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>100250 - Disclosure - Acquisition (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisitionTables</Role>
      <ShortName>Acquisition (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisition</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>100260 - Disclosure - Investment Securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureInvestmentSecuritiesTables</Role>
      <ShortName>Investment Securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureInvestmentSecurities</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>100270 - Disclosure - Loans and Allowance for Loan and Lease Losses (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLosses</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>100280 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureFairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureFairValueMeasurement</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>100290 - Disclosure - Defined Benefit Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureDefinedBenefitPlansTables</Role>
      <ShortName>Defined Benefit Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureDefinedBenefitPlans</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>100300 - Disclosure - Accumulated Other Comprehensive Loss (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLossTables</Role>
      <ShortName>Accumulated Other Comprehensive Loss (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLoss</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>100310 - Disclosure - Earnings per Common Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureEarningsPerCommonShareTables</Role>
      <ShortName>Earnings per Common Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureEarningsPerCommonShare</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>100320 - Disclosure - Acquisition of First Priority Financial Corp. (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisitionOfFirstPriorityFinancialCorpNarrativeDetails</Role>
      <ShortName>Acquisition of First Priority Financial Corp. (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>100330 - Disclosure - Acquisition of First Priority Financial Corp. (Allocation of Purchase Price) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisitionOfFirstPriorityFinancialCorpAllocationOfPurchasePriceDetails</Role>
      <ShortName>Acquisition of First Priority Financial Corp. (Allocation of Purchase Price) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>100340 - Disclosure - Acquisition of First Priority Financial Corp. (Preliminary Estimated Fair Value of Assets Acquired) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisitionOfFirstPriorityFinancialCorpPreliminaryEstimatedFairValueOfAssetsAcquiredDetails</Role>
      <ShortName>Acquisition of First Priority Financial Corp. (Preliminary Estimated Fair Value of Assets Acquired) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>100350 - Disclosure - Acquisition of First Priority Financial Corp. (Fair Value Adjustments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisitionOfFirstPriorityFinancialCorpFairValueAdjustmentsDetails</Role>
      <ShortName>Acquisition of First Priority Financial Corp. (Fair Value Adjustments) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>100360 - Disclosure - Acquisition of First Priority Financial Corp. (Fair Value of Loans Acquired) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisitionOfFirstPriorityFinancialCorpFairValueOfLoansAcquiredDetails</Role>
      <ShortName>Acquisition of First Priority Financial Corp. (Fair Value of Loans Acquired) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>100370 - Disclosure - Acquisition of First Priority Financial Corp. (Pro Forma Information) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisitionOfFirstPriorityFinancialCorpProFormaInformationDetails</Role>
      <ShortName>Acquisition of First Priority Financial Corp. (Pro Forma Information) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>100380 - Disclosure - Acquisition of The Scottdale Bank and Trust Company (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisitionOfTheScottdaleBankAndTrustCompanyNarrativeDetails</Role>
      <ShortName>Acquisition of The Scottdale Bank and Trust Company (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>100390 - Disclosure - Acquisition of The Scottdale Bank and Trust Company (Allocation of the Purchase Price) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisitionOfTheScottdaleBankAndTrustCompanyAllocationOfPurchasePriceDetails</Role>
      <ShortName>Acquisition of The Scottdale Bank and Trust Company (Allocation of the Purchase Price) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>100400 - Disclosure - Acquisition of The Scottdale Bank and Trust Company (Preliminary Estimated Fair Value of Assets Acquired) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisitionOfTheScottdaleBankAndTrustCompanyPreliminaryEstimatedFairValueOfAssetsAcquiredDetails</Role>
      <ShortName>Acquisition of The Scottdale Bank and Trust Company (Preliminary Estimated Fair Value of Assets Acquired) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>100410 - Disclosure - Acquisition of The Scottdale Bank and Trust Company (Fair Value Adjustments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisitionOfTheScottdaleBankAndTrustCompanyFairValueAdjustmentsDetails</Role>
      <ShortName>Acquisition of The Scottdale Bank and Trust Company (Fair Value Adjustments) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>100420 - Disclosure - Acquisition of The Scottdale Bank and Trust Company (Fair Value of Loans Acquired) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisitionOfTheScottdaleBankAndTrustCompanyFairValueOfLoansAcquiredDetails</Role>
      <ShortName>Acquisition of The Scottdale Bank and Trust Company (Fair Value of Loans Acquired) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>100430 - Disclosure - Acquisition of The Scottdale Bank and Trust Company (Pro Forma Information) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAcquisitionOfTheScottdaleBankAndTrustCompanyProFormaInformationDetails</Role>
      <ShortName>Acquisition of The Scottdale Bank and Trust Company (Pro Forma Information) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>100440 - Disclosure - Investment Securities (Unrealized Gain (Loss) on Investments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureInvestmentSecuritiesUnrealizedGainLossOnInvestmentsDetails</Role>
      <ShortName>Investment Securities (Unrealized Gain (Loss) on Investments) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureInvestmentSecuritiesTables</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>100450 - Disclosure - Investment Securities (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureInvestmentSecuritiesNarrativeDetails</Role>
      <ShortName>Investment Securities (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureInvestmentSecuritiesTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>100460 - Disclosure - Investment Securities (Schedule of Gross Realized Gains (Losses) on Sales of Available-For-Sale Securities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureInvestmentSecuritiesScheduleOfGrossRealizedGainsLossesOnSalesOfAvailableForSaleSecuritiesDetails</Role>
      <ShortName>Investment Securities (Schedule of Gross Realized Gains (Losses) on Sales of Available-For-Sale Securities) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureInvestmentSecuritiesTables</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>100470 - Disclosure - Investment Securities (Schedule of Fair Value and Unrealized Loss on Investments in a Continuous Unrealized Loss Position) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureInvestmentSecuritiesScheduleOfFairValueAndUnrealizedLossOnInvestmentsInContinuousUnrealizedLossPositionDetails</Role>
      <ShortName>Investment Securities (Schedule of Fair Value and Unrealized Loss on Investments in a Continuous Unrealized Loss Position) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureInvestmentSecuritiesTables</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>100480 - Disclosure - Investment Securities (Investments Classified by Contractual Maturity Date) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureInvestmentSecuritiesInvestmentsClassifiedByContractualMaturityDateDetails</Role>
      <ShortName>Investment Securities (Investments Classified by Contractual Maturity Date) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureInvestmentSecuritiesTables</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>100490 - Disclosure - Loans and Allowance for Loan and Lease Losses (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesNarrativeDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>100500 - Disclosure - Loans and Allowance for Loan and Lease Losses (Classes Of The Loan Portfolio Summarized By The Aggregate Risk Rating) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesClassesOfTheLoanPortfolioSummarizedByTheAggregateRiskRatingDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Classes Of The Loan Portfolio Summarized By The Aggregate Risk Rating) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>100510 - Disclosure - Loans and Allowance for Loan and Lease Losses (Impaired Loans by Loan Portfolio Class) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesImpairedLoansByLoanPortfolioClassDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Impaired Loans by Loan Portfolio Class) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>100520 - Disclosure - Loans and Allowance for Loan and Lease Losses (Average Recorded Investment Of Impaired Loans And Related Interest Income By Loan Portfolio Class) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesAverageRecordedInvestmentOfImpairedLoansAndRelatedInterestIncomeByLoanPortfolioClassDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Average Recorded Investment Of Impaired Loans And Related Interest Income By Loan Portfolio Class) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>100530 - Disclosure - Loans and Allowance for Loan and Lease Losses (Nonaccrual Loans By Classes Of The Loan Portfolio) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesNonaccrualLoansByClassesOfTheLoanPortfolioDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Nonaccrual Loans By Classes Of The Loan Portfolio) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>100540 - Disclosure - Loans and Allowance for Loan and Lease Losses (Loan Portfolio Summarized By The Past Due Status) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesLoanPortfolioSummarizedByThePastDueStatusDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Loan Portfolio Summarized By The Past Due Status) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>100550 - Disclosure - Loans and Allowance for Loan and Lease Losses (Allowance And Recorded Investment In Financing Receivables) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesAllowanceAndRecordedInvestmentInFinancingReceivablesDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Allowance And Recorded Investment In Financing Receivables) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>100560 - Disclosure - Loans and Allowance for Loan and Lease Losses (Troubled Debt Restructurings) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTroubledDebtRestructuringsDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Troubled Debt Restructurings) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>100570 - Disclosure - Loans and Allowance for Loan and Lease Losses (Schedule of Accretion of Purchased Impaired Loan) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesScheduleOfAccretionOfPurchasedImpairedLoanDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Schedule of Accretion of Purchased Impaired Loan) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>100580 - Disclosure - Fair Value Measurement (Assets Measured at Fair Value on Recurring Basis) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureFairValueMeasurementAssetsMeasuredAtFairValueOnRecurringBasisDetails</Role>
      <ShortName>Fair Value Measurement (Assets Measured at Fair Value on Recurring Basis) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>59</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>100590 - Disclosure - Fair Value Measurement (Fair Value Measurements, Nonrecurring) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureFairValueMeasurementFairValueMeasurementsNonrecurringDetails</Role>
      <ShortName>Fair Value Measurement (Fair Value Measurements, Nonrecurring) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>60</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>100600 - Disclosure - Fair Value Measurement (Fair Value Inputs, Assets, Quantitative Information) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureFairValueMeasurementFairValueInputsAssetsQuantitativeInformationDetails</Role>
      <ShortName>Fair Value Measurement (Fair Value Inputs, Assets, Quantitative Information) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>61</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>100610 - Disclosure - Fair Value Measurement (Fair Value, by Balance Sheet Grouping) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureFairValueMeasurementFairValueByBalanceSheetGroupingDetails</Role>
      <ShortName>Fair Value Measurement (Fair Value, by Balance Sheet Grouping) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>62</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>100620 - Disclosure - Fair Value Measurements (Schedule of Fair Value, Assets and Liabilities Measured on Recurring Basis) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureFairValueMeasurementsScheduleOfFairValueAssetsAndLiabilitiesMeasuredOnRecurringBasisDetails</Role>
      <ShortName>Fair Value Measurements (Schedule of Fair Value, Assets and Liabilities Measured on Recurring Basis) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>63</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>100630 - Disclosure - Guarantees and Commitments (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureGuaranteesAndCommitmentsNarrativeDetails</Role>
      <ShortName>Guarantees and Commitments (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureGuaranteesAndCommitments</ParentRole>
      <Position>64</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>100640 - Disclosure - Subordinated Debt (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureSubordinatedDebtNarrativeDetails</Role>
      <ShortName>Subordinated Debt (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureSubordinatedDebt</ParentRole>
      <Position>65</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>100650 - Disclosure - Defined Benefit Plans (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureDefinedBenefitPlansNarrativeDetails</Role>
      <ShortName>Defined Benefit Plans (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureDefinedBenefitPlansTables</ParentRole>
      <Position>66</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>100660 - Disclosure - Defined Benefit Plans (Net Periodic Benefit Costs) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureDefinedBenefitPlansNetPeriodicBenefitCostsDetails</Role>
      <ShortName>Defined Benefit Plans (Net Periodic Benefit Costs) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureDefinedBenefitPlansTables</ParentRole>
      <Position>67</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>100670 - Disclosure - Accumulated Other Comprehensive Loss (Components of Accumulated Other Comprehensive Loss, Net of Taxes) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLossComponentsOfAccumulatedOtherComprehensiveLossNetOfTaxesDetails</Role>
      <ShortName>Accumulated Other Comprehensive Loss (Components of Accumulated Other Comprehensive Loss, Net of Taxes) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLossTables</ParentRole>
      <Position>68</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>100680 - Disclosure - Preferred Stock (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosurePreferredStockNarrativeDetails</Role>
      <ShortName>Preferred Stock (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosurePreferredStock</ParentRole>
      <Position>69</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>100690 - Disclosure - Restricted Common Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureRestrictedCommonStockDetails</Role>
      <ShortName>Restricted Common Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureRestrictedCommonStock</ParentRole>
      <Position>70</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>100700 - Disclosure - Earnings per Common Share (Basic Earnings (Loss) Per Share) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureEarningsPerCommonShareBasicEarningsLossPerShareDetails</Role>
      <ShortName>Earnings per Common Share (Basic Earnings (Loss) Per Share) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureEarningsPerCommonShareTables</ParentRole>
      <Position>71</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>100710 - Disclosure - Earnings per Common Share (Basic Earnings (Loss) Per Share) (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureEarningsPerCommonShareBasicEarningsLossPerShareNarrativeDetails</Role>
      <ShortName>Earnings per Common Share (Basic Earnings (Loss) Per Share) (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureEarningsPerCommonShareTables</ParentRole>
      <Position>72</Position>
    </Report>
    <Report instance="mpb-20180930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>100720 - Disclosure - Subsequent Event (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureSubsequentEventNarrativeDetails</Role>
      <ShortName>Subsequent Event (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180930/taxonomy/role/DisclosureSubsequentEvent</ParentRole>
      <Position>73</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>mpb-20180930.xml</File>
    <File>mpb-20180930.xsd</File>
    <File>mpb-20180930_cal.xml</File>
    <File>mpb-20180930_def.xml</File>
    <File>mpb-20180930_lab.xml</File>
    <File>mpb-20180930_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://fasb.org/srt/2018-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2018-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/us-gaap/2018-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
