lighthouse-mcp

by priyankark
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Integrates with Google's Lighthouse tool to provide web performance analysis and auditing capabilities.

  • Wraps around Google's Lighthouse tool to run comprehensive performance audits on web pages, providing performance scores, metrics, device emulation, network throttling control, and specific audit categories (performance, accessibility, best-practices, seo, pwa).

  • Enables auditing of Progressive Web App (PWA) metrics as one of the available audit categories when running Lighthouse tests.

Lighthouse MCP 서버

웹 페이지의 다양한 성능 지표를 측정하는 데 도움이 되는 Google Lighthouse 도구를 탑재한 MCP 서버입니다.

특징

  • 모든 URL에 대해 포괄적인 Lighthouse 감사를 실행합니다.
  • 성과 점수 및 측정항목 가져오기
  • 장치 에뮬레이션 구성(모바일/데스크톱)
  • 네트워크 제한 제어
  • 특정 감사 범주를 선택하세요

설치

옵션 1: npx 사용(권장)

설치 없이 npx를 사용하여 도구를 직접 실행할 수 있습니다.

지엑스피1

옵션 2: 글로벌 설치

패키지를 전역으로 설치합니다.

npm install -g lighthouse-mcp

그런 다음 실행합니다.

lighthouse-mcp

옵션 3: 지역 개발

  1. 이 저장소를 복제하세요
  2. 종속성 설치:
    npm install
  3. 프로젝트를 빌드하세요:
    npm run build
  4. 서버를 실행합니다:
    npm start

MCP 구성

npm(global 또는 npx)을 통해 설치한 경우

MCP 설정 구성 파일에 다음을 추가합니다.

{ "mcpServers": { "lighthouse": { "command": "npx", "args": ["lighthouse-mcp"], "disabled": false, "autoApprove": [] } } }

로컬 개발 버전을 사용하는 경우

MCP 설정 구성 파일에 다음을 추가합니다.

{ "mcpServers": { "lighthouse": { "command": "node", "args": ["/absolute/path/to/lighthouse-mcp/build/index.js"], "disabled": false, "autoApprove": [] } } }

/absolute/path/to/lighthouse-mcp 이 프로젝트의 실제 경로로 바꾸세요.

사용 가능한 도구

실행_감사

URL에 대한 포괄적인 Lighthouse 감사를 실행합니다.

매개변수:

  • url (필수): 감사할 URL
  • categories (선택 사항): 감사할 카테고리 배열(기본값은 모두)
    • 옵션: "성능", "접근성", "모범 사례", "seo", "pwa"
  • device (선택 사항): 에뮬레이션할 장치(기본값은 "모바일")
    • 옵션: "모바일", "데스크톱"
  • throttling (선택 사항): 네트워크 제한을 적용할지 여부(기본값은 true)

예:

{ "url": "https://example.com", "categories": ["performance", "accessibility"], "device": "desktop", "throttling": false }

성과점수 얻기

URL에 대한 성능 점수만 받아보세요.

매개변수:

  • url (필수): 감사할 URL
  • device (선택 사항): 에뮬레이션할 장치(기본값은 "모바일")
    • 옵션: "모바일", "데스크톱"

예:

{ "url": "https://example.com", "device": "mobile" }

사용 예

MCP 서버가 구성되면 Claude와 함께 사용할 수 있습니다.

What's the performance score for example.com?

클로드는 get_performance_score 도구를 사용하여 웹사이트를 분석하고 결과를 반환합니다.

요구 사항

  • 노드.js 16+
  • Chrome/Chromium 브라우저(Lighthouse용)

추천서

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Cursor/Cline/GitHub Copilot과 같은 AI 어시스턴트가 Google의 라이트하우스 도구를 사용하여 웹페이지의 성능 지표를 측정할 수 있도록 합니다. 그런 다음 에이전트 루프를 실행하여 어시스턴트가 해당 지표를 최적화하도록 할 수 있습니다!

  1. Features
    1. Installation
      1. Option 1: Using npx (Recommended)
      2. Option 2: Global Installation
      3. Option 3: Local Development
    2. MCP Configuration
      1. When installed via npm (global or npx)
      2. When using local development version
    3. Available Tools
      1. run_audit
      2. get_performance_score
    4. Example Usage
      1. Requirements
        1. Endorsements
          ID: xip1afyf7n