@gabrielbryk/arc-devtools-mcp 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +977 -0
  3. package/build/src/HeapSnapshotManager.js +148 -0
  4. package/build/src/McpContext.js +737 -0
  5. package/build/src/McpPage.js +315 -0
  6. package/build/src/McpResponse.js +990 -0
  7. package/build/src/Mutex.js +38 -0
  8. package/build/src/PageCollector.js +297 -0
  9. package/build/src/ServiceWorkerCollector.js +171 -0
  10. package/build/src/SlimMcpResponse.js +19 -0
  11. package/build/src/TextSnapshot.js +236 -0
  12. package/build/src/ToolHandler.js +223 -0
  13. package/build/src/WaitForHelper.js +190 -0
  14. package/build/src/bin/check-latest-version.js +50 -0
  15. package/build/src/bin/chrome-devtools-cli-options.js +978 -0
  16. package/build/src/bin/chrome-devtools-mcp-cli-options.js +412 -0
  17. package/build/src/bin/chrome-devtools-mcp-main.js +72 -0
  18. package/build/src/bin/chrome-devtools-mcp.js +23 -0
  19. package/build/src/bin/chrome-devtools.js +189 -0
  20. package/build/src/browser.js +253 -0
  21. package/build/src/daemon/client.js +160 -0
  22. package/build/src/daemon/daemon.js +261 -0
  23. package/build/src/daemon/types.js +7 -0
  24. package/build/src/daemon/utils.js +115 -0
  25. package/build/src/devtools/DevToolsConnectionAdapter.js +70 -0
  26. package/build/src/devtools/DevtoolsUtils.js +369 -0
  27. package/build/src/devtools/McpHostBindingAdapter.js +165 -0
  28. package/build/src/formatters/ConsoleFormatter.js +288 -0
  29. package/build/src/formatters/HeapSnapshotFormatter.js +97 -0
  30. package/build/src/formatters/IssueFormatter.js +193 -0
  31. package/build/src/formatters/NetworkFormatter.js +238 -0
  32. package/build/src/formatters/SnapshotFormatter.js +135 -0
  33. package/build/src/index.js +153 -0
  34. package/build/src/issue-descriptions.js +40 -0
  35. package/build/src/logger.js +37 -0
  36. package/build/src/polyfill.js +8 -0
  37. package/build/src/telemetry/ClearcutLogger.js +169 -0
  38. package/build/src/telemetry/WatchdogClient.js +61 -0
  39. package/build/src/telemetry/errors.js +18 -0
  40. package/build/src/telemetry/flagUtils.js +89 -0
  41. package/build/src/telemetry/metricsRegistry.js +89 -0
  42. package/build/src/telemetry/persistence.js +72 -0
  43. package/build/src/telemetry/transformation.js +134 -0
  44. package/build/src/telemetry/types.js +31 -0
  45. package/build/src/telemetry/watchdog/ClearcutSender.js +205 -0
  46. package/build/src/telemetry/watchdog/main.js +128 -0
  47. package/build/src/third_party/THIRD_PARTY_NOTICES +3637 -0
  48. package/build/src/third_party/bundled-packages.json +12 -0
  49. package/build/src/third_party/devtools-formatter-worker.js +15301 -0
  50. package/build/src/third_party/devtools-heap-snapshot-worker.js +9870 -0
  51. package/build/src/third_party/index.js +159597 -0
  52. package/build/src/third_party/issue-descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +4 -0
  53. package/build/src/third_party/issue-descriptions/CoepCorpNotSameOrigin.md +8 -0
  54. package/build/src/third_party/issue-descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +18 -0
  55. package/build/src/third_party/issue-descriptions/CoepCorpNotSameSite.md +7 -0
  56. package/build/src/third_party/issue-descriptions/CoepFrameResourceNeedsCoepHeader.md +10 -0
  57. package/build/src/third_party/issue-descriptions/CompatibilityModeQuirks.md +5 -0
  58. package/build/src/third_party/issue-descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
  59. package/build/src/third_party/issue-descriptions/LowTextContrast.md +5 -0
  60. package/build/src/third_party/issue-descriptions/SameSiteExcludeContextDowngradeRead.md +8 -0
  61. package/build/src/third_party/issue-descriptions/SameSiteExcludeContextDowngradeSet.md +8 -0
  62. package/build/src/third_party/issue-descriptions/SameSiteExcludeNavigationContextDowngrade.md +8 -0
  63. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorRead.md +8 -0
  64. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorSet.md +8 -0
  65. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnRead.md +8 -0
  66. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnSet.md +8 -0
  67. package/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +9 -0
  68. package/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +9 -0
  69. package/build/src/third_party/issue-descriptions/SameSiteWarnCrossDowngradeRead.md +8 -0
  70. package/build/src/third_party/issue-descriptions/SameSiteWarnCrossDowngradeSet.md +8 -0
  71. package/build/src/third_party/issue-descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +8 -0
  72. package/build/src/third_party/issue-descriptions/arInsecureContext.md +7 -0
  73. package/build/src/third_party/issue-descriptions/arInvalidInfoHeader.md +5 -0
  74. package/build/src/third_party/issue-descriptions/arInvalidRegisterOsSourceHeader.md +5 -0
  75. package/build/src/third_party/issue-descriptions/arInvalidRegisterOsTriggerHeader.md +5 -0
  76. package/build/src/third_party/issue-descriptions/arInvalidRegisterSourceHeader.md +5 -0
  77. package/build/src/third_party/issue-descriptions/arInvalidRegisterTriggerHeader.md +5 -0
  78. package/build/src/third_party/issue-descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +5 -0
  79. package/build/src/third_party/issue-descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +6 -0
  80. package/build/src/third_party/issue-descriptions/arNoRegisterOsSourceHeader.md +5 -0
  81. package/build/src/third_party/issue-descriptions/arNoRegisterOsTriggerHeader.md +5 -0
  82. package/build/src/third_party/issue-descriptions/arNoRegisterSourceHeader.md +5 -0
  83. package/build/src/third_party/issue-descriptions/arNoRegisterTriggerHeader.md +5 -0
  84. package/build/src/third_party/issue-descriptions/arNoWebOrOsSupport.md +4 -0
  85. package/build/src/third_party/issue-descriptions/arOsSourceIgnored.md +18 -0
  86. package/build/src/third_party/issue-descriptions/arOsTriggerIgnored.md +19 -0
  87. package/build/src/third_party/issue-descriptions/arPermissionPolicyDisabled.md +8 -0
  88. package/build/src/third_party/issue-descriptions/arSourceAndTriggerHeaders.md +9 -0
  89. package/build/src/third_party/issue-descriptions/arSourceIgnored.md +13 -0
  90. package/build/src/third_party/issue-descriptions/arTriggerIgnored.md +12 -0
  91. package/build/src/third_party/issue-descriptions/arUntrustworthyReportingOrigin.md +10 -0
  92. package/build/src/third_party/issue-descriptions/arWebAndOsHeaders.md +11 -0
  93. package/build/src/third_party/issue-descriptions/bounceTrackingMitigations.md +3 -0
  94. package/build/src/third_party/issue-descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
  95. package/build/src/third_party/issue-descriptions/clientHintMetaTagModifiedHTML.md +4 -0
  96. package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowlistItemType.md +12 -0
  97. package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidHeader.md +12 -0
  98. package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidUrlPattern.md +8 -0
  99. package/build/src/third_party/issue-descriptions/connectionAllowlistItemNotInnerList.md +12 -0
  100. package/build/src/third_party/issue-descriptions/connectionAllowlistMoreThanOneList.md +7 -0
  101. package/build/src/third_party/issue-descriptions/connectionAllowlistReportingEndpointNotToken.md +10 -0
  102. package/build/src/third_party/issue-descriptions/cookieCrossSiteRedirectDowngrade.md +12 -0
  103. package/build/src/third_party/issue-descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +4 -0
  104. package/build/src/third_party/issue-descriptions/cookieExcludeDomainNonAscii.md +11 -0
  105. package/build/src/third_party/issue-descriptions/cookieExcludePortMismatch.md +8 -0
  106. package/build/src/third_party/issue-descriptions/cookieExcludeSchemeMismatch.md +7 -0
  107. package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutRead.md +6 -0
  108. package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutSet.md +6 -0
  109. package/build/src/third_party/issue-descriptions/cookieWarnDomainNonAscii.md +11 -0
  110. package/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantRead.md +4 -0
  111. package/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantSet.md +4 -0
  112. package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutRead.md +6 -0
  113. package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutSet.md +6 -0
  114. package/build/src/third_party/issue-descriptions/corsAllowCredentialsRequired.md +6 -0
  115. package/build/src/third_party/issue-descriptions/corsDisabledScheme.md +7 -0
  116. package/build/src/third_party/issue-descriptions/corsDisallowedByMode.md +7 -0
  117. package/build/src/third_party/issue-descriptions/corsHeaderDisallowedByPreflightResponse.md +5 -0
  118. package/build/src/third_party/issue-descriptions/corsInvalidHeaderValues.md +7 -0
  119. package/build/src/third_party/issue-descriptions/corsLocalNetworkAccessPermissionDenied.md +19 -0
  120. package/build/src/third_party/issue-descriptions/corsMethodDisallowedByPreflightResponse.md +5 -0
  121. package/build/src/third_party/issue-descriptions/corsNoCorsRedirectModeNotFollow.md +5 -0
  122. package/build/src/third_party/issue-descriptions/corsOriginMismatch.md +6 -0
  123. package/build/src/third_party/issue-descriptions/corsPreflightResponseInvalid.md +5 -0
  124. package/build/src/third_party/issue-descriptions/corsRedirectContainsCredentials.md +5 -0
  125. package/build/src/third_party/issue-descriptions/corsWildcardOriginNotAllowed.md +8 -0
  126. package/build/src/third_party/issue-descriptions/cspEvalViolation.md +9 -0
  127. package/build/src/third_party/issue-descriptions/cspInlineViolation.md +10 -0
  128. package/build/src/third_party/issue-descriptions/cspTrustedTypesPolicyViolation.md +5 -0
  129. package/build/src/third_party/issue-descriptions/cspTrustedTypesSinkViolation.md +8 -0
  130. package/build/src/third_party/issue-descriptions/cspURLViolation.md +10 -0
  131. package/build/src/third_party/issue-descriptions/deprecation.md +3 -0
  132. package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsEmptyList.md +1 -0
  133. package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsHttpNotFound.md +1 -0
  134. package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsInvalidContentType.md +1 -0
  135. package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsInvalidResponse.md +1 -0
  136. package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsNoResponse.md +1 -0
  137. package/build/src/third_party/issue-descriptions/emailVerificationRequestDnsFetchFailed.md +1 -0
  138. package/build/src/third_party/issue-descriptions/emailVerificationRequestDnsInvalidRecord.md +1 -0
  139. package/build/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownHttpNotFound.md +1 -0
  140. package/build/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidContentType.md +1 -0
  141. package/build/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidResponse.md +1 -0
  142. package/build/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownNoResponse.md +1 -0
  143. package/build/src/third_party/issue-descriptions/emailVerificationRequestInvalidEmail.md +1 -0
  144. package/build/src/third_party/issue-descriptions/emailVerificationRequestJwksHttpNotFound.md +1 -0
  145. package/build/src/third_party/issue-descriptions/emailVerificationRequestJwksInvalidResponse.md +1 -0
  146. package/build/src/third_party/issue-descriptions/emailVerificationRequestKeyBindingSigningFailed.md +1 -0
  147. package/build/src/third_party/issue-descriptions/emailVerificationRequestRpOriginIsOpaque.md +1 -0
  148. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenHttpNotFound.md +1 -0
  149. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidContentType.md +1 -0
  150. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidResponse.md +1 -0
  151. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidSdJwt.md +1 -0
  152. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenMalformedSdJwt.md +1 -0
  153. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenNoResponse.md +1 -0
  154. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidAudience.md +1 -0
  155. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidIssuedAt.md +1 -0
  156. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidNonce.md +1 -0
  157. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidSdHash.md +1 -0
  158. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidTyp.md +1 -0
  159. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingAud.md +1 -0
  160. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingCnf.md +1 -0
  161. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingIat.md +1 -0
  162. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingNonce.md +1 -0
  163. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingSdHash.md +1 -0
  164. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbSignatureFailed.md +1 -0
  165. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmail.md +1 -0
  166. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmailVerified.md +1 -0
  167. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidHolderKey.md +1 -0
  168. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuedAt.md +1 -0
  169. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuer.md +1 -0
  170. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtJwksMissingKeys.md +1 -0
  171. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingCnf.md +1 -0
  172. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingEmail.md +1 -0
  173. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIat.md +1 -0
  174. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIss.md +1 -0
  175. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtSignatureFailed.md +1 -0
  176. package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtUnsupportedHeaderAlg.md +1 -0
  177. package/build/src/third_party/issue-descriptions/emailVerificationRequestUserLoggedOut.md +1 -0
  178. package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownAccountsEndpointCrossOrigin.md +1 -0
  179. package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownHttpNotFound.md +1 -0
  180. package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownInvalidContentType.md +1 -0
  181. package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownInvalidResponse.md +1 -0
  182. package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownIssuanceEndpointCrossOrigin.md +1 -0
  183. package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownListEmpty.md +1 -0
  184. package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownMissingAccountsEndpoint.md +1 -0
  185. package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownMissingIssuanceEndpoint.md +1 -0
  186. package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownNoResponse.md +1 -0
  187. package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownUnsupportedSigningAlgorithm.md +1 -0
  188. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -0
  189. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -0
  190. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsNoResponse.md +1 -0
  191. package/build/src/third_party/issue-descriptions/federatedAuthRequestApprovalDeclined.md +1 -0
  192. package/build/src/third_party/issue-descriptions/federatedAuthRequestCanceled.md +1 -0
  193. package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -0
  194. package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorIdToken.md +1 -0
  195. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -0
  196. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -0
  197. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -0
  198. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -0
  199. package/build/src/third_party/issue-descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -0
  200. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
  201. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
  202. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
  203. package/build/src/third_party/issue-descriptions/federatedAuthRequestTooManyRequests.md +1 -0
  204. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -0
  205. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -0
  206. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -0
  207. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -0
  208. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -0
  209. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -0
  210. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -0
  211. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -0
  212. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -0
  213. package/build/src/third_party/issue-descriptions/fetchingPartitionedBlobURL.md +7 -0
  214. package/build/src/third_party/issue-descriptions/genericBackUINavigationWouldSkipAd.md +4 -0
  215. package/build/src/third_party/issue-descriptions/genericFormAriaLabelledByToNonExistingIdError.md +8 -0
  216. package/build/src/third_party/issue-descriptions/genericFormAutocompleteAttributeEmptyError.md +5 -0
  217. package/build/src/third_party/issue-descriptions/genericFormDuplicateIdForInputError.md +5 -0
  218. package/build/src/third_party/issue-descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +5 -0
  219. package/build/src/third_party/issue-descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +5 -0
  220. package/build/src/third_party/issue-descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +5 -0
  221. package/build/src/third_party/issue-descriptions/genericFormInputWithNoLabelError.md +5 -0
  222. package/build/src/third_party/issue-descriptions/genericFormLabelForMatchesNonExistingIdError.md +5 -0
  223. package/build/src/third_party/issue-descriptions/genericFormLabelForNameError.md +5 -0
  224. package/build/src/third_party/issue-descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +5 -0
  225. package/build/src/third_party/issue-descriptions/genericFormModelContextMissingToolDescription.md +5 -0
  226. package/build/src/third_party/issue-descriptions/genericFormModelContextMissingToolName.md +5 -0
  227. package/build/src/third_party/issue-descriptions/genericFormModelContextParameterMissingName.md +5 -0
  228. package/build/src/third_party/issue-descriptions/genericFormModelContextParameterMissingTitleAndDescription.md +5 -0
  229. package/build/src/third_party/issue-descriptions/genericFormModelContextRequiredParameterMissingName.md +5 -0
  230. package/build/src/third_party/issue-descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
  231. package/build/src/third_party/issue-descriptions/genericResponseWasBlockedByORB.md +4 -0
  232. package/build/src/third_party/issue-descriptions/heavyAd.md +10 -0
  233. package/build/src/third_party/issue-descriptions/mixedContent.md +5 -0
  234. package/build/src/third_party/issue-descriptions/navigatingPartitionedBlobURL.md +5 -0
  235. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabled.md +7 -0
  236. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluder.md +9 -0
  237. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluderParent.md +9 -0
  238. package/build/src/third_party/issue-descriptions/permissionElementCspFrameAncestorsMissing.md +5 -0
  239. package/build/src/third_party/issue-descriptions/permissionElementFencedFrameDisallowed.md +5 -0
  240. package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooLarge.md +5 -0
  241. package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooSmall.md +5 -0
  242. package/build/src/third_party/issue-descriptions/permissionElementGeolocationDeprecated.md +5 -0
  243. package/build/src/third_party/issue-descriptions/permissionElementInsetBoxShadowUnsupported.md +5 -0
  244. package/build/src/third_party/issue-descriptions/permissionElementInvalidDisplayStyle.md +5 -0
  245. package/build/src/third_party/issue-descriptions/permissionElementInvalidSizeValue.md +5 -0
  246. package/build/src/third_party/issue-descriptions/permissionElementInvalidType.md +5 -0
  247. package/build/src/third_party/issue-descriptions/permissionElementInvalidTypeActivation.md +5 -0
  248. package/build/src/third_party/issue-descriptions/permissionElementLowContrast.md +5 -0
  249. package/build/src/third_party/issue-descriptions/permissionElementNonOpaqueColor.md +5 -0
  250. package/build/src/third_party/issue-descriptions/permissionElementPaddingBottomUnsupported.md +6 -0
  251. package/build/src/third_party/issue-descriptions/permissionElementPaddingRightUnsupported.md +6 -0
  252. package/build/src/third_party/issue-descriptions/permissionElementPermissionsPolicyBlocked.md +5 -0
  253. package/build/src/third_party/issue-descriptions/permissionElementRegistrationFailed.md +5 -0
  254. package/build/src/third_party/issue-descriptions/permissionElementRequestInProgress.md +5 -0
  255. package/build/src/third_party/issue-descriptions/permissionElementSecurityChecksFailed.md +5 -0
  256. package/build/src/third_party/issue-descriptions/permissionElementTypeNotSupported.md +5 -0
  257. package/build/src/third_party/issue-descriptions/permissionElementUntrustedEvent.md +7 -0
  258. package/build/src/third_party/issue-descriptions/placeholderDescriptionForInvisibleIssues.md +3 -0
  259. package/build/src/third_party/issue-descriptions/propertyRuleInvalidNameIssue.md +3 -0
  260. package/build/src/third_party/issue-descriptions/propertyRuleIssue.md +7 -0
  261. package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +7 -0
  262. package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedSelectChild.md +7 -0
  263. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +3 -0
  264. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +3 -0
  265. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +3 -0
  266. package/build/src/third_party/issue-descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +3 -0
  267. package/build/src/third_party/issue-descriptions/selectivePermissionsIntervention.md +7 -0
  268. package/build/src/third_party/issue-descriptions/sharedArrayBuffer.md +7 -0
  269. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -0
  270. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +3 -0
  271. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +3 -0
  272. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +1 -0
  273. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +1 -0
  274. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +1 -0
  275. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorExpiredResponse.md +3 -0
  276. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +3 -0
  277. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInsufficientResources.md +1 -0
  278. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +1 -0
  279. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +1 -0
  280. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
  281. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNavigationRequest.md +3 -0
  282. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNoMatchField.md +1 -0
  283. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
  284. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +1 -0
  285. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonSecureContext.md +3 -0
  286. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringIdField.md +1 -0
  287. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +1 -0
  288. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +1 -0
  289. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +1 -0
  290. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorRequestAborted.md +1 -0
  291. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorShuttingDown.md +1 -0
  292. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorTooLongIdField.md +3 -0
  293. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorUnsupportedType.md +3 -0
  294. package/build/src/third_party/issue-descriptions/sriInvalidSignatureHeader.md +14 -0
  295. package/build/src/third_party/issue-descriptions/sriInvalidSignatureInputHeader.md +15 -0
  296. package/build/src/third_party/issue-descriptions/sriMissingSignatureHeader.md +8 -0
  297. package/build/src/third_party/issue-descriptions/sriMissingSignatureInputHeader.md +7 -0
  298. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsIncorrectLength.md +11 -0
  299. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsNotByteSequence.md +14 -0
  300. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsParameterized.md +15 -0
  301. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentName.md +8 -0
  302. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentType.md +13 -0
  303. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +4 -0
  304. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +5 -0
  305. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidParameter.md +11 -0
  306. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderKeyIdLength.md +12 -0
  307. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingLabel.md +6 -0
  308. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +8 -0
  309. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueMissingComponents.md +11 -0
  310. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueNotInnerList.md +11 -0
  311. package/build/src/third_party/issue-descriptions/sriValidationFailedIntegrityMismatch.md +10 -0
  312. package/build/src/third_party/issue-descriptions/sriValidationFailedInvalidLength.md +5 -0
  313. package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureExpired.md +6 -0
  314. package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureMismatch.md +11 -0
  315. package/build/src/third_party/issue-descriptions/stylesheetLateImport.md +4 -0
  316. package/build/src/third_party/issue-descriptions/stylesheetRequestFailed.md +3 -0
  317. package/build/src/third_party/issue-descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +3 -0
  318. package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestLength.md +12 -0
  319. package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestType.md +17 -0
  320. package/build/src/third_party/issue-descriptions/unencodedDigestMalformedDictionary.md +14 -0
  321. package/build/src/third_party/issue-descriptions/unencodedDigestUnknownAlgorithm.md +15 -0
  322. package/build/src/third_party/lighthouse-devtools-mcp-bundle.js +61598 -0
  323. package/build/src/tools/ToolDefinition.js +73 -0
  324. package/build/src/tools/categories.js +36 -0
  325. package/build/src/tools/console.js +98 -0
  326. package/build/src/tools/emulation.js +84 -0
  327. package/build/src/tools/extensions.js +101 -0
  328. package/build/src/tools/input.js +469 -0
  329. package/build/src/tools/lighthouse.js +136 -0
  330. package/build/src/tools/memory.js +227 -0
  331. package/build/src/tools/network.js +125 -0
  332. package/build/src/tools/pages.js +419 -0
  333. package/build/src/tools/performance.js +200 -0
  334. package/build/src/tools/screencast.js +117 -0
  335. package/build/src/tools/screenshot.js +169 -0
  336. package/build/src/tools/script.js +151 -0
  337. package/build/src/tools/slim/tools.js +88 -0
  338. package/build/src/tools/snapshot.js +61 -0
  339. package/build/src/tools/thirdPartyDeveloper.js +85 -0
  340. package/build/src/tools/tools.js +56 -0
  341. package/build/src/tools/webmcp.js +66 -0
  342. package/build/src/trace-processing/parse.js +85 -0
  343. package/build/src/types.js +7 -0
  344. package/build/src/utils/check-for-updates.js +74 -0
  345. package/build/src/utils/files.js +61 -0
  346. package/build/src/utils/id.js +16 -0
  347. package/build/src/utils/keyboard.js +297 -0
  348. package/build/src/utils/pagination.js +50 -0
  349. package/build/src/utils/string.js +37 -0
  350. package/build/src/utils/types.js +7 -0
  351. package/build/src/version.js +10 -0
  352. package/package.json +100 -0
  353. package/skills/a11y-debugging/SKILL.md +89 -0
  354. package/skills/a11y-debugging/references/a11y-snippets.md +92 -0
  355. package/skills/chrome-devtools/SKILL.md +72 -0
  356. package/skills/chrome-devtools-cli/SKILL.md +153 -0
  357. package/skills/chrome-devtools-cli/references/installation.md +14 -0
  358. package/skills/debug-optimize-lcp/SKILL.md +121 -0
  359. package/skills/debug-optimize-lcp/references/elements-and-size.md +27 -0
  360. package/skills/debug-optimize-lcp/references/lcp-breakdown.md +23 -0
  361. package/skills/debug-optimize-lcp/references/lcp-snippets.md +79 -0
  362. package/skills/debug-optimize-lcp/references/optimization-strategies.md +38 -0
  363. package/skills/memory-leak-debugging/SKILL.md +50 -0
  364. package/skills/memory-leak-debugging/references/common-leaks.md +33 -0
  365. package/skills/memory-leak-debugging/references/compare_snapshots.js +109 -0
  366. package/skills/memory-leak-debugging/references/memlab.md +29 -0
  367. package/skills/troubleshooting/SKILL.md +98 -0
