brave-mcp 0.1.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 (280) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +802 -0
  3. package/build/src/DevToolsConnectionAdapter.js +69 -0
  4. package/build/src/DevtoolsUtils.js +294 -0
  5. package/build/src/McpContext.js +676 -0
  6. package/build/src/McpPage.js +108 -0
  7. package/build/src/McpResponse.js +718 -0
  8. package/build/src/Mutex.js +37 -0
  9. package/build/src/PageCollector.js +310 -0
  10. package/build/src/SlimMcpResponse.js +18 -0
  11. package/build/src/WaitForHelper.js +153 -0
  12. package/build/src/bin/brave-devtools-cli-options.js +651 -0
  13. package/build/src/bin/brave-devtools-mcp-cli-options.js +312 -0
  14. package/build/src/bin/brave-devtools-mcp-main.js +35 -0
  15. package/build/src/bin/brave-devtools-mcp.js +22 -0
  16. package/build/src/bin/brave-devtools.js +190 -0
  17. package/build/src/bin/check-latest-version.js +25 -0
  18. package/build/src/bin/cliDefinitions.js +615 -0
  19. package/build/src/browser.js +295 -0
  20. package/build/src/daemon/client.js +152 -0
  21. package/build/src/daemon/daemon.js +202 -0
  22. package/build/src/daemon/types.js +6 -0
  23. package/build/src/daemon/utils.js +109 -0
  24. package/build/src/formatters/ConsoleFormatter.js +241 -0
  25. package/build/src/formatters/IssueFormatter.js +192 -0
  26. package/build/src/formatters/NetworkFormatter.js +218 -0
  27. package/build/src/formatters/SnapshotFormatter.js +134 -0
  28. package/build/src/index.js +216 -0
  29. package/build/src/issue-descriptions.js +39 -0
  30. package/build/src/logger.js +36 -0
  31. package/build/src/polyfill.js +7 -0
  32. package/build/src/telemetry/ClearcutLogger.js +234 -0
  33. package/build/src/telemetry/WatchdogClient.js +60 -0
  34. package/build/src/telemetry/flagUtils.js +45 -0
  35. package/build/src/telemetry/metricUtils.js +14 -0
  36. package/build/src/telemetry/persistence.js +53 -0
  37. package/build/src/telemetry/toolMetricsUtils.js +88 -0
  38. package/build/src/telemetry/types.js +38 -0
  39. package/build/src/telemetry/watchdog/ClearcutSender.js +203 -0
  40. package/build/src/telemetry/watchdog/main.js +127 -0
  41. package/build/src/third_party/devtools-formatter-worker.js +7 -0
  42. package/build/src/third_party/index.js +28 -0
  43. package/build/src/third_party/issue-descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +4 -0
  44. package/build/src/third_party/issue-descriptions/CoepCorpNotSameOrigin.md +8 -0
  45. package/build/src/third_party/issue-descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +18 -0
  46. package/build/src/third_party/issue-descriptions/CoepCorpNotSameSite.md +7 -0
  47. package/build/src/third_party/issue-descriptions/CoepFrameResourceNeedsCoepHeader.md +10 -0
  48. package/build/src/third_party/issue-descriptions/CompatibilityModeQuirks.md +5 -0
  49. package/build/src/third_party/issue-descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
  50. package/build/src/third_party/issue-descriptions/LowTextContrast.md +5 -0
  51. package/build/src/third_party/issue-descriptions/SameSiteExcludeContextDowngradeRead.md +8 -0
  52. package/build/src/third_party/issue-descriptions/SameSiteExcludeContextDowngradeSet.md +8 -0
  53. package/build/src/third_party/issue-descriptions/SameSiteExcludeNavigationContextDowngrade.md +8 -0
  54. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorRead.md +8 -0
  55. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorSet.md +8 -0
  56. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnRead.md +8 -0
  57. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnSet.md +8 -0
  58. package/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +9 -0
  59. package/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +9 -0
  60. package/build/src/third_party/issue-descriptions/SameSiteWarnCrossDowngradeRead.md +8 -0
  61. package/build/src/third_party/issue-descriptions/SameSiteWarnCrossDowngradeSet.md +8 -0
  62. package/build/src/third_party/issue-descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +8 -0
  63. package/build/src/third_party/issue-descriptions/arInsecureContext.md +7 -0
  64. package/build/src/third_party/issue-descriptions/arInvalidInfoHeader.md +5 -0
  65. package/build/src/third_party/issue-descriptions/arInvalidRegisterOsSourceHeader.md +5 -0
  66. package/build/src/third_party/issue-descriptions/arInvalidRegisterOsTriggerHeader.md +5 -0
  67. package/build/src/third_party/issue-descriptions/arInvalidRegisterSourceHeader.md +5 -0
  68. package/build/src/third_party/issue-descriptions/arInvalidRegisterTriggerHeader.md +5 -0
  69. package/build/src/third_party/issue-descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +5 -0
  70. package/build/src/third_party/issue-descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +6 -0
  71. package/build/src/third_party/issue-descriptions/arNoRegisterOsSourceHeader.md +5 -0
  72. package/build/src/third_party/issue-descriptions/arNoRegisterOsTriggerHeader.md +5 -0
  73. package/build/src/third_party/issue-descriptions/arNoRegisterSourceHeader.md +5 -0
  74. package/build/src/third_party/issue-descriptions/arNoRegisterTriggerHeader.md +5 -0
  75. package/build/src/third_party/issue-descriptions/arNoWebOrOsSupport.md +4 -0
  76. package/build/src/third_party/issue-descriptions/arOsSourceIgnored.md +18 -0
  77. package/build/src/third_party/issue-descriptions/arOsTriggerIgnored.md +19 -0
  78. package/build/src/third_party/issue-descriptions/arPermissionPolicyDisabled.md +8 -0
  79. package/build/src/third_party/issue-descriptions/arSourceAndTriggerHeaders.md +9 -0
  80. package/build/src/third_party/issue-descriptions/arSourceIgnored.md +13 -0
  81. package/build/src/third_party/issue-descriptions/arTriggerIgnored.md +12 -0
  82. package/build/src/third_party/issue-descriptions/arUntrustworthyReportingOrigin.md +10 -0
  83. package/build/src/third_party/issue-descriptions/arWebAndOsHeaders.md +11 -0
  84. package/build/src/third_party/issue-descriptions/bounceTrackingMitigations.md +3 -0
  85. package/build/src/third_party/issue-descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
  86. package/build/src/third_party/issue-descriptions/clientHintMetaTagModifiedHTML.md +4 -0
  87. package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowlistItemType.md +12 -0
  88. package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidHeader.md +12 -0
  89. package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidUrlPattern.md +8 -0
  90. package/build/src/third_party/issue-descriptions/connectionAllowlistItemNotInnerList.md +12 -0
  91. package/build/src/third_party/issue-descriptions/connectionAllowlistMoreThanOneList.md +7 -0
  92. package/build/src/third_party/issue-descriptions/connectionAllowlistReportingEndpointNotToken.md +10 -0
  93. package/build/src/third_party/issue-descriptions/cookieCrossSiteRedirectDowngrade.md +12 -0
  94. package/build/src/third_party/issue-descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +4 -0
  95. package/build/src/third_party/issue-descriptions/cookieExcludeDomainNonAscii.md +11 -0
  96. package/build/src/third_party/issue-descriptions/cookieExcludePortMismatch.md +8 -0
  97. package/build/src/third_party/issue-descriptions/cookieExcludeSchemeMismatch.md +7 -0
  98. package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutRead.md +6 -0
  99. package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutSet.md +6 -0
  100. package/build/src/third_party/issue-descriptions/cookieWarnDomainNonAscii.md +11 -0
  101. package/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantRead.md +4 -0
  102. package/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantSet.md +4 -0
  103. package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutRead.md +6 -0
  104. package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutSet.md +6 -0
  105. package/build/src/third_party/issue-descriptions/corsAllowCredentialsRequired.md +6 -0
  106. package/build/src/third_party/issue-descriptions/corsDisabledScheme.md +7 -0
  107. package/build/src/third_party/issue-descriptions/corsDisallowedByMode.md +7 -0
  108. package/build/src/third_party/issue-descriptions/corsHeaderDisallowedByPreflightResponse.md +5 -0
  109. package/build/src/third_party/issue-descriptions/corsInvalidHeaderValues.md +7 -0
  110. package/build/src/third_party/issue-descriptions/corsLocalNetworkAccessPermissionDenied.md +19 -0
  111. package/build/src/third_party/issue-descriptions/corsMethodDisallowedByPreflightResponse.md +5 -0
  112. package/build/src/third_party/issue-descriptions/corsNoCorsRedirectModeNotFollow.md +5 -0
  113. package/build/src/third_party/issue-descriptions/corsOriginMismatch.md +6 -0
  114. package/build/src/third_party/issue-descriptions/corsPreflightResponseInvalid.md +5 -0
  115. package/build/src/third_party/issue-descriptions/corsRedirectContainsCredentials.md +5 -0
  116. package/build/src/third_party/issue-descriptions/corsWildcardOriginNotAllowed.md +8 -0
  117. package/build/src/third_party/issue-descriptions/cspEvalViolation.md +9 -0
  118. package/build/src/third_party/issue-descriptions/cspInlineViolation.md +10 -0
  119. package/build/src/third_party/issue-descriptions/cspTrustedTypesPolicyViolation.md +5 -0
  120. package/build/src/third_party/issue-descriptions/cspTrustedTypesSinkViolation.md +8 -0
  121. package/build/src/third_party/issue-descriptions/cspURLViolation.md +10 -0
  122. package/build/src/third_party/issue-descriptions/deprecation.md +3 -0
  123. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -0
  124. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -0
  125. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsNoResponse.md +1 -0
  126. package/build/src/third_party/issue-descriptions/federatedAuthRequestApprovalDeclined.md +1 -0
  127. package/build/src/third_party/issue-descriptions/federatedAuthRequestCanceled.md +1 -0
  128. package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -0
  129. package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorIdToken.md +1 -0
  130. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -0
  131. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -0
  132. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -0
  133. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -0
  134. package/build/src/third_party/issue-descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -0
  135. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
  136. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
  137. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
  138. package/build/src/third_party/issue-descriptions/federatedAuthRequestTooManyRequests.md +1 -0
  139. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -0
  140. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -0
  141. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -0
  142. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -0
  143. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -0
  144. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -0
  145. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -0
  146. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -0
  147. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -0
  148. package/build/src/third_party/issue-descriptions/fetchingPartitionedBlobURL.md +7 -0
  149. package/build/src/third_party/issue-descriptions/genericFormAriaLabelledByToNonExistingIdError.md +8 -0
  150. package/build/src/third_party/issue-descriptions/genericFormAutocompleteAttributeEmptyError.md +5 -0
  151. package/build/src/third_party/issue-descriptions/genericFormDuplicateIdForInputError.md +5 -0
  152. package/build/src/third_party/issue-descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +5 -0
  153. package/build/src/third_party/issue-descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +5 -0
  154. package/build/src/third_party/issue-descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +5 -0
  155. package/build/src/third_party/issue-descriptions/genericFormInputWithNoLabelError.md +5 -0
  156. package/build/src/third_party/issue-descriptions/genericFormLabelForMatchesNonExistingIdError.md +5 -0
  157. package/build/src/third_party/issue-descriptions/genericFormLabelForNameError.md +5 -0
  158. package/build/src/third_party/issue-descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +5 -0
  159. package/build/src/third_party/issue-descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
  160. package/build/src/third_party/issue-descriptions/genericResponseWasBlockedByORB.md +4 -0
  161. package/build/src/third_party/issue-descriptions/heavyAd.md +10 -0
  162. package/build/src/third_party/issue-descriptions/mixedContent.md +5 -0
  163. package/build/src/third_party/issue-descriptions/navigatingPartitionedBlobURL.md +5 -0
  164. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabled.md +7 -0
  165. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluder.md +9 -0
  166. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluderParent.md +9 -0
  167. package/build/src/third_party/issue-descriptions/permissionElementCspFrameAncestorsMissing.md +5 -0
  168. package/build/src/third_party/issue-descriptions/permissionElementFencedFrameDisallowed.md +5 -0
  169. package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooLarge.md +5 -0
  170. package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooSmall.md +5 -0
  171. package/build/src/third_party/issue-descriptions/permissionElementGeolocationDeprecated.md +5 -0
  172. package/build/src/third_party/issue-descriptions/permissionElementInsetBoxShadowUnsupported.md +5 -0
  173. package/build/src/third_party/issue-descriptions/permissionElementInvalidDisplayStyle.md +5 -0
  174. package/build/src/third_party/issue-descriptions/permissionElementInvalidSizeValue.md +5 -0
  175. package/build/src/third_party/issue-descriptions/permissionElementInvalidType.md +5 -0
  176. package/build/src/third_party/issue-descriptions/permissionElementInvalidTypeActivation.md +5 -0
  177. package/build/src/third_party/issue-descriptions/permissionElementLowContrast.md +5 -0
  178. package/build/src/third_party/issue-descriptions/permissionElementNonOpaqueColor.md +5 -0
  179. package/build/src/third_party/issue-descriptions/permissionElementPaddingBottomUnsupported.md +6 -0
  180. package/build/src/third_party/issue-descriptions/permissionElementPaddingRightUnsupported.md +6 -0
  181. package/build/src/third_party/issue-descriptions/permissionElementPermissionsPolicyBlocked.md +5 -0
  182. package/build/src/third_party/issue-descriptions/permissionElementRegistrationFailed.md +5 -0
  183. package/build/src/third_party/issue-descriptions/permissionElementRequestInProgress.md +5 -0
  184. package/build/src/third_party/issue-descriptions/permissionElementSecurityChecksFailed.md +5 -0
  185. package/build/src/third_party/issue-descriptions/permissionElementTypeNotSupported.md +5 -0
  186. package/build/src/third_party/issue-descriptions/permissionElementUntrustedEvent.md +7 -0
  187. package/build/src/third_party/issue-descriptions/placeholderDescriptionForInvisibleIssues.md +3 -0
  188. package/build/src/third_party/issue-descriptions/propertyRuleInvalidNameIssue.md +3 -0
  189. package/build/src/third_party/issue-descriptions/propertyRuleIssue.md +7 -0
  190. package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +7 -0
  191. package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedSelectChild.md +7 -0
  192. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +3 -0
  193. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +3 -0
  194. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +3 -0
  195. package/build/src/third_party/issue-descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +3 -0
  196. package/build/src/third_party/issue-descriptions/selectivePermissionsIntervention.md +7 -0
  197. package/build/src/third_party/issue-descriptions/sharedArrayBuffer.md +7 -0
  198. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -0
  199. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +3 -0
  200. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +3 -0
  201. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +1 -0
  202. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +1 -0
  203. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +1 -0
  204. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorExpiredResponse.md +3 -0
  205. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +3 -0
  206. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInsufficientResources.md +1 -0
  207. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +1 -0
  208. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +1 -0
  209. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
  210. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNavigationRequest.md +3 -0
  211. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNoMatchField.md +1 -0
  212. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
  213. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +1 -0
  214. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonSecureContext.md +3 -0
  215. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringIdField.md +1 -0
  216. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +1 -0
  217. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +1 -0
  218. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +1 -0
  219. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorRequestAborted.md +1 -0
  220. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorShuttingDown.md +1 -0
  221. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorTooLongIdField.md +3 -0
  222. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorUnsupportedType.md +3 -0
  223. package/build/src/third_party/issue-descriptions/sriInvalidSignatureHeader.md +14 -0
  224. package/build/src/third_party/issue-descriptions/sriInvalidSignatureInputHeader.md +15 -0
  225. package/build/src/third_party/issue-descriptions/sriMissingSignatureHeader.md +8 -0
  226. package/build/src/third_party/issue-descriptions/sriMissingSignatureInputHeader.md +7 -0
  227. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsIncorrectLength.md +11 -0
  228. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsNotByteSequence.md +14 -0
  229. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsParameterized.md +15 -0
  230. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentName.md +8 -0
  231. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentType.md +13 -0
  232. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +4 -0
  233. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +5 -0
  234. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidParameter.md +11 -0
  235. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderKeyIdLength.md +12 -0
  236. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingLabel.md +6 -0
  237. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +8 -0
  238. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueMissingComponents.md +11 -0
  239. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueNotInnerList.md +11 -0
  240. package/build/src/third_party/issue-descriptions/sriValidationFailedIntegrityMismatch.md +10 -0
  241. package/build/src/third_party/issue-descriptions/sriValidationFailedInvalidLength.md +5 -0
  242. package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureExpired.md +6 -0
  243. package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureMismatch.md +11 -0
  244. package/build/src/third_party/issue-descriptions/stylesheetLateImport.md +4 -0
  245. package/build/src/third_party/issue-descriptions/stylesheetRequestFailed.md +3 -0
  246. package/build/src/third_party/issue-descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +3 -0
  247. package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestLength.md +12 -0
  248. package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestType.md +17 -0
  249. package/build/src/third_party/issue-descriptions/unencodedDigestMalformedDictionary.md +14 -0
  250. package/build/src/third_party/issue-descriptions/unencodedDigestUnknownAlgorithm.md +15 -0
  251. package/build/src/third_party/lighthouse-devtools-mcp-bundle.js +59418 -0
  252. package/build/src/tools/ToolDefinition.js +72 -0
  253. package/build/src/tools/categories.js +26 -0
  254. package/build/src/tools/console.js +85 -0
  255. package/build/src/tools/emulation.js +55 -0
  256. package/build/src/tools/extensions.js +96 -0
  257. package/build/src/tools/inPage.js +105 -0
  258. package/build/src/tools/input.js +376 -0
  259. package/build/src/tools/lighthouse.js +123 -0
  260. package/build/src/tools/memory.js +28 -0
  261. package/build/src/tools/network.js +120 -0
  262. package/build/src/tools/pages.js +336 -0
  263. package/build/src/tools/performance.js +190 -0
  264. package/build/src/tools/screencast.js +79 -0
  265. package/build/src/tools/screenshot.js +84 -0
  266. package/build/src/tools/script.js +125 -0
  267. package/build/src/tools/slim/tools.js +81 -0
  268. package/build/src/tools/snapshot.js +56 -0
  269. package/build/src/tools/tools.js +53 -0
  270. package/build/src/trace-processing/parse.js +84 -0
  271. package/build/src/types.js +6 -0
  272. package/build/src/utils/ExtensionRegistry.js +35 -0
  273. package/build/src/utils/check-for-updates.js +72 -0
  274. package/build/src/utils/files.js +19 -0
  275. package/build/src/utils/keyboard.js +296 -0
  276. package/build/src/utils/pagination.js +49 -0
  277. package/build/src/utils/string.js +36 -0
  278. package/build/src/utils/types.js +6 -0
  279. package/build/src/version.js +6 -0
  280. package/package.json +87 -0
