@yezack/chrome-devtools-mcp-108 0.0.0-stage → 1.10.2
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.
- package/FORK-NOTICE.md +45 -0
- package/LICENSE +202 -0
- package/README.md +45 -2
- package/build/src/BrowserManager.js +401 -0
- package/build/src/McpContext.js +642 -0
- package/build/src/McpPage.js +850 -0
- package/build/src/McpResponse.js +1086 -0
- package/build/src/SlimMcpResponse.js +19 -0
- package/build/src/TextSnapshot.js +315 -0
- package/build/src/ToolHandler.js +322 -0
- package/build/src/bin/check-latest-version.js +51 -0
- package/build/src/bin/chrome-devtools-mcp-main.js +77 -0
- package/build/src/bin/chrome-devtools-mcp.js +23 -0
- package/build/src/bin/chrome-devtools.js +222 -0
- package/build/src/collectors/PageCollector.js +291 -0
- package/build/src/collectors/ServiceWorkerCollector.js +171 -0
- package/build/src/config/browser-options.js +125 -0
- package/build/src/config/category-options.js +89 -0
- package/build/src/config/cli-commands.js +26 -0
- package/build/src/config/cli-options.js +1473 -0
- package/build/src/config/mcp-options.js +417 -0
- package/build/src/daemon/client.js +221 -0
- package/build/src/daemon/daemon.js +266 -0
- package/build/src/daemon/types.js +7 -0
- package/build/src/daemon/utils.js +136 -0
- package/build/src/devtools/DevToolsCommentBridge.js +91 -0
- package/build/src/devtools/DevtoolsUtils.js +307 -0
- package/build/src/devtools/McpHostBindingAdapter.js +165 -0
- package/build/src/devtools/issueDescriptions.js +42 -0
- package/build/src/formatters/CommentFormatter.js +82 -0
- package/build/src/formatters/ConsoleFormatter.js +321 -0
- package/build/src/formatters/CssFormatter.js +812 -0
- package/build/src/formatters/HeapSnapshotFormatter.js +185 -0
- package/build/src/formatters/IssueFormatter.js +193 -0
- package/build/src/formatters/NetworkFormatter.js +241 -0
- package/build/src/formatters/SnapshotFormatter.js +135 -0
- package/build/src/index.js +237 -0
- package/build/src/processors/ChunkedTraceParser.js +361 -0
- package/build/src/processors/HeapSnapshotManager.js +270 -0
- package/build/src/processors/PerformanceTrace.js +132 -0
- package/build/src/telemetry/ClearcutLogger.js +242 -0
- package/build/src/telemetry/WatchdogClient.js +61 -0
- package/build/src/telemetry/errors.js +18 -0
- package/build/src/telemetry/flagUtils.js +90 -0
- package/build/src/telemetry/metricsRegistry.js +85 -0
- package/build/src/telemetry/persistence.js +82 -0
- package/build/src/telemetry/transformation.js +233 -0
- package/build/src/telemetry/types.js +36 -0
- package/build/src/telemetry/watchdog/ClearcutSender.js +205 -0
- package/build/src/telemetry/watchdog/main.js +128 -0
- package/build/src/third_party/THIRD_PARTY_NOTICES +4077 -0
- package/build/src/third_party/bundled-packages.json +12 -0
- package/build/src/third_party/devtools-formatter-worker.js +15494 -0
- package/build/src/third_party/devtools-heap-snapshot-worker.js +10979 -0
- package/build/src/third_party/index.js +200978 -0
- package/build/src/third_party/issue-descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +4 -0
- package/build/src/third_party/issue-descriptions/CoepCorpNotSameOrigin.md +8 -0
- package/build/src/third_party/issue-descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +18 -0
- package/build/src/third_party/issue-descriptions/CoepCorpNotSameSite.md +7 -0
- package/build/src/third_party/issue-descriptions/CoepFrameResourceNeedsCoepHeader.md +10 -0
- package/build/src/third_party/issue-descriptions/CompatibilityModeQuirks.md +5 -0
- package/build/src/third_party/issue-descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
- package/build/src/third_party/issue-descriptions/LowTextContrast.md +5 -0
- package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorRead.md +8 -0
- package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorSet.md +8 -0
- package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnRead.md +8 -0
- package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnSet.md +8 -0
- package/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +9 -0
- package/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +9 -0
- package/build/src/third_party/issue-descriptions/bounceTrackingMitigations.md +3 -0
- package/build/src/third_party/issue-descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
- package/build/src/third_party/issue-descriptions/clientHintMetaTagModifiedHTML.md +4 -0
- package/build/src/third_party/issue-descriptions/connectionAllowlistEmbeddingRequirementNotSatisfied.md +26 -0
- package/build/src/third_party/issue-descriptions/connectionAllowlistIFrameAttributeLoosensEmbeddingRequirement.md +19 -0
- package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowConnectionAllowlistFrom.md +21 -0
- package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowlistItemType.md +12 -0
- package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidHeader.md +12 -0
- package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidUrlPattern.md +8 -0
- package/build/src/third_party/issue-descriptions/connectionAllowlistItemNotInnerList.md +12 -0
- package/build/src/third_party/issue-descriptions/connectionAllowlistMoreThanOneList.md +7 -0
- package/build/src/third_party/issue-descriptions/connectionAllowlistReportingEndpointNotToken.md +10 -0
- package/build/src/third_party/issue-descriptions/cookieCrossSiteRedirectDowngrade.md +12 -0
- package/build/src/third_party/issue-descriptions/cookieExcludeDomainNonAscii.md +11 -0
- package/build/src/third_party/issue-descriptions/cookieExcludePortMismatch.md +8 -0
- package/build/src/third_party/issue-descriptions/cookieExcludeSchemeMismatch.md +7 -0
- package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutRead.md +6 -0
- package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutSet.md +6 -0
- package/build/src/third_party/issue-descriptions/cookieWarnDomainNonAscii.md +11 -0
- package/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantRead.md +4 -0
- package/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantSet.md +4 -0
- package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutRead.md +6 -0
- package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutSet.md +6 -0
- package/build/src/third_party/issue-descriptions/corsAllowCredentialsRequired.md +6 -0
- package/build/src/third_party/issue-descriptions/corsDisabledScheme.md +7 -0
- package/build/src/third_party/issue-descriptions/corsDisallowedByMode.md +7 -0
- package/build/src/third_party/issue-descriptions/corsHeaderDisallowedByPreflightResponse.md +5 -0
- package/build/src/third_party/issue-descriptions/corsInvalidHeaderValues.md +7 -0
- package/build/src/third_party/issue-descriptions/corsLocalNetworkAccessPermissionDenied.md +19 -0
- package/build/src/third_party/issue-descriptions/corsMethodDisallowedByPreflightResponse.md +5 -0
- package/build/src/third_party/issue-descriptions/corsNoCorsRedirectModeNotFollow.md +5 -0
- package/build/src/third_party/issue-descriptions/corsOriginMismatch.md +6 -0
- package/build/src/third_party/issue-descriptions/corsPreflightResponseInvalid.md +5 -0
- package/build/src/third_party/issue-descriptions/corsRedirectContainsCredentials.md +5 -0
- package/build/src/third_party/issue-descriptions/corsWildcardOriginNotAllowed.md +9 -0
- package/build/src/third_party/issue-descriptions/cspEvalViolation.md +9 -0
- package/build/src/third_party/issue-descriptions/cspInlineViolation.md +10 -0
- package/build/src/third_party/issue-descriptions/cspTrustedTypesPolicyViolation.md +5 -0
- package/build/src/third_party/issue-descriptions/cspTrustedTypesSinkViolation.md +8 -0
- package/build/src/third_party/issue-descriptions/cspURLViolation.md +10 -0
- package/build/src/third_party/issue-descriptions/deprecation.md +3 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsEmptyList.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsHttpNotFound.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsInvalidContentType.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsInvalidResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestAccountsNoResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestDnsFetchFailed.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestDnsInvalidRecord.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownHttpNotFound.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidContentType.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownNoResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestInvalidEmail.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestJwksHttpNotFound.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestJwksInvalidResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestKeyBindingSigningFailed.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestRpOriginIsOpaque.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenHttpNotFound.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidContentType.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidSdJwt.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenMalformedSdJwt.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenNoResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidAudience.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidIssuedAt.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidNonce.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidSdHash.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidTyp.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingAud.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingCnf.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingIat.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingNonce.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingSdHash.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbSignatureFailed.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmail.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmailVerified.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidHolderKey.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuedAt.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuer.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtJwksMissingKeys.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingCnf.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingEmail.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIat.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIss.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtSignatureFailed.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtUnsupportedHeaderAlg.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestUserLoggedOut.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownAccountsEndpointCrossOrigin.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownHttpNotFound.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownInvalidContentType.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownInvalidResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownIssuanceEndpointCrossOrigin.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownListEmpty.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownMissingAccountsEndpoint.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownMissingIssuanceEndpoint.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownNoResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/emailVerificationRequestWellKnownUnsupportedSigningAlgorithm.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsBlockedByConnectionAllowlist.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsNoResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestApprovalDeclined.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestCanceled.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestConfigBlockedByConnectionAllowlist.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorIdToken.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenBlockedByConnectionAllowlist.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestTooManyRequests.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthRequestWellKnownBlockedByConnectionAllowlist.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -0
- package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -0
- package/build/src/third_party/issue-descriptions/fetchingPartitionedBlobURL.md +7 -0
- package/build/src/third_party/issue-descriptions/genericBackUINavigationWouldSkipAd.md +4 -0
- package/build/src/third_party/issue-descriptions/genericFormAriaLabelledByToNonExistingIdError.md +8 -0
- package/build/src/third_party/issue-descriptions/genericFormAutocompleteAttributeEmptyError.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormDuplicateIdForInputError.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormInputWithNoLabelError.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormLabelForMatchesNonExistingIdError.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormLabelForNameError.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormModelContextMissingToolDescription.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormModelContextMissingToolName.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormModelContextParameterMissingName.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormModelContextParameterMissingTitleAndDescription.md +5 -0
- package/build/src/third_party/issue-descriptions/genericFormModelContextRequiredParameterMissingName.md +5 -0
- package/build/src/third_party/issue-descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
- package/build/src/third_party/issue-descriptions/genericResponseWasBlockedByORB.md +4 -0
- package/build/src/third_party/issue-descriptions/heavyAd.md +10 -0
- package/build/src/third_party/issue-descriptions/lazyLoadImageZeroSize.md +7 -0
- package/build/src/third_party/issue-descriptions/mixedContent.md +5 -0
- package/build/src/third_party/issue-descriptions/navigatingPartitionedBlobURL.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementActivationDisabled.md +7 -0
- package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluder.md +9 -0
- package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluderParent.md +9 -0
- package/build/src/third_party/issue-descriptions/permissionElementCspFrameAncestorsMissing.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementFencedFrameDisallowed.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooLarge.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooSmall.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementGeolocationDeprecated.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementInsetBoxShadowUnsupported.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementInvalidDisplayStyle.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementInvalidSizeValue.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementInvalidType.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementInvalidTypeActivation.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementLowContrast.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementNonOpaqueColor.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementPaddingBottomUnsupported.md +6 -0
- package/build/src/third_party/issue-descriptions/permissionElementPaddingRightUnsupported.md +6 -0
- package/build/src/third_party/issue-descriptions/permissionElementPermissionsPolicyBlocked.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementRegistrationFailed.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementRequestInProgress.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementSecurityChecksFailed.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementTypeNotSupported.md +5 -0
- package/build/src/third_party/issue-descriptions/permissionElementUntrustedEvent.md +7 -0
- package/build/src/third_party/issue-descriptions/placeholderDescriptionForInvisibleIssues.md +3 -0
- package/build/src/third_party/issue-descriptions/propertyRuleInvalidNameIssue.md +3 -0
- package/build/src/third_party/issue-descriptions/propertyRuleIssue.md +7 -0
- package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +7 -0
- package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedSelectChild.md +7 -0
- package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +3 -0
- package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +3 -0
- package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +3 -0
- package/build/src/third_party/issue-descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +3 -0
- package/build/src/third_party/issue-descriptions/selectivePermissionsIntervention.md +7 -0
- package/build/src/third_party/issue-descriptions/sharedArrayBuffer.md +7 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +3 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +3 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorExpiredResponse.md +3 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +3 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInsufficientResources.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNavigationRequest.md +3 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNoMatchField.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonSecureContext.md +3 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringIdField.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorRequestAborted.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorShuttingDown.md +1 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorTooLongIdField.md +3 -0
- package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorUnsupportedType.md +3 -0
- package/build/src/third_party/issue-descriptions/sriInvalidSignatureHeader.md +14 -0
- package/build/src/third_party/issue-descriptions/sriInvalidSignatureInputHeader.md +15 -0
- package/build/src/third_party/issue-descriptions/sriMissingSignatureHeader.md +8 -0
- package/build/src/third_party/issue-descriptions/sriMissingSignatureInputHeader.md +7 -0
- package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsIncorrectLength.md +11 -0
- package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsNotByteSequence.md +14 -0
- package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsParameterized.md +15 -0
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentName.md +8 -0
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentType.md +13 -0
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +4 -0
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +5 -0
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidParameter.md +11 -0
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderKeyIdLength.md +12 -0
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingLabel.md +6 -0
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +8 -0
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueMissingComponents.md +11 -0
- package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueNotInnerList.md +11 -0
- package/build/src/third_party/issue-descriptions/sriValidationFailedIntegrityMismatch.md +10 -0
- package/build/src/third_party/issue-descriptions/sriValidationFailedInvalidLength.md +5 -0
- package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureExpired.md +6 -0
- package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureMismatch.md +11 -0
- package/build/src/third_party/issue-descriptions/stylesheetLateImport.md +4 -0
- package/build/src/third_party/issue-descriptions/stylesheetRequestFailed.md +3 -0
- package/build/src/third_party/issue-descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +3 -0
- package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestLength.md +12 -0
- package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestType.md +17 -0
- package/build/src/third_party/issue-descriptions/unencodedDigestMalformedDictionary.md +14 -0
- package/build/src/third_party/issue-descriptions/unencodedDigestUnknownAlgorithm.md +15 -0
- package/build/src/third_party/issue-descriptions/webInstallManifestMissingId.md +3 -0
- package/build/src/third_party/issue-descriptions/webInstallManifestMissingNameOrShortName.md +3 -0
- package/build/src/third_party/issue-descriptions/webInstallManifestParsingOrNetworkError.md +3 -0
- package/build/src/third_party/issue-descriptions/webInstallNoManifest.md +3 -0
- package/build/src/third_party/issue-descriptions/webInstallStartUrlInvalid.md +3 -0
- package/build/src/third_party/lighthouse-devtools-mcp-bundle.js +58435 -0
- package/build/src/tools/ToolDefinition.js +80 -0
- package/build/src/tools/categories.js +33 -0
- package/build/src/tools/comments.js +169 -0
- package/build/src/tools/console.js +104 -0
- package/build/src/tools/css.js +45 -0
- package/build/src/tools/emulation.js +84 -0
- package/build/src/tools/extensions.js +103 -0
- package/build/src/tools/input.js +652 -0
- package/build/src/tools/lighthouse.js +149 -0
- package/build/src/tools/memory.js +424 -0
- package/build/src/tools/network.js +128 -0
- package/build/src/tools/pages.js +363 -0
- package/build/src/tools/performance.js +212 -0
- package/build/src/tools/pwa.js +128 -0
- package/build/src/tools/screencast.js +119 -0
- package/build/src/tools/screenshot.js +277 -0
- package/build/src/tools/script.js +232 -0
- package/build/src/tools/slim/tools.js +96 -0
- package/build/src/tools/snapshot.js +63 -0
- package/build/src/tools/thirdPartyDeveloper.js +85 -0
- package/build/src/tools/tools.js +55 -0
- package/build/src/tools/webmcp.js +66 -0
- package/build/src/types.js +10 -0
- package/build/src/utils/WaitForHelper.js +316 -0
- package/build/src/utils/bytes.js +105 -0
- package/build/src/utils/check-for-updates.js +75 -0
- package/build/src/utils/files.js +57 -0
- package/build/src/utils/id.js +16 -0
- package/build/src/utils/keyboard.js +297 -0
- package/build/src/utils/logger.js +52 -0
- package/build/src/utils/pagination.js +50 -0
- package/build/src/utils/polyfill.js +11 -0
- package/build/src/utils/url.js +116 -0
- package/build/src/version.js +10 -0
- package/package.json +41 -4
- package/skills/a11y-debugging/SKILL.md +91 -0
- package/skills/a11y-debugging/references/a11y-snippets.md +92 -0
- package/skills/chrome-devtools/SKILL.md +74 -0
- package/skills/chrome-devtools-cli/SKILL.md +194 -0
- package/skills/chrome-devtools-cli/references/installation.md +14 -0
- package/skills/cookie-debugging/SKILL.md +149 -0
- package/skills/debug-optimize-lcp/SKILL.md +121 -0
- package/skills/debug-optimize-lcp/references/elements-and-size.md +27 -0
- package/skills/debug-optimize-lcp/references/lcp-breakdown.md +23 -0
- package/skills/debug-optimize-lcp/references/lcp-snippets.md +79 -0
- package/skills/debug-optimize-lcp/references/optimization-strategies.md +38 -0
- package/skills/memory-leak-debugging/SKILL.md +58 -0
- package/skills/memory-leak-debugging/references/common-leaks.md +33 -0
- package/skills/troubleshooting/SKILL.md +99 -0
package/package.json
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yezack/chrome-devtools-mcp-108",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.10.2",
|
|
4
|
+
"description": "Unofficial fork of chrome-devtools-mcp with Chrome/Chromium 108-110 (legacy TargetFilter) support",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"chrome-devtools-mcp-108": "./build/src/bin/chrome-devtools-mcp.js",
|
|
8
|
+
"chrome-devtools-108": "./build/src/bin/chrome-devtools.js"
|
|
9
|
+
},
|
|
10
|
+
"main": "./build/src/index.js",
|
|
11
|
+
"files": [
|
|
12
|
+
"build/src",
|
|
13
|
+
"LICENSE",
|
|
14
|
+
"FORK-NOTICE.md",
|
|
15
|
+
"skills"
|
|
16
|
+
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": "^20.19.0 || ^22.12.0 || >=23"
|
|
19
|
+
},
|
|
20
|
+
"repository": "ChromeDevTools/chrome-devtools-mcp",
|
|
21
|
+
"author": "Google LLC (original); Chrome 108 compatibility fork published by yezack",
|
|
22
|
+
"license": "Apache-2.0",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/ChromeDevTools/chrome-devtools-mcp/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/ChromeDevTools/chrome-devtools-mcp#readme",
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@blackwell-systems/gcf": "^2.2.2",
|
|
29
|
+
"@toon-format/toon": "^4.1.0"
|
|
30
|
+
},
|
|
31
|
+
"peerDependenciesMeta": {
|
|
32
|
+
"@toon-format/toon": {
|
|
33
|
+
"optional": true
|
|
34
|
+
},
|
|
35
|
+
"@blackwell-systems/gcf": {
|
|
36
|
+
"optional": true
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public",
|
|
41
|
+
"registry": "https://registry.npmjs.org/"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
**Page Targeting**: Page-scoped tools (`take_snapshot`, `list_console_messages`, `evaluate_script`, `press_key`, `take_screenshot`, `lighthouse_audit`, etc.) require a `pageId` parameter. Retrieve available page IDs using `list_pages` or from `new_page`.
|
|
9
|
+
|
|
10
|
+
**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.
|
|
11
|
+
|
|
12
|
+
**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!
|
|
13
|
+
|
|
14
|
+
## Workflow Patterns
|
|
15
|
+
|
|
16
|
+
### 1. Automated Audit (Lighthouse)
|
|
17
|
+
|
|
18
|
+
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.
|
|
19
|
+
|
|
20
|
+
1. Run the audit:
|
|
21
|
+
- Set `mode` to `"navigation"` to refresh the page and capture load issues.
|
|
22
|
+
- Set `outputDirPath` (e.g., `/tmp/lh-report`) to save the full JSON report.
|
|
23
|
+
2. **Analyze the Summary**:
|
|
24
|
+
- Check `scores` (0-1 scale). A score < 1 indicates violations.
|
|
25
|
+
- Review `audits.failed` count.
|
|
26
|
+
3. **Review the Report (CRITICAL)**:
|
|
27
|
+
- **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:
|
|
28
|
+
```bash
|
|
29
|
+
# Extract failing audits with their details
|
|
30
|
+
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})))"
|
|
31
|
+
```
|
|
32
|
+
- This efficiently extracts the `selector` and `snippet` of failing elements without loading the full report into context.
|
|
33
|
+
|
|
34
|
+
### 2. Browser Issues & Audits
|
|
35
|
+
|
|
36
|
+
Chrome automatically checks for common accessibility problems. Use `list_console_messages` to check for these native audits:
|
|
37
|
+
|
|
38
|
+
- `types`: `["issue"]`
|
|
39
|
+
- `includePreservedMessages`: `true` (to catch issues that occurred during page load)
|
|
40
|
+
|
|
41
|
+
This often reveals missing labels, invalid ARIA attributes, and other critical errors without manual investigation.
|
|
42
|
+
|
|
43
|
+
### 3. Semantics & Structure
|
|
44
|
+
|
|
45
|
+
The accessibility tree exposes the heading hierarchy and semantic landmarks.
|
|
46
|
+
|
|
47
|
+
1. Navigate to the page.
|
|
48
|
+
2. Use `take_snapshot` to capture the accessibility tree.
|
|
49
|
+
3. **Check Heading Levels**: Ensure heading levels (`h1`, `h2`, `h3`, etc.) are logical and do not skip levels. The snapshot will include heading roles.
|
|
50
|
+
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.
|
|
51
|
+
|
|
52
|
+
### 4. Labels, Forms & Text Alternatives
|
|
53
|
+
|
|
54
|
+
1. Locate buttons, inputs, and images in the `take_snapshot` output.
|
|
55
|
+
2. Ensure interactive elements have an accessible name (e.g., a button should not just say `""` if it only contains an icon).
|
|
56
|
+
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).
|
|
57
|
+
4. Check images for `alt` text.
|
|
58
|
+
|
|
59
|
+
### 5. Focus & Keyboard Navigation
|
|
60
|
+
|
|
61
|
+
Testing "keyboard traps" and proper focus management without visual feedback relies on tracking the focused element.
|
|
62
|
+
|
|
63
|
+
1. Use the `press_key` tool with `"Tab"` or `"Shift+Tab"` to move focus.
|
|
64
|
+
2. Use `take_snapshot` to capture the updated accessibility tree.
|
|
65
|
+
3. Locate the element marked as focused in the snapshot to verify focus moved to the expected interactive element.
|
|
66
|
+
4. If a modal opens, focus must move into the modal and "trap" within it until closed.
|
|
67
|
+
|
|
68
|
+
### 6. Tap Targets and Visuals
|
|
69
|
+
|
|
70
|
+
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).
|
|
71
|
+
|
|
72
|
+
_Pass the element's `uid` from the snapshot as an argument to `evaluate_script`._
|
|
73
|
+
|
|
74
|
+
### 7. Color Contrast
|
|
75
|
+
|
|
76
|
+
To verify color contrast ratios, start by checking for native accessibility issues:
|
|
77
|
+
|
|
78
|
+
1. Call `list_console_messages` with `types: ["issue"]`.
|
|
79
|
+
2. Look for "Low Contrast" issues in the output.
|
|
80
|
+
|
|
81
|
+
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).
|
|
82
|
+
|
|
83
|
+
### 8. Global Page Checks
|
|
84
|
+
|
|
85
|
+
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).
|
|
86
|
+
|
|
87
|
+
## Troubleshooting
|
|
88
|
+
|
|
89
|
+
If standard a11y queries fail or the `evaluate_script` snippets return unexpected results:
|
|
90
|
+
|
|
91
|
+
- **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,74 @@
|
|
|
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 targeting**: Page-scoped tools require a `pageId` parameter to target a specific page. Use `list_pages` to see available pages and their IDs (e.g. `pageId: 1`), or use the ID returned when creating a page with `new_page`.
|
|
15
|
+
Note: For `evaluate_script`, `pageId` is required when targeting pages. However, when `--categoryExtensions` is enabled, `pageId` is optional so you can pass `serviceWorkerId` instead to evaluate inside an extension background service worker.
|
|
16
|
+
**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.
|
|
17
|
+
|
|
18
|
+
## Workflow Patterns
|
|
19
|
+
|
|
20
|
+
### Before interacting with a page
|
|
21
|
+
|
|
22
|
+
1. Navigate: `navigate_page` or `new_page`
|
|
23
|
+
2. Wait: `wait_for` to ensure content is loaded if you know what you look for.
|
|
24
|
+
3. Snapshot: `take_snapshot` with `pageId` to understand page structure
|
|
25
|
+
4. Interact: Use element `uid`s from snapshot for `click`, `fill`, etc., passing the corresponding `pageId`.
|
|
26
|
+
|
|
27
|
+
### Efficient data retrieval
|
|
28
|
+
|
|
29
|
+
- Use `filePath` parameter for large outputs (screenshots, snapshots, traces)
|
|
30
|
+
- Use pagination (`pageIdx`, `pageSize`) and filtering (`types`) to minimize data
|
|
31
|
+
- Set `includeSnapshot: false` on input actions unless you need updated page state
|
|
32
|
+
|
|
33
|
+
### Tool selection
|
|
34
|
+
|
|
35
|
+
- **Automation/interaction**: `take_snapshot` (text-based, faster, better for automation)
|
|
36
|
+
- **Visual inspection**: `take_screenshot` (when user needs to see visual state)
|
|
37
|
+
- **CSS & Styling inspection**: Use `get_css_styles` to inspect matched rules, cascade, and CSS variables.
|
|
38
|
+
- **Additional details**: Use `evaluate_script` for final resolved values (`getComputedStyle`) or runtime DOM/JS data not in the accessibility tree.
|
|
39
|
+
|
|
40
|
+
### Parallel execution
|
|
41
|
+
|
|
42
|
+
You can send multiple tool calls in parallel, but maintain correct order: navigate → wait → snapshot → interact.
|
|
43
|
+
|
|
44
|
+
### Testing an extension
|
|
45
|
+
|
|
46
|
+
> **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:
|
|
47
|
+
>
|
|
48
|
+
> ```json
|
|
49
|
+
> {
|
|
50
|
+
> "mcpServers": {
|
|
51
|
+
> "chrome-devtools": {
|
|
52
|
+
> "command": "npx",
|
|
53
|
+
> "args": ["chrome-devtools-mcp@latest", "--categoryExtensions"]
|
|
54
|
+
> }
|
|
55
|
+
> }
|
|
56
|
+
> }
|
|
57
|
+
> ```
|
|
58
|
+
>
|
|
59
|
+
> After updating, the user must restart the MCP server (or their AI client) for the change to take effect.
|
|
60
|
+
|
|
61
|
+
1. **Install**: Use `install_extension` with the path to the unpacked extension.
|
|
62
|
+
2. **Identify**: Get the extension ID from the response or by calling `list_extensions`.
|
|
63
|
+
3. **Trigger Action**: Use `trigger_extension_action` to open the popup or side panel if applicable.
|
|
64
|
+
4. **Verify Service Worker**: Use `evaluate_script` with `serviceWorkerId` (omitting `pageId` and `args`) to check extension state or trigger background actions. When evaluating in a page, pass `pageId` (omitting `serviceWorkerId`).
|
|
65
|
+
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.
|
|
66
|
+
|
|
67
|
+
## Troubleshooting
|
|
68
|
+
|
|
69
|
+
If `chrome-devtools-mcp` is insufficient, guide users to use Chrome DevTools UI:
|
|
70
|
+
|
|
71
|
+
- https://developer.chrome.com/docs/devtools
|
|
72
|
+
- https://developer.chrome.com/docs/devtools/ai-assistance
|
|
73
|
+
|
|
74
|
+
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,194 @@
|
|
|
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. If you don't know the target page's ID, run `chrome-devtools list_pages` to find it. The background server starts implicitly; **do not** run `start`/`status`/`stop` before each use.
|
|
15
|
+
2. **Inspect**: Use `chrome-devtools take_snapshot <pageId>` to get an element `<uid>`.
|
|
16
|
+
3. **Act**: Use `chrome-devtools click <pageId> <uid>`, `chrome-devtools fill <pageId> <uid> <value>`, 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
|
+
## Permissions & File Access
|
|
26
|
+
|
|
27
|
+
By default, the CLI has full filesystem access (`--allowUnrestrictedPaths=true`), allowing file-saving parameters (`--filePath`, `--outputDirPath`) and `upload_file` to access files anywhere on the system. Pass `--allowUnrestrictedPaths=false` if you want to restrict file access to the OS temp directory.
|
|
28
|
+
|
|
29
|
+
## Command Usage
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
chrome-devtools <tool> [arguments] [flags]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- Required arguments are passed positionally; optional arguments use flags.
|
|
36
|
+
- Use `--help` on any command for usage details.
|
|
37
|
+
- Output defaults to plain Markdown-like text; pass `--output-format=json` for JSON.
|
|
38
|
+
|
|
39
|
+
## Input Automation (<uid> from snapshot)
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
chrome-devtools take_snapshot 1 # Take a text snapshot of the page to get UIDs for elements
|
|
43
|
+
chrome-devtools click 1 "id" # Clicks on the provided element
|
|
44
|
+
chrome-devtools click 1 "id" --dblClick true --includeSnapshot true # Double clicks and returns a snapshot
|
|
45
|
+
chrome-devtools drag 1 "src" "dst" # Drag an element onto another element
|
|
46
|
+
chrome-devtools drag 1 "src" "dst" --includeSnapshot true # Drag an element and return a snapshot
|
|
47
|
+
chrome-devtools fill 1 "id" "text" # Type text into an input, textarea, or select an option
|
|
48
|
+
chrome-devtools fill 1 "id" "text" --includeSnapshot true # Fill an element and return a snapshot
|
|
49
|
+
chrome-devtools handle_dialog 1 accept # Handle a browser dialog (accept/dismiss)
|
|
50
|
+
chrome-devtools handle_dialog 1 dismiss --promptText "hi" # Dismiss a dialog with prompt text
|
|
51
|
+
chrome-devtools hover 1 "id" # Hover over the provided element
|
|
52
|
+
chrome-devtools hover 1 "id" --includeSnapshot true # Hover over an element and return a snapshot
|
|
53
|
+
chrome-devtools press_key 1 "Enter" # Press a key or key combination ("Control+A", "Escape")
|
|
54
|
+
chrome-devtools press_key 1 "Control+A" --includeSnapshot true # Press a key and return a snapshot
|
|
55
|
+
chrome-devtools type_text 1 "hello" # Type text using keyboard into a focused input
|
|
56
|
+
chrome-devtools type_text 1 "hello" --submitKey "Enter" # Type text and press a submit key
|
|
57
|
+
chrome-devtools upload_file 1 "id" "file.txt" # Upload a file through a provided element
|
|
58
|
+
chrome-devtools upload_file 1 "id" "file.txt" --includeSnapshot true # Upload a file and return a snapshot
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Navigation
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
chrome-devtools close_page 1 # Closes the page by its index
|
|
65
|
+
chrome-devtools list_pages # Get a list of pages open in the browser
|
|
66
|
+
chrome-devtools navigate_page 1 --url "https://example.com" # Navigates the currently selected page to a URL
|
|
67
|
+
chrome-devtools navigate_page 1 --type "reload" --ignoreCache true # Reload page ignoring cache
|
|
68
|
+
chrome-devtools navigate_page 1 --url "https://example.com" --timeout 5000 # Navigate with a timeout
|
|
69
|
+
chrome-devtools navigate_page 1 --handleBeforeUnload "accept" # Handle before unload dialog
|
|
70
|
+
chrome-devtools navigate_page 1 --type "back" --initScript "foo()" # Navigate back and run an init script
|
|
71
|
+
chrome-devtools new_page "https://example.com" # Creates a new page
|
|
72
|
+
chrome-devtools new_page "https://example.com" --background true --timeout 5000 # Create new page in background
|
|
73
|
+
chrome-devtools new_page "https://example.com" --isolatedContext "ctx" # Create new page with isolated context
|
|
74
|
+
chrome-devtools select_page 1 # Select a page as a context for future tool calls
|
|
75
|
+
chrome-devtools select_page 1 --bringToFront true # Select a page and bring it to front
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Emulation
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
chrome-devtools emulate 1 --networkConditions "Offline" # Emulate network conditions
|
|
82
|
+
chrome-devtools emulate 1 --cpuThrottlingRate 4 --geolocation "0x0" # Emulate CPU throttling and geolocation
|
|
83
|
+
chrome-devtools emulate 1 --colorScheme "dark" --viewport "1920x1080" # Emulate color scheme and viewport
|
|
84
|
+
chrome-devtools emulate 1 --userAgent "Mozilla/5.0..." # Emulate user agent
|
|
85
|
+
chrome-devtools resize_page 1 1920 1080 # Resizes the selected page's window
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Performance
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
chrome-devtools performance_analyze_insight 1 "1" "LCPBreakdown" # Get more details on a specific Performance Insight (pageId, insightSetId, insightName)
|
|
92
|
+
chrome-devtools performance_start_trace 1 --reload true --autoStop false # Starts a performance trace recording (reload, autoStop)
|
|
93
|
+
chrome-devtools performance_start_trace 1 --reload true --autoStop true --filePath "t.json.gz" # Start trace and save to a file
|
|
94
|
+
chrome-devtools performance_stop_trace 1 # Stops the active performance trace
|
|
95
|
+
chrome-devtools performance_stop_trace 1 --filePath "t.json.gz" # Stop trace and save to a file
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Memory
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
chrome-devtools take_heapsnapshot 1 "./snap.heapsnapshot" # Capture a memory heap snapshot
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Memory Debugging (requires `--memoryDebugging=true`)
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
chrome-devtools get_heapsnapshot_summary "./snap.heapsnapshot" # Get snapshot summary stats
|
|
108
|
+
chrome-devtools compare_heapsnapshots "./base.heapsnapshot" "./target.heapsnapshot" # Compare two snapshots
|
|
109
|
+
chrome-devtools get_heapsnapshot_class_nodes "./snap.heapsnapshot" "Array" # Inspect class instances
|
|
110
|
+
chrome-devtools get_heapsnapshot_details "./snap.heapsnapshot" 123 # Detailed object properties
|
|
111
|
+
chrome-devtools get_heapsnapshot_dominators "./snap.heapsnapshot" 123 # Dominator tree for node
|
|
112
|
+
chrome-devtools get_heapsnapshot_duplicate_strings "./snap.heapsnapshot" # Find duplicated strings
|
|
113
|
+
chrome-devtools get_heapsnapshot_edges "./snap.heapsnapshot" 123 # Node edges/references
|
|
114
|
+
chrome-devtools get_heapsnapshot_object_details "./snap.heapsnapshot" 123 # Object details by node ID
|
|
115
|
+
chrome-devtools get_heapsnapshot_retainers "./snap.heapsnapshot" 123 # Retaining objects
|
|
116
|
+
chrome-devtools get_heapsnapshot_retaining_paths "./snap.heapsnapshot" 123 # Shortest retaining paths
|
|
117
|
+
chrome-devtools close_heapsnapshot "./snap.heapsnapshot" # Free memory from loaded snapshot
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Network
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
chrome-devtools get_network_request 1 # Get the currently selected network request for page 1
|
|
124
|
+
chrome-devtools get_network_request 1 --reqid 1 --requestFilePath "req.md" # Get request by id and save to file
|
|
125
|
+
chrome-devtools get_network_request 1 --responseFilePath "res.md" # Save response body to file
|
|
126
|
+
chrome-devtools list_network_requests 1 # List all network requests for page 1
|
|
127
|
+
chrome-devtools list_network_requests 1 --pageSize 50 --pageIdx 0 # List network requests with pagination
|
|
128
|
+
chrome-devtools list_network_requests 1 --resourceTypes Fetch # Filter requests by resource type
|
|
129
|
+
chrome-devtools list_network_requests 1 --includePreservedRequests true # Include preserved requests
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Debugging & Inspection
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
chrome-devtools evaluate_script "() => document.title" --pageId 1 # Evaluate a JavaScript function on page 1
|
|
136
|
+
chrome-devtools evaluate_script "(a) => a.innerText" --pageId 1 --args 1_4 # Evaluate JS with UID arguments on page 1
|
|
137
|
+
chrome-devtools get_console_message 1 1 # Gets a console message by its ID
|
|
138
|
+
chrome-devtools get_css_styles 1 "1_4" # Retrieves resolved CSS styles (inline, matched, inherited, pseudo) for an element on page 1
|
|
139
|
+
chrome-devtools get_css_styles 1 "1_4" --pageSize 20 --pageIdx 0 # Get CSS styles with pagination on page 1
|
|
140
|
+
chrome-devtools lighthouse_audit 1 --mode "navigation" # Run Lighthouse audit for navigation
|
|
141
|
+
chrome-devtools lighthouse_audit 1 --mode "snapshot" --device "mobile" # Run Lighthouse audit for a snapshot on mobile
|
|
142
|
+
chrome-devtools lighthouse_audit 1 --outputDirPath ./out # Run Lighthouse audit and save reports
|
|
143
|
+
chrome-devtools list_console_messages 1 # List all console messages
|
|
144
|
+
chrome-devtools list_console_messages 1 --pageSize 20 --pageIdx 1 # List console messages with pagination
|
|
145
|
+
chrome-devtools list_console_messages 1 --types error --types info # Filter console messages by type
|
|
146
|
+
chrome-devtools list_console_messages 1 --includePreservedMessages true # Include preserved messages
|
|
147
|
+
chrome-devtools take_screenshot 1 # Take a screenshot of the page viewport
|
|
148
|
+
chrome-devtools take_screenshot 1 --fullPage true --format "jpeg" --quality 80 # Take a full page screenshot as JPEG with quality
|
|
149
|
+
chrome-devtools take_screenshot 1 --uid "id" --filePath "s.png" # Take a screenshot of an element
|
|
150
|
+
chrome-devtools take_snapshot 1 # Take a text snapshot of the page from the a11y tree
|
|
151
|
+
chrome-devtools take_snapshot 1 --verbose true --filePath "s.txt" # Take a verbose snapshot and save to file
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Extensions
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
chrome-devtools list_extensions # Lists all the Chrome extensions installed in the browser
|
|
158
|
+
chrome-devtools install_extension "/path/to/extension" # Installs a Chrome extension from the given path
|
|
159
|
+
chrome-devtools uninstall_extension "extension_id" # Uninstalls a Chrome extension by its ID
|
|
160
|
+
chrome-devtools reload_extension "extension_id" # Reloads an unpacked Chrome extension by its ID
|
|
161
|
+
chrome-devtools trigger_extension_action "extension_id" # Triggers the default action of an extension by its ID
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Progressive Web Apps (requires `--categoryPwa=true`)
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
chrome-devtools install_pwa "https://example.com/" # Install PWA by manifest ID or URL
|
|
168
|
+
chrome-devtools launch_pwa "https://example.com/" # Launch installed PWA
|
|
169
|
+
chrome-devtools get_os_app_state "https://example.com/" # Get OS app installation state
|
|
170
|
+
chrome-devtools uninstall_pwa "https://example.com/" # Uninstall PWA and close windows
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Experimental Features
|
|
174
|
+
|
|
175
|
+
Experimental tools are disabled by default. Enable them with the corresponding flag during `start`.
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
chrome-devtools click_at 1 100 200 # Clicks at the provided coordinates on page 1 (requires --experimentalVision=true)
|
|
179
|
+
chrome-devtools screencast_start 1 --filePath "screen.mp4" # Starts a screencast recording on page 1 (requires --experimentalScreencast=true and ffmpeg)
|
|
180
|
+
chrome-devtools screencast_stop 1 # Stops the active screencast on page 1
|
|
181
|
+
chrome-devtools list_webmcp_tools 1 # List all WebMCP tools on page 1 (requires --categoryExperimentalWebmcp=true)
|
|
182
|
+
chrome-devtools execute_webmcp_tool 1 "tool_name" --input '{"arg":"val"}' # Execute a WebMCP tool on page 1 (requires --categoryExperimentalWebmcp=true)
|
|
183
|
+
chrome-devtools list_3p_developer_tools 1 # List third-party developer tools on page 1 (requires --categoryExperimentalThirdParty=true)
|
|
184
|
+
chrome-devtools execute_3p_developer_tool 1 "tool_name" --params '{"arg":"val"}' # Execute third-party developer tool on page 1 (requires --categoryExperimentalThirdParty=true)
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Service Management
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
chrome-devtools start # Start or restart chrome-devtools-mcp
|
|
191
|
+
chrome-devtools start --headless=false # Start with visible browser window
|
|
192
|
+
chrome-devtools status # Checks if chrome-devtools-mcp is running
|
|
193
|
+
chrome-devtools stop # Stop chrome-devtools-mcp if any
|
|
194
|
+
```
|
|
@@ -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.
|