@@ -0,0 +1,50 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ const DEFAULT_PAGE_SIZE = 20;
7
+ export function paginate(items, options) {
8
+ const total = items.length;
9
+ if (!options || noPaginationOptions(options)) {
10
+ return {
11
+ items,
12
+ currentPage: 0,
13
+ totalPages: 1,
14
+ hasNextPage: false,
15
+ hasPreviousPage: false,
16
+ startIndex: 0,
17
+ endIndex: total,
18
+ invalidPage: false,
19
+ };
20
+ }
21
+ const pageSize = options.pageSize ?? DEFAULT_PAGE_SIZE;
22
+ const totalPages = Math.max(1, Math.ceil(total / pageSize));
23
+ const { currentPage, invalidPage } = resolvePageIndex(options.pageIdx, totalPages);
24
+ const startIndex = currentPage * pageSize;
25
+ const pageItems = items.slice(startIndex, startIndex + pageSize);
26
+ const endIndex = startIndex + pageItems.length;
27
+ return {
28
+ items: pageItems,
29
+ currentPage,
30
+ totalPages,
31
+ hasNextPage: currentPage < totalPages - 1,
32
+ hasPreviousPage: currentPage > 0,
33
+ startIndex,
34
+ endIndex,
35
+ invalidPage,
36
+ };
37
+ }
38
+ function noPaginationOptions(options) {
39
+ return options.pageSize === undefined && options.pageIdx === undefined;
40
+ }
41
+ function resolvePageIndex(pageIdx, totalPages) {
42
+ if (pageIdx === undefined) {
43
+ return { currentPage: 0, invalidPage: false };
44
+ }
45
+ if (pageIdx < 0 || pageIdx >= totalPages) {
46
+ return { currentPage: 0, invalidPage: true };
47
+ }
48
+ return { currentPage: pageIdx, invalidPage: false };
49
+ }
50
+ //# sourceMappingURL=pagination.js.map
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Converts a given string to snake_case.
8
+ * This function handles camelCase, PascalCase, and acronyms, including transitions between letters and numbers.
9
+ * It uses Unicode-aware regular expressions (`\p{L}`, `\p{N}`, `\p{Lu}`, `\p{Ll}` with the `u` flag)
10
+ * to correctly process letters and numbers from various languages.
11
+ *
12
+ * @param text The input string to convert to snake_case.
13
+ * @returns The snake_case version of the input string.
14
+ */
15
+ export function toSnakeCase(text) {
16
+ if (!text) {
17
+ return '';
18
+ }
19
+ // First, handle case-based transformations to insert underscores correctly.
20
+ // 1. Add underscore between a letter and a number.
21
+ // e.g., "version2" -> "version_2"
22
+ // 2. Add underscore between an uppercase letter sequence and a following uppercase+lowercase sequence.
23
+ // e.g., "APIFlags" -> "API_Flags"
24
+ // 3. Add underscore between a lowercase/number and an uppercase letter.
25
+ // e.g., "lastName" -> "last_Name", "version_2Update" -> "version_2_Update"
26
+ // 4. Replace sequences of non-alphanumeric with a single underscore
27
+ // 5. Remove any leading or trailing underscores.
28
+ const result = text
29
+ .replace(/(\p{L})(\p{N})/gu, '$1_$2') // 1
30
+ .replace(/(\p{Lu}+)(\p{Lu}\p{Ll})/gu, '$1_$2') // 2
31
+ .replace(/(\p{Ll}|\p{N})(\p{Lu})/gu, '$1_$2') // 3
32
+ .toLowerCase()
33
+ .replace(/[^\p{L}\p{N}]+/gu, '_') // 4
34
+ .replace(/^_|_$/g, ''); // 5
35
+ return result;
36
+ }
37
+ //# sourceMappingURL=string.js.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ // If moved update release-please config
7
+ // x-release-please-start-version
8
+ export const VERSION = '1.3.0';
9
+ // x-release-please-end
10
+ //# sourceMappingURL=version.js.map
package/package.json ADDED
@@ -0,0 +1,100 @@
1
+ {
2
+ "name": "@gabrielbryk/arc-devtools-mcp",
3
+ "version": "1.3.0",
4
+ "description": "Arc-compatible MCP server for Chrome DevTools. Fork of chrome-devtools-mcp that adds an --arc mode so new_page reuses a blank tab instead of crashing Arc.",
5
+ "type": "module",
6
+ "bin": {
7
+ "arc-devtools-mcp": "./build/src/bin/chrome-devtools-mcp.js",
8
+ "arc-devtools": "./build/src/bin/chrome-devtools.js"
9
+ },
10
+ "main": "./build/src/index.js",
11
+ "scripts": {
12
+ "cli:generate": "node scripts/generate-cli.ts",
13
+ "clean": "node -e \"require('fs').rmSync('build', {recursive: true, force: true})\"",
14
+ "bundle": "npm run clean && npm run build && rollup -c rollup.config.mjs && node -e \"require('fs').rmSync('build/node_modules', {recursive: true, force: true})\" && node scripts/append-lighthouse-notices.ts",
15
+ "build": "tsc && node scripts/post-build.ts",
16
+ "typecheck": "tsc --noEmit",
17
+ "format": "eslint --cache --fix . && prettier --write --cache .",
18
+ "check-format": "eslint --cache . && prettier --check --cache .;",
19
+ "gen": "npm run build && npm run docs:generate && npm run cli:generate && npm run update-metrics && npm run format",
20
+ "docs:generate": "node scripts/generate-docs.ts",
21
+ "start": "npm run build && node build/src/bin/chrome-devtools-mcp.js",
22
+ "start-debug": "DEBUG=mcp:* DEBUG_COLORS=false npm run build && node build/src/bin/chrome-devtools-mcp.js",
23
+ "test": "npm run build && node scripts/test.mjs",
24
+ "test:no-build": "node scripts/test.mjs",
25
+ "test:only": "npm run build && node scripts/test.mjs --test-only",
26
+ "test:update-snapshots": "npm run build && node scripts/test.mjs --test-update-snapshots",
27
+ "prepare": "node scripts/prepare.ts",
28
+ "prepublishOnly": "npm run bundle",
29
+ "verify-server-json-version": "node scripts/verify-server-json-version.ts",
30
+ "update-lighthouse": "node scripts/update-lighthouse.ts",
31
+ "update-metrics": "node scripts/update_metrics.ts",
32
+ "verify-npm-package": "node scripts/verify-npm-package.mjs",
33
+ "eval": "npm run build && node scripts/eval_gemini.ts",
34
+ "count-tokens": "node scripts/count_tokens.ts"
35
+ },
36
+ "files": [
37
+ "build/src",
38
+ "LICENSE",
39
+ "skills",
40
+ "!*.tsbuildinfo",
41
+ "!*.js.map"
42
+ ],
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "git+https://github.com/gabrielbryk/arc-devtools-mcp.git"
46
+ },
47
+ "author": "Gabriel Bryk <me@gabebryk.com> (https://gabebryk.com/)",
48
+ "license": "Apache-2.0",
49
+ "publishConfig": {
50
+ "access": "public"
51
+ },
52
+ "bugs": {
53
+ "url": "https://github.com/gabrielbryk/arc-devtools-mcp/issues"
54
+ },
55
+ "homepage": "https://github.com/gabrielbryk/arc-devtools-mcp#readme",
56
+ "mcpName": "io.github.gabrielbryk/arc-devtools-mcp",
57
+ "devDependencies": {
58
+ "@eslint/js": "^9.35.0",
59
+ "@google/genai": "^2.0.1",
60
+ "@modelcontextprotocol/sdk": "1.29.0",
61
+ "@rollup/plugin-commonjs": "^29.0.0",
62
+ "@rollup/plugin-json": "^6.1.0",
63
+ "@rollup/plugin-node-resolve": "^16.0.3",
64
+ "@stylistic/eslint-plugin": "^5.4.0",
65
+ "@toon-format/toon": "^2.2.0",
66
+ "@types/debug": "^4.1.12",
67
+ "@types/filesystem": "^0.0.36",
68
+ "@types/node": "^25.0.0",
69
+ "@types/semver": "^7.7.1",
70
+ "@types/sinon": "^21.0.0",
71
+ "@types/yargs": "^17.0.33",
72
+ "@typescript-eslint/eslint-plugin": "^8.43.0",
73
+ "@typescript-eslint/parser": "^8.43.0",
74
+ "chrome-devtools-frontend": "1.0.1646286",
75
+ "core-js": "3.49.0",
76
+ "debug": "4.4.3",
77
+ "eslint": "^9.35.0",
78
+ "eslint-import-resolver-typescript": "^4.4.4",
79
+ "eslint-plugin-import": "^2.32.0",
80
+ "globals": "^17.0.0",
81
+ "lighthouse": "13.4.0",
82
+ "prettier": "^3.6.2",
83
+ "puppeteer": "25.1.0",
84
+ "rollup": "4.62.0",
85
+ "rollup-plugin-cleanup": "^3.2.1",
86
+ "rollup-plugin-license": "^3.6.0",
87
+ "semver": "^7.7.4",
88
+ "sinon": "^22.0.0",
89
+ "typescript": "^6.0.2",
90
+ "typescript-eslint": "^8.43.0",
91
+ "urlpattern-polyfill": "^10.1.0",
92
+ "yargs": "18.0.0"
93
+ },
94
+ "engines": {
95
+ "node": "^20.19.0 || ^22.12.0 || >=23"
96
+ },
97
+ "overrides": {
98
+ "puppeteer-core": "$puppeteer"
99
+ }
100
+ }
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: a11y-debugging
3
+ description: Uses Chrome DevTools MCP for accessibility (a11y) debugging and auditing based on web.dev guidelines. Use when testing semantic HTML, ARIA labels, focus states, keyboard navigation, tap targets, and color contrast.
4
+ ---
5
+
6
+ ## Core Concepts
7
+
8
+ **Accessibility Tree vs DOM**: Visually hiding an element (e.g., `CSS opacity: 0`) behaves differently for screen readers than `display: none` or `aria-hidden="true"`. The `take_snapshot` tool returns the accessibility tree of the page, which represents what assistive technologies "see", making it the most reliable source of truth for semantic structure.
9
+
10
+ **Reading web.dev documentation**: If you need to research specific accessibility guidelines (like `https://web.dev/articles/accessible-tap-targets`), you can append `.md.txt` to the URL (e.g., `https://web.dev/articles/accessible-tap-targets.md.txt`) to fetch the clean, raw markdown version. This is much easier to read!
11
+
12
+ ## Workflow Patterns
13
+
14
+ ### 1. Automated Audit (Lighthouse)
15
+
16
+ Start by running a Lighthouse accessibility audit to get a comprehensive baseline. This tool provides a high-level score and lists specific failing elements with remediation advice.
17
+
18
+ 1. Run the audit:
19
+ - Set `mode` to `"navigation"` to refresh the page and capture load issues.
20
+ - Set `outputDirPath` (e.g., `/tmp/lh-report`) to save the full JSON report.
21
+ 2. **Analyze the Summary**:
22
+ - Check `scores` (0-1 scale). A score < 1 indicates violations.
23
+ - Review `audits.failed` count.
24
+ 3. **Review the Report (CRITICAL)**:
25
+ - **Parsing**: Do not read the entire file line-by-line. Use a CLI tool like `jq` or a Node.js one-liner to filter for failures:
26
+ ```bash
27
+ # Extract failing audits with their details
28
+ node -e "const r=require('./report.json'); Object.values(r.audits).filter(a=>a.score!==null && a.score<1).forEach(a=>console.log(JSON.stringify({id:a.id, title:a.title, items:a.details?.items})))"
29
+ ```
30
+ - This efficiently extracts the `selector` and `snippet` of failing elements without loading the full report into context.
31
+
32
+ ### 2. Browser Issues & Audits
33
+
34
+ Chrome automatically checks for common accessibility problems. Use `list_console_messages` to check for these native audits:
35
+
36
+ - `types`: `["issue"]`
37
+ - `includePreservedMessages`: `true` (to catch issues that occurred during page load)
38
+
39
+ This often reveals missing labels, invalid ARIA attributes, and other critical errors without manual investigation.
40
+
41
+ ### 3. Semantics & Structure
42
+
43
+ The accessibility tree exposes the heading hierarchy and semantic landmarks.
44
+
45
+ 1. Navigate to the page.
46
+ 2. Use `take_snapshot` to capture the accessibility tree.
47
+ 3. **Check Heading Levels**: Ensure heading levels (`h1`, `h2`, `h3`, etc.) are logical and do not skip levels. The snapshot will include heading roles.
48
+ 4. **Content Reordering**: Verify that the DOM order (which drives the accessibility tree) matches the visual reading order. Use `take_screenshot` to inspect the visual layout and compare it against the snapshot structure to catch CSS floats or absolute positioning that jumbles the logical flow.
49
+
50
+ ### 4. Labels, Forms & Text Alternatives
51
+
52
+ 1. Locate buttons, inputs, and images in the `take_snapshot` output.
53
+ 2. Ensure interactive elements have an accessible name (e.g., a button should not just say `""` if it only contains an icon).
54
+ 3. **Orphaned Inputs**: Verify that all form inputs have associated labels. Use `evaluate_script` with the **"Find Orphaned Form Inputs" snippet** found in [references/a11y-snippets.md](references/a11y-snippets.md).
55
+ 4. Check images for `alt` text.
56
+
57
+ ### 5. Focus & Keyboard Navigation
58
+
59
+ Testing "keyboard traps" and proper focus management without visual feedback relies on tracking the focused element.
60
+
61
+ 1. Use the `press_key` tool with `"Tab"` or `"Shift+Tab"` to move focus.
62
+ 2. Use `take_snapshot` to capture the updated accessibility tree.
63
+ 3. Locate the element marked as focused in the snapshot to verify focus moved to the expected interactive element.
64
+ 4. If a modal opens, focus must move into the modal and "trap" within it until closed.
65
+
66
+ ### 6. Tap Targets and Visuals
67
+
68
+ According to web.dev, tap targets should be at least 48x48 pixels with sufficient spacing. Since the accessibility tree doesn't show sizes, use `evaluate_script` with the **"Measure Tap Target Size" snippet** found in [references/a11y-snippets.md](references/a11y-snippets.md).
69
+
70
+ _Pass the element's `uid` from the snapshot as an argument to `evaluate_script`._
71
+
72
+ ### 7. Color Contrast
73
+
74
+ To verify color contrast ratios, start by checking for native accessibility issues:
75
+
76
+ 1. Call `list_console_messages` with `types: ["issue"]`.
77
+ 2. Look for "Low Contrast" issues in the output.
78
+
79
+ If native audits do not report issues (which may happen in some headless environments) or if you need to check a specific element manually, use `evaluate_script` with the **"Check Color Contrast" snippet** found in [references/a11y-snippets.md](references/a11y-snippets.md).
80
+
81
+ ### 8. Global Page Checks
82
+
83
+ Verify document-level accessibility settings often missed in component testing using the **"Global Page Checks" snippet** found in [references/a11y-snippets.md](references/a11y-snippets.md).
84
+
85
+ ## Troubleshooting
86
+
87
+ If standard a11y queries fail or the `evaluate_script` snippets return unexpected results:
88
+
89
+ - **Visual Inspection**: If automated scripts cannot determine contrast (e.g., text over gradient images or complex backgrounds), use `take_screenshot` to capture the element. While models cannot measure exact contrast ratios from images, they can visually assess legibility and identify obvious issues.
@@ -0,0 +1,92 @@
1
+ # Accessibility Debugging Snippets
2
+
3
+ Use these JavaScript snippets with the `evaluate_script` tool.
4
+
5
+ ## 1. Find Orphaned Form Inputs
6
+
7
+ Finds form inputs that lack an associated label (no `label[for]`, `aria-label`, `aria-labelledby`, or wrapping `<label>`).
8
+
9
+ ```js
10
+ () =>
11
+ Array.from(document.querySelectorAll('input, select, textarea'))
12
+ .filter(i => {
13
+ const hasId = i.id && document.querySelector(`label[for="${i.id}"]`);
14
+ const hasAria =
15
+ i.getAttribute('aria-label') || i.getAttribute('aria-labelledby');
16
+ return !hasId && !hasAria && !i.closest('label');
17
+ })
18
+ .map(i => ({
19
+ tag: i.tagName,
20
+ id: i.id,
21
+ name: i.name,
22
+ placeholder: i.placeholder,
23
+ }));
24
+ ```
25
+
26
+ ## 2. Measure Tap Target Size
27
+
28
+ Returns the bounding box dimensions of an element. Pass the element's `uid` from the snapshot as an argument to `evaluate_script`.
29
+
30
+ ```js
31
+ el => {
32
+ const rect = el.getBoundingClientRect();
33
+ return {width: rect.width, height: rect.height};
34
+ };
35
+ ```
36
+
37
+ ## 3. Check Color Contrast
38
+
39
+ Approximates the contrast ratio between an element's text color and background color. Pass the element's `uid` to test against WCAG AA (4.5:1 for normal text, 3:1 for large text).
40
+
41
+ **Note**: This uses a simplified algorithm and may not account for transparency, gradients, or background images. For production-grade auditing, consider injecting `axe-core`.
42
+
43
+ ```js
44
+ el => {
45
+ function getRGB(colorStr) {
46
+ const match = colorStr.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
47
+ return match
48
+ ? [parseInt(match[1]), parseInt(match[2]), parseInt(match[3])]
49
+ : [255, 255, 255];
50
+ }
51
+ function luminance(r, g, b) {
52
+ const a = [r, g, b].map(function (v) {
53
+ v /= 255;
54
+ return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);
55
+ });
56
+ return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722;
57
+ }
58
+
59
+ const style = window.getComputedStyle(el);
60
+ const fg = getRGB(style.color);
61
+ let bg = getRGB(style.backgroundColor);
62
+
63
+ const l1 = luminance(fg[0], fg[1], fg[2]);
64
+ const l2 = luminance(bg[0], bg[1], bg[2]);
65
+ const ratio = (Math.max(l1, l2) + 0.05) / (Math.min(l1, l2) + 0.05);
66
+
67
+ return {
68
+ color: style.color,
69
+ bg: style.backgroundColor,
70
+ contrastRatio: ratio.toFixed(2),
71
+ };
72
+ };
73
+ ```
74
+
75
+ ## 4. Global Page Checks
76
+
77
+ Checks document-level accessibility settings often missed in component testing.
78
+
79
+ ```js
80
+ () => ({
81
+ lang:
82
+ document.documentElement.lang ||
83
+ 'MISSING - Screen readers need this for pronunciation',
84
+ title: document.title || 'MISSING - Required for context',
85
+ viewport:
86
+ document.querySelector('meta[name="viewport"]')?.content ||
87
+ 'MISSING - Check for user-scalable=no (bad practice)',
88
+ reducedMotion: window.matchMedia('(prefers-reduced-motion: reduce)').matches
89
+ ? 'Enabled'
90
+ : 'Disabled',
91
+ });
92
+ ```
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: chrome-devtools
3
+ description: Uses Chrome DevTools via MCP for efficient debugging, troubleshooting and browser automation. Use when debugging web pages, automating browser interactions, analyzing performance, or inspecting network requests. This skill does not apply to `--slim` mode (MCP configuration).
4
+ ---
5
+
6
+ ## Core Concepts
7
+
8
+ **Browser lifecycle**: Browser starts automatically on first tool call using a persistent Chrome profile. Configure via CLI args in the MCP server configuration: `npx chrome-devtools-mcp@latest --help`.
9
+ Addional tooling can be enabled by providing the following flags:
10
+
11
+ - For extension tooling, use the `--categoryExtensions` flag.
12
+ - For memory tooling, use the `--memoryDebugging` flag.
13
+
14
+ **Page selection**: Tools operate on the currently selected page. Use `list_pages` to see available pages, then `select_page` to switch context.
15
+ **Element interaction**: Use `take_snapshot` to get page structure with element `uid`s. Each element has a unique `uid` for interaction. If an element isn't found, take a fresh snapshot - the element may have been removed or the page changed.
16
+
17
+ ## Workflow Patterns
18
+
19
+ ### Before interacting with a page
20
+
21
+ 1. Navigate: `navigate_page` or `new_page`
22
+ 2. Wait: `wait_for` to ensure content is loaded if you know what you look for.
23
+ 3. Snapshot: `take_snapshot` to understand page structure
24
+ 4. Interact: Use element `uid`s from snapshot for `click`, `fill`, etc.
25
+
26
+ ### Efficient data retrieval
27
+
28
+ - Use `filePath` parameter for large outputs (screenshots, snapshots, traces)
29
+ - Use pagination (`pageIdx`, `pageSize`) and filtering (`types`) to minimize data
30
+ - Set `includeSnapshot: false` on input actions unless you need updated page state
31
+
32
+ ### Tool selection
33
+
34
+ - **Automation/interaction**: `take_snapshot` (text-based, faster, better for automation)
35
+ - **Visual inspection**: `take_screenshot` (when user needs to see visual state)
36
+ - **Additional details**: `evaluate_script` for data not in accessibility tree
37
+
38
+ ### Parallel execution
39
+
40
+ You can send multiple tool calls in parallel, but maintain correct order: navigate → wait → snapshot → interact.
41
+
42
+ ### Testing an extension
43
+
44
+ > **Before proceeding**: Extension tools (`install_extension`, `list_extensions`, etc.) are only available when the MCP server is started with the `--categoryExtensions` flag. If these tools are not in your tool list, stop and ask the user to update their MCP server configuration:
45
+ >
46
+ > ```json
47
+ > {
48
+ > "mcpServers": {
49
+ > "chrome-devtools": {
50
+ > "command": "npx",
51
+ > "args": ["chrome-devtools-mcp@latest", "--categoryExtensions"]
52
+ > }
53
+ > }
54
+ > }
55
+ > ```
56
+ >
57
+ > After updating, the user must restart the MCP server (or their AI client) for the change to take effect.
58
+
59
+ 1. **Install**: Use `install_extension` with the path to the unpacked extension.
60
+ 2. **Identify**: Get the extension ID from the response or by calling `list_extensions`.
61
+ 3. **Trigger Action**: Use `trigger_extension_action` to open the popup or side panel if applicable.
62
+ 4. **Verify Service Worker**: Use `evaluate_script` with `serviceWorkerId` to check extension state or trigger background actions.
63
+ 5. **Verify Page Behavior**: Navigate to a page where the extension operates and use `take_snapshot` to check if content scripts injected elements or modified the page correctly.
64
+
65
+ ## Troubleshooting
66
+
67
+ If `chrome-devtools-mcp` is insufficient, guide users to use Chrome DevTools UI:
68
+
69
+ - https://developer.chrome.com/docs/devtools
70
+ - https://developer.chrome.com/docs/devtools/ai-assistance
71
+
72
+ If there are errors launching `chrome-devtools-mcp` or Chrome, refer to https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/main/docs/troubleshooting.md.
@@ -0,0 +1,153 @@
1
+ ---
2
+ name: chrome-devtools-cli
3
+ description: Use this skill to write shell scripts or run shell commands to automate tasks in the browser or otherwise use Chrome DevTools via CLI.
4
+ ---
5
+
6
+ The `chrome-devtools-mcp` CLI lets you interact with the browser from your terminal.
7
+
8
+ ## Setup
9
+
10
+ _Note: If this is your very first time using the CLI, see [references/installation.md](references/installation.md) for setup. Installation is a one-time prerequisite and is **not** part of the regular AI workflow._
11
+
12
+ ## AI Workflow
13
+
14
+ 1. **Execute**: Run tools directly (e.g., `chrome-devtools list_pages`). The background server starts implicitly; **do not** run `start`/`status`/`stop` before each use.
15
+ 2. **Inspect**: Use `take_snapshot` to get an element `<uid>`.
16
+ 3. **Act**: Use `click`, `fill`, etc. State persists across commands.
17
+
18
+ Snapshot example:
19
+
20
+ ```
21
+ uid=1_0 RootWebArea "Example Domain" url="https://example.com/"
22
+ uid=1_1 heading "Example Domain" level="1"
23
+ ```
24
+
25
+ ## Command Usage
26
+
27
+ ```sh
28
+ chrome-devtools <tool> [arguments] [flags]
29
+ ```
30
+
31
+ Use `--help` on any command. Output defaults to Markdown, use `--output-format=json` for JSON.
32
+
33
+ ## Input Automation (<uid> from snapshot)
34
+
35
+ ```bash
36
+ chrome-devtools take_snapshot --help # Help message for commands, works for any command.
37
+ chrome-devtools take_snapshot # Take a text snapshot of the page to get UIDs for elements
38
+ chrome-devtools click "id" # Clicks on the provided element
39
+ chrome-devtools click "id" --dblClick true --includeSnapshot true # Double clicks and returns a snapshot
40
+ chrome-devtools drag "src" "dst" # Drag an element onto another element
41
+ chrome-devtools drag "src" "dst" --includeSnapshot true # Drag an element and return a snapshot
42
+ chrome-devtools fill "id" "text" # Type text into an input or select an option
43
+ chrome-devtools fill "id" "text" --includeSnapshot true # Fill an element and return a snapshot
44
+ chrome-devtools handle_dialog accept # Handle a browser dialog
45
+ chrome-devtools handle_dialog dismiss --promptText "hi" # Dismiss a dialog with prompt text
46
+ chrome-devtools hover "id" # Hover over the provided element
47
+ chrome-devtools hover "id" --includeSnapshot true # Hover over an element and return a snapshot
48
+ chrome-devtools press_key "Enter" # Press a key or key combination
49
+ chrome-devtools press_key "Control+A" --includeSnapshot true # Press a key and return a snapshot
50
+ chrome-devtools type_text "hello" # Type text using keyboard into a focused input
51
+ chrome-devtools type_text "hello" --submitKey "Enter" # Type text and press a submit key
52
+ chrome-devtools upload_file "id" "file.txt" # Upload a file through a provided element
53
+ chrome-devtools upload_file "id" "file.txt" --includeSnapshot true # Upload a file and return a snapshot
54
+ ```
55
+
56
+ ## Navigation
57
+
58
+ ```bash
59
+ chrome-devtools close_page 1 # Closes the page by its index
60
+ chrome-devtools list_pages # Get a list of pages open in the browser
61
+ chrome-devtools navigate_page --url "https://example.com" # Navigates the currently selected page to a URL
62
+ chrome-devtools navigate_page --type "reload" --ignoreCache true # Reload page ignoring cache
63
+ chrome-devtools navigate_page --url "https://example.com" --timeout 5000 # Navigate with a timeout
64
+ chrome-devtools navigate_page --handleBeforeUnload "accept" # Handle before unload dialog
65
+ chrome-devtools navigate_page --type "back" --initScript "foo()" # Navigate back and run an init script
66
+ chrome-devtools new_page "https://example.com" # Creates a new page
67
+ chrome-devtools new_page "https://example.com" --background true --timeout 5000 # Create new page in background
68
+ chrome-devtools new_page "https://example.com" --isolatedContext "ctx" # Create new page with isolated context
69
+ chrome-devtools select_page 1 # Select a page as a context for future tool calls
70
+ chrome-devtools select_page 1 --bringToFront true # Select a page and bring it to front
71
+ ```
72
+
73
+ ## Emulation
74
+
75
+ ```bash
76
+ chrome-devtools emulate --networkConditions "Offline" # Emulate network conditions
77
+ chrome-devtools emulate --cpuThrottlingRate 4 --geolocation "0x0" # Emulate CPU throttling and geolocation
78
+ chrome-devtools emulate --colorScheme "dark" --viewport "1920x1080" # Emulate color scheme and viewport
79
+ chrome-devtools emulate --userAgent "Mozilla/5.0..." # Emulate user agent
80
+ chrome-devtools resize_page 1920 1080 # Resizes the selected page's window
81
+ ```
82
+
83
+ ## Performance
84
+
85
+ ```bash
86
+ chrome-devtools performance_analyze_insight "1" "LCPBreakdown" # Get more details on a specific Performance Insight
87
+ chrome-devtools performance_start_trace true false # Starts a performance trace recording
88
+ chrome-devtools performance_start_trace true true --filePath t.gz # Start trace and save to a file
89
+ chrome-devtools performance_stop_trace # Stops the active performance trace
90
+ chrome-devtools performance_stop_trace --filePath "t.json" # Stop trace and save to a file
91
+ chrome-devtools take_memory_snapshot "./snap.heapsnapshot" # Capture a memory heapsnapshot
92
+ ```
93
+
94
+ ## Network
95
+
96
+ ```bash
97
+ chrome-devtools get_network_request # Get the currently selected network request
98
+ chrome-devtools get_network_request --reqid 1 --requestFilePath req.md # Get request by id and save to file
99
+ chrome-devtools get_network_request --responseFilePath res.md # Save response body to file
100
+ chrome-devtools list_network_requests # List all network requests
101
+ chrome-devtools list_network_requests --pageSize 50 --pageIdx 0 # List network requests with pagination
102
+ chrome-devtools list_network_requests --resourceTypes Fetch # Filter requests by resource type
103
+ chrome-devtools list_network_requests --includePreservedRequests true # Include preserved requests
104
+ ```
105
+
106
+ ## Debugging & Inspection
107
+
108
+ ```bash
109
+ chrome-devtools evaluate_script "() => document.title" # Evaluate a JavaScript function on the page
110
+ chrome-devtools evaluate_script "(a) => a.innerText" --args 1_4 # Evaluate JS with UID arguments
111
+ chrome-devtools get_console_message 1 # Gets a console message by its ID
112
+ chrome-devtools lighthouse_audit --mode "navigation" # Run Lighthouse audit for navigation
113
+ chrome-devtools lighthouse_audit --mode "snapshot" --device "mobile" # Run Lighthouse audit for a snapshot on mobile
114
+ chrome-devtools lighthouse_audit --outputDirPath ./out # Run Lighthouse audit and save reports
115
+ chrome-devtools list_console_messages # List all console messages
116
+ chrome-devtools list_console_messages --pageSize 20 --pageIdx 1 # List console messages with pagination
117
+ chrome-devtools list_console_messages --types error --types info # Filter console messages by type
118
+ chrome-devtools list_console_messages --includePreservedMessages true # Include preserved messages
119
+ chrome-devtools take_screenshot # Take a screenshot of the page viewport
120
+ chrome-devtools take_screenshot --fullPage true --format "jpeg" --quality 80 # Take a full page screenshot as JPEG with quality
121
+ chrome-devtools take_screenshot --uid "id" --filePath "s.png" # Take a screenshot of an element
122
+ chrome-devtools take_snapshot # Take a text snapshot of the page from the a11y tree
123
+ chrome-devtools take_snapshot --verbose true --filePath "s.txt" # Take a verbose snapshot and save to file
124
+ ```
125
+
126
+ ## Extensions
127
+
128
+ ```bash
129
+ chrome-devtools list_extensions # Lists all the Chrome extensions installed in the browser
130
+ chrome-devtools install_extension "/path/to/extension" # Installs a Chrome extension from the given path
131
+ chrome-devtools uninstall_extension "extension_id" # Uninstalls a Chrome extension by its ID
132
+ chrome-devtools reload_extension "extension_id" # Reloads an unpacked Chrome extension by its ID
133
+ chrome-devtools trigger_extension_action "extension_id" # Triggers the default action of an extension by its ID
134
+ ```
135
+
136
+ ## Experimental Features
137
+
138
+ Experimental tools are disabled by default. Enable them with the corresponding flag during `start`.
139
+
140
+ ```bash
141
+ chrome-devtools click_at 100 200 # Clicks at the provided coordinates (requires --experimentalVision=true)
142
+ chrome-devtools screencast_start # Starts a screencast recording (requires --experimentalScreencast=true and ffmpeg)
143
+ chrome-devtools screencast_stop # Stops the active screencast
144
+ chrome-devtools list_webmcp_tools # List all WebMCP tools (requires --categoryExperimentalWebmcp=true)
145
+ ```
146
+
147
+ ## Service Management
148
+
149
+ ```bash
150
+ chrome-devtools start # Start or restart chrome-devtools-mcp
151
+ chrome-devtools status # Checks if chrome-devtools-mcp is running
152
+ chrome-devtools stop # Stop chrome-devtools-mcp if any
153
+ ```
@@ -0,0 +1,14 @@
1
+ # Installation
2
+
3
+ Install the package globally to make the `chrome-devtools` command available. You only need to do this the first time you use it.
4
+
5
+ ```sh
6
+ npm i chrome-devtools-mcp@latest -g
7
+ chrome-devtools status # check if install worked.
8
+ ```
9
+
10
+ ## Troubleshooting
11
+
12
+ - **Command not found:** If `chrome-devtools` is not recognized, ensure your global npm `bin` directory is in your system's `PATH`. Restart your terminal or source your shell configuration file (e.g., `.bashrc`, `.zshrc`).
13
+ - **Permission errors:** If you encounter `EACCES` or permission errors during installation, avoid using `sudo`. Instead, use a node version manager like `nvm`, or configure npm to use a different global directory.
14
+ - **Old version running:** Run `chrome-devtools stop && npm uninstall -g chrome-devtools-mcp` before reinstalling, or ensure the latest version is being picked up by your path.