package/README.md ADDED
@@ -0,0 +1,802 @@
1
+ # Brave MCP
2
+
3
+ > Fork of [ChromeDevTools/chrome-devtools-mcp](https://github.com/ChromeDevTools/chrome-devtools-mcp) ported to **Brave Browser**.
4
+ >
5
+ > npm: `brave-mcp` · repo: `triuzzi/brave-devtools-mcp`
6
+
7
+ `brave-mcp` lets your coding agent (such as Claude, Cursor, Gemini or Copilot)
8
+ control and inspect a live Brave browser. It acts as a Model-Context-Protocol
9
+ (MCP) server, giving your AI coding assistant access to the full power of
10
+ DevTools for reliable automation, in-depth debugging, and performance analysis.
11
+
12
+ ## [Tool reference](./docs/tool-reference.md) | [Changelog](./CHANGELOG.md) | [Contributing](./CONTRIBUTING.md) | [Troubleshooting](./docs/troubleshooting.md) | [Design Principles](./docs/design-principles.md)
13
+
14
+ ## Key features
15
+
16
+ - **Get performance insights**: Uses [Chrome
17
+ DevTools](https://github.com/ChromeDevTools/devtools-frontend) to record
18
+ traces and extract actionable performance insights.
19
+ - **Advanced browser debugging**: Analyze network requests, take screenshots and
20
+ check browser console messages (with source-mapped stack traces).
21
+ - **Reliable automation**. Uses
22
+ [puppeteer](https://github.com/puppeteer/puppeteer) to automate actions in
23
+ Brave and automatically wait for action results.
24
+
25
+ ## Disclaimers
26
+
27
+ `brave-devtools-mcp` exposes content of the browser instance to the MCP clients
28
+ allowing them to inspect, debug, and modify any data in the browser or DevTools.
29
+ Avoid sharing sensitive or personal information that you don't want to share with
30
+ MCP clients.
31
+
32
+ Performance tools may send trace URLs to the Google CrUX API to fetch real-user
33
+ experience data. To disable this, run with the `--no-performance-crux` flag.
34
+
35
+ Usage statistics from the upstream project are **disabled by default** in this fork.
36
+ You can explicitly enable them with `--usage-statistics` if desired.
37
+
38
+ ## Requirements
39
+
40
+ - [Node.js](https://nodejs.org/) v20.19 or a newer [latest maintenance LTS](https://github.com/nodejs/Release#release-schedule) version.
41
+ - [Brave Browser](https://brave.com/) current release version or newer.
42
+ - [npm](https://www.npmjs.com/)
43
+
44
+ > **Note:** Do **not** use `chrome-devtools-mcp@latest` from npm — that installs Google's Chrome-oriented server. This fork is `brave-mcp`.
45
+
46
+ ## Setup
47
+
48
+ ### Quick start (via npm)
49
+
50
+ ```json
51
+ {
52
+ "mcpServers": {
53
+ "brave-devtools": {
54
+ "command": "npx",
55
+ "args": ["-y", "brave-mcp@latest"]
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ Add this to your MCP client config and you're done. Works with **Claude Code** (`~/.mcp.json`), **Cursor** (Settings → MCP), **VS Code Copilot**, and any other MCP client.
62
+
63
+ ### From source (for development)
64
+
65
+ ```sh
66
+ git clone https://github.com/triuzzi/brave-devtools-mcp.git
67
+ cd brave-devtools-mcp
68
+ npm install
69
+ npm run build
70
+ ```
71
+
72
+ Run `npm run build` again after `git pull` when you update the repo.
73
+
74
+ Then point your MCP config at the built CLI with an **absolute path**:
75
+
76
+ ```json
77
+ {
78
+ "mcpServers": {
79
+ "brave-devtools": {
80
+ "command": "node",
81
+ "args": [
82
+ "/absolute/path/to/brave-devtools-mcp/build/src/bin/brave-devtools-mcp.js"
83
+ ]
84
+ }
85
+ }
86
+ }
87
+ ```
88
+
89
+ This works with **Claude Code** (`~/.mcp.json`), **Cursor** (Settings → MCP → New MCP Server, or `mcp.json`), **VS Code Copilot**, and any other MCP client.
90
+
91
+ If Brave is not detected automatically, set `BRAVE_PATH`:
92
+
93
+ ```json
94
+ {
95
+ "mcpServers": {
96
+ "brave-devtools": {
97
+ "command": "node",
98
+ "args": ["/absolute/path/to/brave-devtools-mcp/build/src/bin/brave-devtools-mcp.js"],
99
+ "env": {
100
+ "BRAVE_PATH": "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
101
+ }
102
+ }
103
+ }
104
+ }
105
+ ```
106
+
107
+ ### 3. Choose your connection mode
108
+
109
+ The server has two modes: **launch a new instance** (default) or **attach to your existing Brave window**.
110
+
111
+ #### Mode A: Launch a new instance (default)
112
+
113
+ With the basic config above, the server spawns a dedicated Brave instance with its own profile. Your existing Brave windows are untouched. This is the simplest mode — no extra setup needed.
114
+
115
+ #### Mode B: Attach to your existing Brave window
116
+
117
+ If you want the MCP server to control the Brave window you already have open (same tabs, cookies, logins), you need to start Brave with remote debugging enabled.
118
+
119
+ **Step 1:** Quit Brave completely, then relaunch with the debugging flag:
120
+
121
+ ```sh
122
+ # macOS
123
+ open -a "Brave Browser" --args --remote-debugging-port=9222
124
+
125
+ # Linux
126
+ brave-browser --remote-debugging-port=9222
127
+
128
+ # Windows
129
+ "C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe" --remote-debugging-port=9222
130
+ ```
131
+
132
+ > **Tip:** To always start Brave with remote debugging, add `--remote-debugging-port=9222` to Brave's launch shortcut or shell alias so you never have to think about it again.
133
+
134
+ **Step 2:** Add `--browserUrl` to your MCP config:
135
+
136
+ ```json
137
+ {
138
+ "mcpServers": {
139
+ "brave-devtools": {
140
+ "command": "npx",
141
+ "args": ["-y", "brave-mcp@latest", "--browserUrl", "http://localhost:9222"]
142
+ }
143
+ }
144
+ }
145
+ ```
146
+
147
+ Or if running from source:
148
+
149
+ ```json
150
+ {
151
+ "mcpServers": {
152
+ "brave-devtools": {
153
+ "command": "node",
154
+ "args": [
155
+ "/absolute/path/to/brave-devtools-mcp/build/src/bin/brave-devtools-mcp.js",
156
+ "--browserUrl", "http://localhost:9222"
157
+ ]
158
+ }
159
+ }
160
+ }
161
+ ```
162
+
163
+ Without `--browserUrl`, the server will always launch a new instance. With it, the server attaches to your running Brave instead.
164
+
165
+ > **Warning:** The remote debugging port lets any application on your machine control the browser. Be mindful of sensitive websites while it's open.
166
+
167
+ ### All CLI options
168
+
169
+ Run `--help` to see every flag:
170
+
171
+ ```sh
172
+ node /absolute/path/to/brave-devtools-mcp/build/src/bin/brave-devtools-mcp.js --help
173
+ ```
174
+
175
+ ## Testing
176
+
177
+ An integration test suite exercises all 29 MCP tools against a running Brave instance:
178
+
179
+ ```sh
180
+ # Launch Brave with remote debugging
181
+ open -a "Brave Browser" --args --remote-debugging-port=9222
182
+
183
+ # Run all 36 test cases
184
+ npm run test:brave
185
+ ```
186
+
187
+ Tests cover navigation, snapshots, screenshots, script execution, input automation (click/fill/drag/upload), dialogs, console, network, emulation, performance tracing, memory snapshots, and Lighthouse audits.
188
+
189
+ ## Getting started
190
+
191
+ If you are interested in only basic browser tasks, use `--slim` mode:
192
+
193
+ ```json
194
+ {
195
+ "mcpServers": {
196
+ "brave-devtools": {
197
+ "command": "node",
198
+ "args": [
199
+ "/absolute/path/to/brave-devtools-mcp/build/src/bin/brave-devtools-mcp.js",
200
+ "--slim", "--headless"
201
+ ]
202
+ }
203
+ }
204
+ }
205
+ ```
206
+
207
+ See [Slim tool reference](./docs/slim-tool-reference.md).
208
+
209
+ ### MCP Client configuration
210
+
211
+ <details>
212
+ <summary>Amp</summary>
213
+ Follow https://ampcode.com/manual#mcp and use the config provided above. You can also install the Chrome DevTools MCP server using the CLI:
214
+
215
+ ```bash
216
+ amp mcp add chrome-devtools -- npx chrome-devtools-mcp@latest
217
+ ```
218
+
219
+ </details>
220
+
221
+ <details>
222
+ <summary>Antigravity</summary>
223
+
224
+ To use the Chrome DevTools MCP server follow the instructions from <a href="https://antigravity.google/docs/mcp">Antigravity's docs</a> to install a custom MCP server. Add the following config to the MCP servers config:
225
+
226
+ ```bash
227
+ {
228
+ "mcpServers": {
229
+ "chrome-devtools": {
230
+ "command": "npx",
231
+ "args": [
232
+ "chrome-devtools-mcp@latest",
233
+ "--browser-url=http://127.0.0.1:9222",
234
+ "-y"
235
+ ]
236
+ }
237
+ }
238
+ }
239
+ ```
240
+
241
+ This will make the Chrome DevTools MCP server automatically connect to the browser that Antigravity is using. If you are not using port 9222, make sure to adjust accordingly.
242
+
243
+ Chrome DevTools MCP will not start the browser instance automatically using this approach because the Chrome DevTools MCP server connects to Antigravity's built-in browser. If the browser is not already running, you have to start it first by clicking the Chrome icon at the top right corner.
244
+
245
+ </details>
246
+
247
+ <details>
248
+ <summary>Claude Code</summary>
249
+
250
+ **Install via CLI (MCP only)**
251
+
252
+ Use the Claude Code CLI to add the Chrome DevTools MCP server (<a href="https://code.claude.com/docs/en/mcp">guide</a>):
253
+
254
+ ```bash
255
+ claude mcp add chrome-devtools --scope user npx chrome-devtools-mcp@latest
256
+ ```
257
+
258
+ **Install as a Plugin (MCP + Skills)**
259
+
260
+ > [!NOTE]
261
+ > If you already had Chrome DevTools MCP installed previously for Claude Code, make sure to remove it first from your installation and configuration files.
262
+
263
+ To install Chrome DevTools MCP with skills, add the marketplace registry in Claude Code:
264
+
265
+ ```sh
266
+ /plugin marketplace add ChromeDevTools/chrome-devtools-mcp
267
+ ```
268
+
269
+ Then, install the plugin:
270
+
271
+ ```sh
272
+ /plugin install chrome-devtools-mcp
273
+ ```
274
+
275
+ Restart Claude Code to have the MCP server and skills load (check with `/skills`).
276
+
277
+ > [!TIP]
278
+ > If the plugin installation fails with a `Failed to clone repository` error (e.g., HTTPS connectivity issues behind a corporate firewall), see the [troubleshooting guide](./docs/troubleshooting.md#claude-code-plugin-installation-fails-with-failed-to-clone-repository) for workarounds, or use the CLI installation method above instead.
279
+
280
+ </details>
281
+
282
+ <details>
283
+ <summary>Cline</summary>
284
+ Follow https://docs.cline.bot/mcp/configuring-mcp-servers and use the config provided above.
285
+ </details>
286
+
287
+ <details>
288
+ <summary>Codex</summary>
289
+ Follow the <a href="https://developers.openai.com/codex/mcp/#configure-with-the-cli">configure MCP guide</a>
290
+ using the standard config from above. You can also install the Chrome DevTools MCP server using the Codex CLI:
291
+
292
+ ```bash
293
+ codex mcp add chrome-devtools -- npx chrome-devtools-mcp@latest
294
+ ```
295
+
296
+ **On Windows 11**
297
+
298
+ Configure the Chrome install location and increase the startup timeout by updating `.codex/config.toml` and adding the following `env` and `startup_timeout_ms` parameters:
299
+
300
+ ```
301
+ [mcp_servers.chrome-devtools]
302
+ command = "cmd"
303
+ args = [
304
+ "/c",
305
+ "npx",
306
+ "-y",
307
+ "chrome-devtools-mcp@latest",
308
+ ]
309
+ env = { SystemRoot="C:\\Windows", PROGRAMFILES="C:\\Program Files" }
310
+ startup_timeout_ms = 20_000
311
+ ```
312
+
313
+ </details>
314
+
315
+ <details>
316
+ <summary>Command Code</summary>
317
+
318
+ Use the Command Code CLI to add the Chrome DevTools MCP server (<a href="https://commandcode.ai/docs/mcp">MCP guide</a>):
319
+
320
+ ```bash
321
+ cmd mcp add chrome-devtools --scope user npx chrome-devtools-mcp@latest
322
+ ```
323
+
324
+ </details>
325
+
326
+ <details>
327
+ <summary>Copilot CLI</summary>
328
+
329
+ Start Copilot CLI:
330
+
331
+ ```
332
+ copilot
333
+ ```
334
+
335
+ Start the dialog to add a new MCP server by running:
336
+
337
+ ```
338
+ /mcp add
339
+ ```
340
+
341
+ Configure the following fields and press `CTRL+S` to save the configuration:
342
+
343
+ - **Server name:** `chrome-devtools`
344
+ - **Server Type:** `[1] Local`
345
+ - **Command:** `npx -y chrome-devtools-mcp@latest`
346
+
347
+ </details>
348
+
349
+ <details>
350
+ <summary>Copilot / VS Code</summary>
351
+
352
+ **Install as a Plugin (Recommended)**
353
+
354
+ The easiest way to get up and running is to install `chrome-devtools-mcp` as an agent plugin.
355
+ This bundles the **MCP server** and all **skills** together, so your agent gets both the tools
356
+ and the expert guidance it needs to use them effectively.
357
+
358
+ 1. Open the **Command Palette** (`Cmd+Shift+P` on macOS or `Ctrl+Shift+P` on Windows/Linux).
359
+ 2. Search for and run the **Chat: Install Plugin From Source** command.
360
+ 3. Paste in our repository URL: `https://github.com/ChromeDevTools/chrome-devtools-mcp`
361
+
362
+ That's it! Your agent is now supercharged with Chrome DevTools capabilities.
363
+
364
+ ---
365
+
366
+ **Install as an MCP Server (MCP only)**
367
+
368
+ **Click the button to install:**
369
+
370
+ [<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](https://vscode.dev/redirect/mcp/install?name=io.github.ChromeDevTools%2Fchrome-devtools-mcp&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22chrome-devtools-mcp%22%5D%2C%22env%22%3A%7B%7D%7D)
371
+
372
+ [<img src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5" alt="Install in VS Code Insiders">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522io.github.ChromeDevTools%252Fchrome-devtools-mcp%2522%252C%2522config%2522%253A%257B%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522chrome-devtools-mcp%2522%255D%252C%2522env%2522%253A%257B%257D%257D%257D)
373
+
374
+ **Or install manually:**
375
+
376
+ Follow the VS Code [MCP configuration guide](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server) using the standard config from above, or use the CLI:
377
+
378
+ For macOS and Linux:
379
+
380
+ ```bash
381
+ code --add-mcp '{"name":"io.github.ChromeDevTools/chrome-devtools-mcp","command":"npx","args":["-y","chrome-devtools-mcp"],"env":{}}'
382
+ ```
383
+
384
+ For Windows (PowerShell):
385
+
386
+ ```powershell
387
+ code --add-mcp '{"""name""":"""io.github.ChromeDevTools/chrome-devtools-mcp""","""command""":"""npx""","""args""":["""-y""","""chrome-devtools-mcp"""]}'
388
+ ```
389
+
390
+ </details>
391
+
392
+ <details>
393
+ <summary>Cursor</summary>
394
+
395
+ **Click the button to install:**
396
+
397
+ [<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=chrome-devtools&config=eyJjb21tYW5kIjoibnB4IC15IGNocm9tZS1kZXZ0b29scy1tY3BAbGF0ZXN0In0%3D)
398
+
399
+ **Or install manually:**
400
+
401
+ Go to `Cursor Settings` -> `MCP` -> `New MCP Server`. Use the config provided above.
402
+
403
+ </details>
404
+
405
+ <details>
406
+ <summary>Factory CLI</summary>
407
+ Use the Factory CLI to add the Chrome DevTools MCP server (<a href="https://docs.factory.ai/cli/configuration/mcp">guide</a>):
408
+
409
+ ```bash
410
+ droid mcp add chrome-devtools "npx -y chrome-devtools-mcp@latest"
411
+ ```
412
+
413
+ </details>
414
+
415
+ <details>
416
+ <summary>Gemini CLI</summary>
417
+ Install the Chrome DevTools MCP server using the Gemini CLI.
418
+
419
+ **Project wide:**
420
+
421
+ ```bash
422
+ # Either MCP only:
423
+ gemini mcp add chrome-devtools npx chrome-devtools-mcp@latest
424
+ # Or as a Gemini extension (MCP+Skills):
425
+ gemini extensions install --auto-update https://github.com/ChromeDevTools/chrome-devtools-mcp
426
+ ```
427
+
428
+ **Globally:**
429
+
430
+ ```bash
431
+ gemini mcp add -s user chrome-devtools npx chrome-devtools-mcp@latest
432
+ ```
433
+
434
+ Alternatively, follow the <a href="https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md#how-to-set-up-your-mcp-server">MCP guide</a> and use the standard config from above.
435
+
436
+ </details>
437
+
438
+ <details>
439
+ <summary>Gemini Code Assist</summary>
440
+ Follow the <a href="https://cloud.google.com/gemini/docs/codeassist/use-agentic-chat-pair-programmer#configure-mcp-servers">configure MCP guide</a>
441
+ using the standard config from above.
442
+ </details>
443
+
444
+ <details>
445
+ <summary>JetBrains AI Assistant & Junie</summary>
446
+
447
+ Go to `Settings | Tools | AI Assistant | Model Context Protocol (MCP)` -> `Add`. Use the config provided above.
448
+ The same way chrome-devtools-mcp can be configured for JetBrains Junie in `Settings | Tools | Junie | MCP Settings` -> `Add`. Use the config provided above.
449
+
450
+ </details>
451
+
452
+ <details>
453
+ <summary>Kiro</summary>
454
+
455
+ In **Kiro Settings**, go to `Configure MCP` > `Open Workspace or User MCP Config` > Use the configuration snippet provided above.
456
+
457
+ Or, from the IDE **Activity Bar** > `Kiro` > `MCP Servers` > `Click Open MCP Config`. Use the configuration snippet provided above.
458
+
459
+ </details>
460
+
461
+ <details>
462
+ <summary>Katalon Studio</summary>
463
+
464
+ The Chrome DevTools MCP server can be used with <a href="https://docs.katalon.com/katalon-studio/studioassist/mcp-servers/setting-up-chrome-devtools-mcp-server-for-studioassist">Katalon StudioAssist</a> via an MCP proxy.
465
+
466
+ **Step 1:** Install the MCP proxy by following the <a href="https://docs.katalon.com/katalon-studio/studioassist/mcp-servers/setting-up-mcp-proxy-for-stdio-mcp-servers">MCP proxy setup guide</a>.
467
+
468
+ **Step 2:** Start the Chrome DevTools MCP server with the proxy:
469
+
470
+ ```bash
471
+ mcp-proxy --transport streamablehttp --port 8080 -- npx -y chrome-devtools-mcp@latest
472
+ ```
473
+
474
+ **Note:** You may need to pick another port if 8080 is already in use.
475
+
476
+ **Step 3:** In Katalon Studio, add the server to StudioAssist with the following settings:
477
+
478
+ - **Connection URL:** `http://127.0.0.1:8080/mcp`
479
+ - **Transport type:** `HTTP`
480
+
481
+ Once connected, the Chrome DevTools MCP tools will be available in StudioAssist.
482
+
483
+ </details>
484
+
485
+ <details>
486
+ <summary>Mistral Vibe</summary>
487
+
488
+ Add in ~/.vibe/config.toml:
489
+
490
+ ```toml
491
+ [[mcp_servers]]
492
+ name = "chrome-devtools"
493
+ transport = "stdio"
494
+ command = "npx"
495
+ args = ["chrome-devtools-mcp@latest"]
496
+ ```
497
+
498
+ </details>
499
+
500
+ <details>
501
+ <summary>OpenCode</summary>
502
+
503
+ Add the following configuration to your `opencode.json` file. If you don't have one, create it at `~/.config/opencode/opencode.json` (<a href="https://opencode.ai/docs/mcp-servers">guide</a>):
504
+
505
+ ```json
506
+ {
507
+ "$schema": "https://opencode.ai/config.json",
508
+ "mcp": {
509
+ "chrome-devtools": {
510
+ "type": "local",
511
+ "command": ["npx", "-y", "chrome-devtools-mcp@latest"]
512
+ }
513
+ }
514
+ }
515
+ ```
516
+
517
+ </details>
518
+
519
+ <details>
520
+ <summary>Qoder</summary>
521
+
522
+ In **Qoder Settings**, go to `MCP Server` > `+ Add` > Use the configuration snippet provided above.
523
+
524
+ Alternatively, follow the <a href="https://docs.qoder.com/user-guide/chat/model-context-protocol">MCP guide</a> and use the standard config from above.
525
+
526
+ </details>
527
+
528
+ <details>
529
+ <summary>Qoder CLI</summary>
530
+
531
+ Install the Chrome DevTools MCP server using the Qoder CLI (<a href="https://docs.qoder.com/cli/using-cli#mcp-servers">guide</a>):
532
+
533
+ **Project wide:**
534
+
535
+ ```bash
536
+ qodercli mcp add chrome-devtools -- npx chrome-devtools-mcp@latest
537
+ ```
538
+
539
+ **Globally:**
540
+
541
+ ```bash
542
+ qodercli mcp add -s user chrome-devtools -- npx chrome-devtools-mcp@latest
543
+ ```
544
+
545
+ </details>
546
+
547
+ <details>
548
+ <summary>Visual Studio</summary>
549
+
550
+ **Click the button to install:**
551
+
552
+ [<img src="https://img.shields.io/badge/Visual_Studio-Install-C16FDE?logo=visualstudio&logoColor=white" alt="Install in Visual Studio">](https://vs-open.link/mcp-install?%7B%22name%22%3A%22chrome-devtools%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22chrome-devtools-mcp%40latest%22%5D%7D)
553
+
554
+ </details>
555
+
556
+ <details>
557
+ <summary>Warp</summary>
558
+
559
+ Go to `Settings | AI | Manage MCP Servers` -> `+ Add` to [add an MCP Server](https://docs.warp.dev/knowledge-and-collaboration/mcp#adding-an-mcp-server). Use the config provided above.
560
+
561
+ </details>
562
+
563
+ <details>
564
+ <summary>Windsurf</summary>
565
+ Follow the <a href="https://docs.windsurf.com/windsurf/cascade/mcp#mcp-config-json">configure MCP guide</a>
566
+ using the standard config from above.
567
+ </details>
568
+
569
+ ### Your first prompt
570
+
571
+ Enter the following prompt in your MCP Client to check if everything is working:
572
+
573
+ ```
574
+ Check the performance of https://example.com
575
+ ```
576
+
577
+ Your MCP client should open Brave (or attach to the running instance) and record a performance trace.
578
+
579
+ > [!NOTE]
580
+ > The MCP server will start the browser automatically once the MCP client uses a tool that requires a running browser instance. Connecting to the Brave DevTools MCP server on its own will not automatically start the browser.
581
+
582
+ ## Tools
583
+
584
+ If you run into any issues, checkout our [troubleshooting guide](./docs/troubleshooting.md).
585
+
586
+ <!-- BEGIN AUTO GENERATED TOOLS -->
587
+
588
+ - **Input automation** (9 tools)
589
+ - [`click`](docs/tool-reference.md#click)
590
+ - [`drag`](docs/tool-reference.md#drag)
591
+ - [`fill`](docs/tool-reference.md#fill)
592
+ - [`fill_form`](docs/tool-reference.md#fill_form)
593
+ - [`handle_dialog`](docs/tool-reference.md#handle_dialog)
594
+ - [`hover`](docs/tool-reference.md#hover)
595
+ - [`press_key`](docs/tool-reference.md#press_key)
596
+ - [`type_text`](docs/tool-reference.md#type_text)
597
+ - [`upload_file`](docs/tool-reference.md#upload_file)
598
+ - **Navigation automation** (6 tools)
599
+ - [`close_page`](docs/tool-reference.md#close_page)
600
+ - [`list_pages`](docs/tool-reference.md#list_pages)
601
+ - [`navigate_page`](docs/tool-reference.md#navigate_page)
602
+ - [`new_page`](docs/tool-reference.md#new_page)
603
+ - [`select_page`](docs/tool-reference.md#select_page)
604
+ - [`wait_for`](docs/tool-reference.md#wait_for)
605
+ - **Emulation** (2 tools)
606
+ - [`emulate`](docs/tool-reference.md#emulate)
607
+ - [`resize_page`](docs/tool-reference.md#resize_page)
608
+ - **Performance** (4 tools)
609
+ - [`performance_analyze_insight`](docs/tool-reference.md#performance_analyze_insight)
610
+ - [`performance_start_trace`](docs/tool-reference.md#performance_start_trace)
611
+ - [`performance_stop_trace`](docs/tool-reference.md#performance_stop_trace)
612
+ - [`take_memory_snapshot`](docs/tool-reference.md#take_memory_snapshot)
613
+ - **Network** (2 tools)
614
+ - [`get_network_request`](docs/tool-reference.md#get_network_request)
615
+ - [`list_network_requests`](docs/tool-reference.md#list_network_requests)
616
+ - **Debugging** (6 tools)
617
+ - [`evaluate_script`](docs/tool-reference.md#evaluate_script)
618
+ - [`get_console_message`](docs/tool-reference.md#get_console_message)
619
+ - [`lighthouse_audit`](docs/tool-reference.md#lighthouse_audit)
620
+ - [`list_console_messages`](docs/tool-reference.md#list_console_messages)
621
+ - [`take_screenshot`](docs/tool-reference.md#take_screenshot)
622
+ - [`take_snapshot`](docs/tool-reference.md#take_snapshot)
623
+
624
+ <!-- END AUTO GENERATED TOOLS -->
625
+
626
+ ## Configuration
627
+
628
+ The Brave DevTools MCP server supports the following configuration options:
629
+
630
+ <!-- BEGIN AUTO GENERATED OPTIONS -->
631
+
632
+ - **`--autoConnect`/ `--auto-connect`**
633
+ If specified, automatically connects to a browser (Chrome 144+) running locally from the user data directory identified by the channel param (default channel is stable). Requires the remote debugging server to be started in the Chrome instance via chrome://inspect/#remote-debugging.
634
+ - **Type:** boolean
635
+ - **Default:** `false`
636
+
637
+ - **`--browserUrl`/ `--browser-url`, `-u`**
638
+ Connect to a running, debuggable Chrome instance (e.g. `http://127.0.0.1:9222`). For more details see: https://github.com/ChromeDevTools/chrome-devtools-mcp#connecting-to-a-running-chrome-instance.
639
+ - **Type:** string
640
+
641
+ - **`--wsEndpoint`/ `--ws-endpoint`, `-w`**
642
+ WebSocket endpoint to connect to a running Chrome instance (e.g., ws://127.0.0.1:9222/devtools/browser/<id>). Alternative to --browserUrl.
643
+ - **Type:** string
644
+
645
+ - **`--wsHeaders`/ `--ws-headers`**
646
+ Custom headers for WebSocket connection in JSON format (e.g., '{"Authorization":"Bearer token"}'). Only works with --wsEndpoint.
647
+ - **Type:** string
648
+
649
+ - **`--headless`**
650
+ Whether to run in headless (no UI) mode.
651
+ - **Type:** boolean
652
+ - **Default:** `false`
653
+
654
+ - **`--executablePath`/ `--executable-path`, `-e`**
655
+ Path to custom Chrome executable.
656
+ - **Type:** string
657
+
658
+ - **`--isolated`**
659
+ If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed. Defaults to false.
660
+ - **Type:** boolean
661
+
662
+ - **`--userDataDir`/ `--user-data-dir`**
663
+ Path to the user data directory for Chrome. Default is $HOME/.cache/chrome-devtools-mcp/chrome-profile$CHANNEL_SUFFIX_IF_NON_STABLE
664
+ - **Type:** string
665
+
666
+ - **`--channel`**
667
+ Specify a different Chrome channel that should be used. The default is the stable channel version.
668
+ - **Type:** string
669
+ - **Choices:** `stable`, `canary`, `beta`, `dev`
670
+
671
+ - **`--logFile`/ `--log-file`**
672
+ Path to a file to write debug logs to. Set the env variable `DEBUG` to `*` to enable verbose logs. Useful for submitting bug reports.
673
+ - **Type:** string
674
+
675
+ - **`--viewport`**
676
+ Initial viewport size for the Chrome instances started by the server. For example, `1280x720`. In headless mode, max size is 3840x2160px.
677
+ - **Type:** string
678
+
679
+ - **`--proxyServer`/ `--proxy-server`**
680
+ Proxy server configuration for Chrome passed as --proxy-server when launching the browser. See https://www.chromium.org/developers/design-documents/network-settings/ for details.
681
+ - **Type:** string
682
+
683
+ - **`--acceptInsecureCerts`/ `--accept-insecure-certs`**
684
+ If enabled, ignores errors relative to self-signed and expired certificates. Use with caution.
685
+ - **Type:** boolean
686
+
687
+ - **`--experimentalVision`/ `--experimental-vision`**
688
+ Whether to enable coordinate-based tools such as click_at(x,y). Usually requires a computer-use model able to produce accurate coordinates by looking at screenshots.
689
+ - **Type:** boolean
690
+
691
+ - **`--experimentalScreencast`/ `--experimental-screencast`**
692
+ Exposes experimental screencast tools (requires ffmpeg). Install ffmpeg https://www.ffmpeg.org/download.html and ensure it is available in the MCP server PATH.
693
+ - **Type:** boolean
694
+
695
+ - **`--chromeArg`/ `--chrome-arg`**
696
+ Additional arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp.
697
+ - **Type:** array
698
+
699
+ - **`--ignoreDefaultChromeArg`/ `--ignore-default-chrome-arg`**
700
+ Explicitly disable default arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp.
701
+ - **Type:** array
702
+
703
+ - **`--categoryEmulation`/ `--category-emulation`**
704
+ Set to false to exclude tools related to emulation.
705
+ - **Type:** boolean
706
+ - **Default:** `true`
707
+
708
+ - **`--categoryPerformance`/ `--category-performance`**
709
+ Set to false to exclude tools related to performance.
710
+ - **Type:** boolean
711
+ - **Default:** `true`
712
+
713
+ - **`--categoryNetwork`/ `--category-network`**
714
+ Set to false to exclude tools related to network.
715
+ - **Type:** boolean
716
+ - **Default:** `true`
717
+
718
+ - **`--performanceCrux`/ `--performance-crux`**
719
+ Set to false to disable sending URLs from performance traces to CrUX API to get field performance data.
720
+ - **Type:** boolean
721
+ - **Default:** `true`
722
+
723
+ - **`--usageStatistics`/ `--usage-statistics`**
724
+ Set to false to opt-out of usage statistics collection. Google collects usage data to improve the tool, handled under the Google Privacy Policy (https://policies.google.com/privacy). This is independent from Chrome browser metrics. Disabled if `CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS` or `CI` env variables are set.
725
+ - **Type:** boolean
726
+ - **Default:** `true`
727
+
728
+ - **`--slim`**
729
+ Exposes a "slim" set of 3 tools covering navigation, script execution and screenshots only. Useful for basic browser tasks.
730
+ - **Type:** boolean
731
+
732
+ <!-- END AUTO GENERATED OPTIONS -->
733
+
734
+ Pass them via the `args` property in the JSON configuration. For example:
735
+
736
+ ```json
737
+ {
738
+ "mcpServers": {
739
+ "chrome-devtools": {
740
+ "command": "npx",
741
+ "args": [
742
+ "chrome-devtools-mcp@latest",
743
+ "--channel=canary",
744
+ "--headless=true",
745
+ "--isolated=true"
746
+ ]
747
+ }
748
+ }
749
+ }
750
+ ```
751
+
752
+ ### Connecting via WebSocket with custom headers
753
+
754
+ You can connect directly to a Chrome WebSocket endpoint and include custom headers (e.g., for authentication):
755
+
756
+ ```json
757
+ {
758
+ "mcpServers": {
759
+ "chrome-devtools": {
760
+ "command": "npx",
761
+ "args": [
762
+ "chrome-devtools-mcp@latest",
763
+ "--wsEndpoint=ws://127.0.0.1:9222/devtools/browser/<id>",
764
+ "--wsHeaders={\"Authorization\":\"Bearer YOUR_TOKEN\"}"
765
+ ]
766
+ }
767
+ }
768
+ }
769
+ ```
770
+
771
+ To get the WebSocket endpoint from a running Chrome instance, visit `http://127.0.0.1:9222/json/version` and look for the `webSocketDebuggerUrl` field.
772
+
773
+ You can also run `npx chrome-devtools-mcp@latest --help` to see all available configuration options.
774
+
775
+ ## Concepts
776
+
777
+ ### User data directory
778
+
779
+ `brave-devtools-mcp` starts a Brave release channel instance using the following user
780
+ data directory:
781
+
782
+ - Linux / macOS: `$HOME/.cache/brave-devtools-mcp/brave-profile-$CHANNEL`
783
+ - Windows: `%HOMEPATH%/.cache/brave-devtools-mcp/brave-profile-$CHANNEL`
784
+
785
+ The user data directory is not cleared between runs and shared across
786
+ all instances of `brave-devtools-mcp`. Set the `isolated` option to `true`
787
+ to use a temporary user data dir instead which will be cleared automatically after
788
+ the browser is closed.
789
+
790
+ ### Connecting to a running Brave instance
791
+
792
+ See [Mode B: Attach to your existing Brave window](#mode-b-attach-to-your-existing-brave-window) in the Setup section above.
793
+
794
+ For VM-to-host port forwarding issues, see [`docs/troubleshooting.md`](./docs/troubleshooting.md#remote-debugging-between-virtual-machine-vm-and-host-fails).
795
+
796
+ ### Debugging on Android
797
+
798
+ Please consult [these instructions](./docs/debugging-android.md) (originally written for Chrome, but applicable to any Chromium browser).
799
+
800
+ ## Known limitations
801
+
802
+ See [Troubleshooting](./docs/troubleshooting.md).