Lighthouse MCP
Lighthouse MCP 서버
Google Lighthouse를 사용하여 포괄적인 웹 성능 감사 및 분석 기능을 제공하는 Model Context Protocol(MCP) 서버입니다. 이 서버는 LLM과 AI 에이전트가 상세한 웹사이트 성능 평가, 접근성 감사, SEO 분석, 보안 점검, Core Web Vitals 모니터링을 수행할 수 있게 해줍니다.
🌟 주요 기능
🚀 성능 분석: Core Web Vitals, 성능 점수, 최적화 권장사항을 포함한 완전한 Lighthouse 감사
♿ 접근성 감사: WCAG 준수 여부 확인 및 접근성 점수 분석
🔍 SEO 분석: 검색 엔진 최적화 감사 및 모범 사례 권장사항
🔒 보안 평가: HTTPS, CSP, 보안 취약점 스캔
📊 리소스 분석: JavaScript, CSS, 이미지, 폰트 최적화 기회
📱 모바일 vs 데스크톱: 스로틀링 옵션을 포함한 기기 간 비교 분석
⚡ Core Web Vitals: LCP, INP, CLS 모니터링 및 임계값 확인
🎯 성능 예산: 사용자 정의 성능 임계값 및 예산 모니터링
🤖 에이전트 브라우징: 페이지가 AI 에이전트에 얼마나 잘 제공되는지에 대한 Lighthouse 13 감사(WebMCP 도구, 에이전트 접근성 트리, llms.txt)
🧩 구조화된 출력: 모든 도구는
outputSchema를 선언하고 검증된structuredContent를 반환하므로 클라이언트는 JSON 문자열을 파싱하는 대신 타입이 지정된 데이터를 받습니다📚 참조 리소스: 웹 성능, 접근성, SEO, 보안에 대한 내장 가이드라인 및 모범 사례
Related MCP server: mcp-seo
🛠️ 요구 사항
Node.js 22.0.0 이상
Chrome/Chromium 브라우저(Lighthouse가 자동으로 관리)
VS Code, Cursor, Windsurf, Claude Desktop 또는 기타 MCP 클라이언트
🚀 시작하기
아래 구성 중 하나를 사용하여 선호하는 클라이언트에 Lighthouse MCP 서버를 설치하세요:
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": ["@danielsogl/lighthouse-mcp@latest"]
}
}
}영구 Chrome 프로필(로그인 세션)
인증된 세션이 필요한 경우 영구 Chrome 프로필로 시작하고 헤드드(headed) 모드로 실행하세요:
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": [
"@danielsogl/lighthouse-mcp@latest",
"--profile-path",
"<profile-path>",
"--no-headless"
]
}
}
}--chrome-flag로 추가 Chrome 플래그를 전달할 수 있습니다(예: --chrome-flag=--disable-gpu).
플래그 값이 --로 시작하고 알려진 옵션 이름과 일치하는 경우, 최상위 옵션으로 파싱되지 않도록 --chrome-flag=...를 사용하는 것이 좋습니다.
프로필 모드는 Lighthouse의 저장소 재설정을 비활성화하여 쿠키와 로컬 저장소가 실행 간에 유지됩니다.
--user-data-dir가 존재하지 않는 디렉터리를 가리키면 해당 디렉터리가 생성되고 새 프로필로 처리됩니다.
--profile-path를 chrome://version에 표시된 프로필 경로(예: .../Default)로 설정하세요.
참고: Chrome의 원격 디버깅에는 기본이 아닌 사용자 데이터 디렉터리가 필요하므로 시스템 기본값 대신 전용 프로필 디렉터리를 재사용하세요.
원하는 경우 --user-data-dir + --profile-directory를 별도로 전달할 수도 있습니다.
--chrome-port만으로 연결하면 저장소가 보존되지 않습니다. 세션을 유지하려면 프로필 플래그를 포함하세요.
CLI 옵션
MCP 서버에서 지원하는 런타임 플래그:
--profile-path <path>:chrome://version의 프로필 경로 사용(사용자 데이터 디렉터리 + 프로필 이름 자동 파생)--user-data-dir <path>: 영구 세션을 위해 Chrome 프로필 디렉터리 재사용--profile-directory <name>: 사용자 데이터 디렉터리 내에서 프로필 선택--chrome-path <path>: Chrome/Chromium 실행 파일의 명시적 경로(자동 감지 재정의,CHROME_PATH환경 변수도 존중)--chrome-flag <flag>또는--chrome-flag=<flag>: 추가 Chrome 플래그 전달(반복 가능)--chrome-port <port>또는--remote-debugging-port <port>: 원격 디버깅이 활성화된 기존 Chrome 인스턴스에 연결--headless: 헤드리스 모드 강제--no-headless: 헤드드 모드 강제
로깅
Lighthouse는 stderr에 로그를 기록합니다. 서버는 MCP 클라이언트 로그가 넘치지 않도록 이를 error 수준으로 유지합니다. 디버깅 시(예: Chrome 시작 실패) LIGHTHOUSE_LOG_LEVEL을 silent, info 또는 verbose로 설정하세요.
LIGHTHOUSE_LOG_LEVEL=verbose npx @danielsogl/lighthouse-mcp@latestWSL2 / 사용자 정의 Chrome 경로
잘못된 Chrome 바이너리가 선택된 경우(예: WSL2에서 Linux 바이너리 대신 Windows Chrome), 경로를 명시적으로 설정하세요:
# Via CLI flag
npx @danielsogl/lighthouse-mcp@latest --chrome-path /usr/bin/google-chrome
# Via environment variable
CHROME_PATH=/usr/bin/google-chrome npx @danielsogl/lighthouse-mcp@latestMCP 구성에서:
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": ["@danielsogl/lighthouse-mcp@latest", "--chrome-path", "/usr/bin/google-chrome"]
}
}
}E2E 스모크 테스트(프로필)
영구 프로필로 실제 감사를 실행합니다(기존 프로필 디렉터리를 사용하고 필요시 한 번 로그인):
npm run smoke:profile -- --url https://example.com \
--profile-path "<profile-path>" \
--no-headlessE2E 스모크 테스트(기존 Chrome에 연결)
원격 디버깅을 활성화하여 Chrome을 시작합니다:
/path/to/GoogleChromeExecutable \
--remote-debugging-port=9222 \
--user-data-dir /path/to/chrome-profile/path/to/GoogleChromeExecutable을 해당 플랫폼의 Chrome/Chromium 바이너리 경로로 바꾸세요.
그런 다음 Lighthouse를 해당 인스턴스에 연결합니다:
npm run smoke:profile -- --url https://example.com --chrome-port 9222연결 시 저장소를 보존하려면 프로필 경로를 전달하여 Lighthouse가 쿠키/로컬 저장소를 유지하도록 하세요:
npm run smoke:profile -- --url https://example.com \
--chrome-port 9222 \
--profile-path "<profile-path>"VS Code에 설치
VS Code CLI를 사용하여 Lighthouse MCP 서버를 설치할 수도 있습니다:
# For VS Code
code --add-mcp '{"name":"lighthouse","command":"npx","args":["-y","@danielsogl/lighthouse-mcp@latest"]}'
# For VS Code Insiders
code-insiders --add-mcp '{"name":"lighthouse","command":"npx","args":["-y","@danielsogl/lighthouse-mcp@latest"]}'설치 후 Lighthouse MCP 서버는 VS Code에서 GitHub Copilot 에이전트와 함께 사용할 수 있습니다.
Cursor에 설치
Cursor 설정 → MCP → 새 MCP 서버 추가로 이동하세요. 이름을 "lighthouse"로 지정하고, command 유형과 명령어 npx @danielsogl/lighthouse-mcp@latest를 사용하세요:
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": ["@danielsogl/lighthouse-mcp@latest"]
}
}
}Windsurf에 설치
Windsurf MCP 문서를 따르세요. 다음 구성을 사용하세요:
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": ["@danielsogl/lighthouse-mcp@latest"]
}
}
}Claude Desktop에 설치
MCP 설치 가이드를 따르고 다음 구성을 사용하세요:
{
"mcpServers": {
"lighthouse": {
"command": "npx",
"args": ["@danielsogl/lighthouse-mcp@latest"]
}
}
}🔧 사용 가능한 도구
Lighthouse MCP 서버는 포괄적인 웹 분석을 위한 다음 도구를 제공합니다:
🏁 감사 도구
도구 | 설명 | 매개변수 |
| 포괄적인 Lighthouse 감사 실행 |
|
| 접근성 점수 및 권장사항 가져오기 |
|
| SEO 분석 및 권장사항 가져오기 |
|
⚡ 성능 도구
도구 | 설명 | 매개변수 |
| 전체 성능 점수 가져오기 |
|
| Core Web Vitals 지표 가져오기 |
|
| 기기 간 성능 비교 |
|
| 성능 예산 확인 |
|
| LCP 최적화 기회 찾기 |
|
🔍 분석 도구
도구 | 설명 | 매개변수 |
| 사용되지 않는 JavaScript 코드 찾기 |
|
| 모든 웹사이트 리소스 분석 |
|
🔒 보안 도구
도구 | 설명 | 매개변수 |
| 포괄적인 보안 감사 수행 |
|
💬 사용 가능한 프롬프트
Lighthouse MCP 서버는 LLM이 구조화된 분석과 권장사항을 제공하는 데 도움이 되는 재사용 가능한 프롬프트를 포함합니다:
📊 분석 프롬프트
프롬프트 | 설명 | 매개변수 |
| Lighthouse 감사 결과 분석 |
|
| 전후 감사 결과 비교 |
|
| Core Web Vitals 최적화 권장사항 가져오기 |
|
| 리소스 최적화 권장사항 가져오기 |
|
📚 사용 가능한 리소스
Lighthouse MCP 서버는 필수 가이드라인과 모범 사례가 포함된 내장 참조 리소스를 제공합니다:
리소스 | 설명 | URI |
| Core Web Vitals 성능 임계값 |
|
| 성능 최적화 기법 및 영향 |
|
| WCAG 2.1 접근성 가이드라인 및 이슈 |
|
| SEO 모범 사례 및 최적화 기회 |
|
| 웹 보안 모범 사례 및 취약점 |
|
| 사이트 유형별 성능 예산 권장 사항 |
|
| Lighthouse 감사 카테고리 및 점수 산정 방법 |
|
| 프레임워크별 최적화 가이드 |
|
🎯 전략 프롬프트
프롬프트 | 설명 | 매개변수 |
| 포괄적인 성능 개선 계획 생성 |
|
| 맞춤형 성능 예산 권장 사항 생성 |
|
| SEO 개선 권장 사항 생성 |
|
| 접근성 개선 가이드 생성 |
|
🔧 프롬프트 매개변수 세부 정보
auditResults: Lighthouse 도구의 JSON 감사 결과focusArea: 집중할 특정 카테고리 ("performance","accessibility","seo","best-practices","agentic-browsing")beforeAudit/afterAudit: 변경 전후의 Lighthouse 감사 결과changesImplemented: 감사 사이에 구현된 변경 사항 설명currentMetrics: 감사에서 얻은 현재 성능 지표targetGoals: 특정 성능 목표 또는 비즈니스 목표timeframe: 개선 구현을 위한 기간framework: 프론트엔드 프레임워크 또는 기술 스택constraints: 기술적 또는 비즈니스 제약 사항websiteType: 웹사이트 유형 (예: 전자상거래, 블로그, 기업)targetAudience: 대상 청중 또는 시장 정보complianceLevel: WCAG 준수 수준 ("AA"또는"AAA")userGroups: 접근성을 위해 고려해야 할 특정 사용자 그룹
📋 매개변수 세부 정보
공통 매개변수
url(필수): 분석할 웹사이트 URLdevice: 대상 기기 ("desktop"또는"mobile", 기본값:"desktop")includeDetails: 상세 감사 정보 포함 (기본값:false)throttling: 네트워크/CPU 스로틀링 활성화 (기본값:false)
특정 매개변수
categories: 감사할 Lighthouse 카테고리 (["performance", "accessibility", "best-practices", "seo", "agentic-browsing"])threshold: 지표에 대한 사용자 지정 임계값 (예:{"lcp": 2.5, "inp": 200, "cls": 0.1})budget: 성능 예산 한도 (예:{"performanceScore": 90, "largestContentfulPaint": 2500})resourceTypes: 분석할 리소스 유형 (["images", "javascript", "css", "fonts", "other"])minBytes: 분석을 위한 최소 파일 크기 임계값 (기본값:2048)checks: 수행할 보안 검사 (["https", "csp", "hsts", "origin-isolation", "clickjacking", "trusted-types", "third-party-cookies", "deprecations"])
💡 사용 예시
기본 성능 감사
// Get overall performance score
{
"tool": "get_performance_score",
"arguments": {
"url": "https://example.com",
"device": "mobile"
}
}Core Web Vitals 분석
// Check Core Web Vitals with custom thresholds
{
"tool": "get_core_web_vitals",
"arguments": {
"url": "https://example.com",
"device": "mobile",
"includeDetails": true,
"threshold": {
"lcp": 2.5,
"inp": 200,
"cls": 0.1
}
}
}보안 평가
// Comprehensive security audit
{
"tool": "get_security_audit",
"arguments": {
"url": "https://example.com",
"checks": ["https", "csp", "hsts"]
}
}리소스 최적화
// Find optimization opportunities
{
"tool": "analyze_resources",
"arguments": {
"url": "https://example.com",
"resourceTypes": ["images", "javascript"],
"minSize": 1024
}
}참조 리소스 사용
내장된 가이드라인 및 모범 사례에 액세스:
// Get Core Web Vitals thresholds
{
"resource": {
"uri": "lighthouse://performance/core-web-vitals-thresholds"
}
}
// Access WCAG accessibility guidelines
{
"resource": {
"uri": "lighthouse://accessibility/wcag-guidelines"
}
}
// Get framework-specific optimization guides
{
"resource": {
"uri": "lighthouse://frameworks/optimization-guides"
}
}분석을 위한 프롬프트 사용
// Analyze audit results with focused recommendations
{
"prompt": "analyze-audit-results",
"arguments": {
"auditResults": "{...lighthouse audit json...}",
"focusArea": "performance"
}
}
// Create a performance improvement plan
{
"prompt": "create-performance-plan",
"arguments": {
"currentMetrics": "{...current performance metrics...}",
"targetGoals": "Achieve 90+ performance score and sub-2s LCP",
"timeframe": "3 months"
}
}
// Compare before/after audit results
{
"prompt": "compare-audits",
"arguments": {
"beforeAudit": "{...before audit results...}",
"afterAudit": "{...after audit results...}",
"changesImplemented": "Implemented lazy loading and image optimization"
}
}🎯 사용 사례
성능 모니터링: 자동 성능 추적 및 Core Web Vitals 모니터링
접근성 준수: WCAG 2.1 준수 확인 및 수정 지침
SEO 최적화: 기술적 SEO 감사 및 검색 엔진 최적화 권장 사항
보안 평가: 취약점 스캔 및 보안 모범 사례 검증
리소스 최적화: 번들 분석 및 최적화 기회 식별
성능 예산: 자동 성능 예산 모니터링 및 알림
CI/CD 통합: 자동화된 품질 게이트 및 성능 회귀 감지
🏗️ 아키텍처
서버는 다음을 사용하여 구축되었습니다:
Model Context Protocol SDK: MCP 서버 구현용
Google Lighthouse: 웹 성능 감사용
Chrome Launcher: 브라우저 자동화용
TypeScript: 타입 안전성과 더 나은 개발자 경험을 위해
Zod: 런타임 스키마 검증용
🧪 테스트
npm run test:run # unit tests
npm run test:coverage # unit tests with coverage
npm run test:e2e # end-to-end tests엔드투엔드 스위트는 서버를 빌드하고, 실제 MCP 클라이언트와 함께 stdio를 통해 서버를 실행하며, 루프백에서 제공되는 픽스처 페이지에 대해 실제 Lighthouse 감사를 실행합니다. Chrome이 설치되어 있어야 하며, 비표준 위치에 있는 경우 CHROME_PATH를 설정하세요.
🤝 기여
기여를 환영합니다! 자세한 내용은 기여 가이드를 참조하세요:
코드 스타일 및 표준
테스트 요구 사항
풀 리퀘스트 프로세스
개발 환경 설정
📜 라이선스
이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 LICENSE 파일을 참조하세요.
🔒 보안
보안 문제는 보안 정책을 참조하세요.
📞 지원
🐛 버그 신고: GitHub Issues
💬 토론: GitHub Discussions
📧 이메일: security@codingrules.ai
🙏 감사의 말
훌륭한 감사 엔진을 제공한 Google Lighthouse 팀
Model Context Protocol 사양을 제공한 Anthropic
지속적인 영감과 기여를 주는 오픈 소스 커뮤니티
❤️ Daniel Sogl 제작
Available Tools
11 toolsanalyze_resourcesAnalyze Page ResourcesARead-only
Analyze website resources (images, JS, CSS, fonts) for optimization opportunities
Inputs: url (required), device, minSize, resourceTypes. Returns: url, device, filters, summary, +3 more
check_performance_budgetCheck Performance BudgetBRead-only
Check if website performance meets specified budget thresholds
Inputs: url (required), budget (required), device. Returns: data, summary, recommendations
compare_mobile_desktopCompare Mobile vs DesktopARead-only
Compare website performance between mobile and desktop devices
Inputs: url (required), categories, throttling, includeDetails. Returns: data, summary, recommendations
find_unused_javascriptFind Unused JavaScriptBRead-only
Find unused JavaScript code to reduce bundle size
Inputs: url (required), device, minBytes. Returns: url, device, summary, timestamp, +3 more
get_accessibility_scoreGet Accessibility ScoreBRead-only
Get the accessibility score and recommendations for a website
Inputs: url (required), device, includeDetails. Returns: data, summary, recommendations
get_core_web_vitalsGet Core Web VitalsARead-only
Get Core Web Vitals metrics for a website
Inputs: url (required), device, threshold, includeDetails. Returns: data, summary, recommendations
get_lcp_opportunitiesGet LCP OpportunitiesBRead-only
Get LCP optimization opportunities for a website
Inputs: url (required), device, threshold, includeDetails. Returns: data, summary, recommendations
get_performance_scoreGet Performance ScoreCRead-only
Get the performance score for a website
Inputs: url (required), device. Returns: data, summary, recommendations
get_security_auditGet Security AuditARead-only
Perform security audit checking HTTPS, CSP, and other security measures
Inputs: url (required), checks, device. Returns: data, summary, recommendations
get_seo_analysisGet SEO AnalysisCRead-only
Get SEO analysis and recommendations for a website
Inputs: url (required), device, includeDetails. Returns: data, summary, recommendations
run_auditRun Lighthouse AuditBRead-only
Run a comprehensive Lighthouse audit on a website
Inputs: url (required), device, categories, throttling. Returns: data, summary, recommendations
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
There is significant overlap between run_audit and the specific getter tools (accessibility, SEO, performance), as run_audit likely encompasses all of those. Additionally, get_lcp_opportunities, find_unused_javascript, and analyze_resources all target performance optimization with unclear boundaries.
Most tools follow a clear verb_noun pattern (e.g., get_*, run_audit, compare_mobile_desktop, check_performance_budget). Minor deviations include run_audit vs. get_security_audit (both use 'audit' but different verbs) and find_unused_javascript/analyze_resources not using 'get_' prefix, but the overall convention is consistent.
With 11 tools, the set is well-scoped for a website auditing server. Each tool covers a distinct aspect of Lighthouse auditing (performance, SEO, accessibility, security, resources), and the count is within the ideal 3-15 range without feeling bloated.
The tool surface covers major Lighthouse categories (performance, accessibility, SEO, security, Core Web Vitals, resources) and includes useful extras like budget checks and mobile/desktop comparison. However, it lacks explicit best practices and PWA audits, which are standard Lighthouse categories, creating minor gaps.
Maintenance
Related MCP Connectors
Free MCP server that audits any public URL: technical SEO, Core Web Vitals, indexing checks.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Website QA for your coding agent: audit SEO, performance, security, accessibility over MCP.
Your agent needs to crawl a site and say what is wrong with it — broken tags, duplicate content, pages nothing can index, resources that never load. **What you can ask for** • "Crawl this site and list every page with a duplicate title or missing description." • "Which pages are non-indexable, and why?" • "Run Lighthouse on these URLs and give me the failing audits." • "Show the internal link graph and the orphan pages." • "Give me this page's raw HTML and its microdata." **How to use it** Point any MCP client at https://mcp.aisa.one/seo-onpage/mcp and sign in with OAuth — there is no key to create or paste. 20 tools: submit a crawl and read its summary, pages, resources, links and waterfall; duplicate content and duplicate tags; keyword density; non-indexable and uncrawlable resources; parsed content, raw HTML, microdata, screenshots and Lighthouse. **Why this rather than the source** A crawler you drive from the agent, with the audit results as structured data rather than a PDF. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Find the broken pages here, then ask the same agent what those pages used to rank for — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/seo/mcp for all of it at once — rankings, keywords, backlinks, site health and AI-answer visibility across DataForSEO, Semrush and Ahrefs.
Related MCP Servers
- AlicenseAqualityDmaintenanceA comprehensive MCP server providing 15 web tools including search, scraping, screenshots, SEO audits, and DNS/SSL checks through a single installation. It delivers clean, LLM-optimized outputs so AI agents can focus on reasoning rather than parsing raw HTML.156 npmMIT
- AlicenseAqualityDmaintenanceEnables AI agents to perform comprehensive SEO audits on web pages, including meta tags, headings, links, images, performance, and more, via a CLI or MCP server.182MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server for SEO, performance, GEO, and UX audits with 37 tools covering technical SEO, Lighthouse performance, AI search optimization, content analysis, accessibility, security, and more.1MIT
- AlicenseAqualityDmaintenanceAn MCP server that audits websites for accessibility (WCAG 2.1 AA/EAA), performance, SEO, design quality, and mobile responsiveness, providing actionable scores, grades, and prioritized fixes.6MIT