MCP Frontend Analyzer
Allows running Google Lighthouse analysis on specified URLs to measure performance, SEO, accessibility, and best practices.
Offers Next.js-specific code review, SEO metadata validation, and bundle optimization analysis for pages and layouts.
Provides code quality analysis for React components, including checks for hooks, types, and anti-patterns.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Frontend Analyzer Check the SEO metadata of my Next.js page"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Frontend Analyzer
Google Lighthouse analizi, kod kalite kontrolü, SEO metadata denetimi, erişilebilirlik analizi ve bundle optimizasyonu sunan kapsamlı bir MCP (Model Context Protocol) server'ı. React ve Next.js projelerinde AI agent'ına frontend uzmanlığı kazandırır.
Mimari
┌──────────────┐ stdio ┌────────────────────────────────────┐
│ Cursor IDE │ ◄────────────► │ MCP Server (8 Tool) │
│ (AI Agent) │ JSON-RPC │ │
└──────────────┘ │ ┌──────────────────────────────┐ │
│ │ lighthouse.ts │ │
│ │ Chrome + Lighthouse analiz │ │
│ └──────────────────────────────┘ │
│ ┌──────────────────────────┐ │
│ │ recommendations.ts │ │
│ │ SEO/React/Next önerileri │ │
│ └──────────────────────────┘ │
│ ┌──────────────────────────────┐ │
│ │ tools/ │ │
│ │ ├─ check-component-quality │ │
│ │ ├─ check-metadata │ │
│ │ ├─ check-accessibility │ │
│ │ ├─ check-bundle │ │
│ │ └─ compare-lighthouse │ │
│ └──────────────────────────────┘ │
└────────────────────────────────────┘Related MCP server: MCP Quality Hub
Kurulum
# 1. Proje klasörüne git
cd ~/Desktop/MCP-Frontend-Analyzer
# 2. Bağımlılıkları kur
npm install
# 3. TypeScript'i derle
npm run buildMCP Araçları (8 Tool)
1. lighthouse_analyze
Belirtilen URL üzerinde Google Lighthouse analizi çalıştırır.
Parametreler:
url(zorunlu): Analiz edilecek URL (https://...)categories(opsiyonel):["performance", "seo", "accessibility", "best-practices"]device(opsiyonel):"mobile"veya"desktop"(varsayılan: mobile)
Örnek kullanım:
"https://example.com sitesinin SEO puanını analiz et"
2. get_seo_recommendations
React/Next.js projeleri için SEO, performans ve erişilebilirlik önerileri döner.
Parametreler:
category(opsiyonel):"seo","performance","accessibility","best-practices"
Örnek kullanım:
"Next.js'te SEO için best practice'ler neler?"
3. nextjs_code_review
Verilen React/Next.js kodunu SEO ve performans açısından analiz eder.
Parametreler:
code(zorunlu): Analiz edilecek kodfilename(opsiyonel): Dosya adı (bağlamsal analiz için)
Örnek kullanım:
"Bu page.tsx dosyamı SEO açısından incele"
4. check_component_quality
Component dosyasının kod kalitesini analiz edip 0-100 arası skor verir.
Kontrol ettikleri:
Page/Layout default export zorunluluğu
Layout
childrenprop zorunluluğuSatır sayısı limiti (150/250 eşik)
Hook yoğunluğu (SOLID - Single Responsibility)
anytipi kullanımıconsole.logtespitiRelative import tespiti
Import sıralaması
Gereksiz
'use client'Class component tespiti
Props type/interface eksikliği
Manuel
useMemo/useCallbackInline style kullanımı
İç içe ternary operatör
Boş catch bloğu (silent catch)
Parametreler:
code(zorunlu): Component kodufilename(opsiyonel): Dosya adı
Örnek kullanım:
"Bu component'in kalitesini kontrol et"
5. check_metadata
Next.js page/layout dosyasının SEO metadata eksiksizliğini kontrol eder.
Kontrol ettikleri:
metadata/generateMetadataexportStatic/Dynamic sayfa türüne göre doğru metadata yöntemi kontrolü
title, description tanımları
OpenGraph (title, description, images, type, locale, siteName)
Twitter card
Canonical URL
Robots direktifi
HTML lang attribute (layout)
Viewport export (layout)
JSON-LD yapılandırılmış veri
Parametreler:
code(zorunlu): Sayfa/layout kodufilename(opsiyonel): Dosya adıpageType(opsiyonel):"static"veya"dynamic"
Örnek kullanım:
"Bu sayfanın metadata'sı eksiksiz mi?"
6. check_accessibility
Component'i erişilebilirlik (a11y) açısından WCAG standartlarına göre analiz eder.
Kontrol ettikleri:
Layout'ta
langattribute zorunluluğu (WCAG 3.1.1)Page'de
<h1>zorunluluğu (WCAG 1.3.1)Layout'ta skip navigation kontrolü (WCAG 2.4.1)
Semantic HTML vs div soup
Heading hiyerarşisi (tek h1, ardışık seviyeler)
Image alt text (eksik, boş, anlamsız)
İkon butonlarda aria-label
<div onClick>anti-pattern (klavye erişilemez)Link güvenliği (
target="_blank"+rel)Link title attribute
Form input label/aria-label
Nav aria-label (çoklu nav)
autoFocus anti-pattern
Renk kontrast ipuçları
Parametreler:
code(zorunlu): Component kodufilename(opsiyonel): Dosya adı
Örnek kullanım:
"Bu component erişilebilir mi?"
7. check_bundle
Dosyanın JavaScript bundle boyutuna etkisini analiz eder.
Kontrol ettikleri:
Layout'ta
'use client'riski (tüm sayfa ağacı etkilenir)Page'de ağır client bundle tespiti
Ağır kütüphane import'ları (moment, lodash, axios, MUI, antd, Chart.js)
Barrel export anti-pattern (tree-shaking kırılması)
Dynamic import adayları (Modal, Chart, Editor, Map, PDF vb.)
Gereksiz
'use client'(bundle etkisi)Büyük client component (import sayısı)
Third-party script stratejisi (
<script>vsnext/script)Wildcard re-export (
export * from)package.json bağımlılık analizi
Parametreler:
code(zorunlu): Dosya kodufilename(opsiyonel): Dosya adıpackageJsonContent(opsiyonel): package.json içeriği
Örnek kullanım:
"Bu dosyanın bundle etkisini analiz et"
8. compare_lighthouse
İki URL'yi Lighthouse ile analiz edip karşılaştırma raporu çıkarır.
Parametreler:
url1(zorunlu): İlk URL (mevcut/production)url2(zorunlu): İkinci URL (yeni/staging)categories(opsiyonel): Karşılaştırılacak kategorilerdevice(opsiyonel):"mobile"veya"desktop"
Örnek kullanım:
"Staging ve production'ı karşılaştır"
Cursor Yapılandırması
~/.cursor/mcp.json dosyasında:
{
"mcpServers": {
"mcp-frontend-analyzer": {
"command": "node",
"args": ["/Users/KULLANICI_ADI/Desktop/MCP-Frontend-Analyzer/dist/index.js"]
}
}
}Dosya Yapısı
MCP-Frontend-Analyzer/
├── src/
│ ├── index.ts # MCP Server giriş noktası (tool kayıtları)
│ ├── lighthouse.ts # Lighthouse analiz motoru (Chrome + headless)
│ ├── recommendations.ts # SEO/React/Next.js öneri veritabanı
│ └── tools/
│ ├── code-review.ts # Next.js kod inceleme (SEO, performans, a11y)
│ ├── check-component-quality.ts # Kod kalite analizi (SOLID, satır limiti, any, hook)
│ ├── check-metadata.ts # SEO metadata kontrolü (OG, Twitter, canonical)
│ ├── check-accessibility.ts # Erişilebilirlik analizi (WCAG referanslı)
│ ├── check-bundle.ts # Bundle boyut analizi (ağır lib, tree-shake)
│ └── compare-lighthouse.ts # İki URL Lighthouse karşılaştırması
├── dist/ # Derlenmiş JS çıktısı
├── package.json
├── tsconfig.json
└── README.mdNasıl Çalışır?
Cursor IDE,
mcp.json'daki yapılandırmaya göre server'ı child process olarak başlatırİletişim stdio (stdin/stdout) üzerinden JSON-RPC formatında yapılır
AI agent, tanımlanan 8 tool'u çağırabilir
Kod analiz tool'ları (quality, metadata, a11y, bundle) regex ve string analizi ile çalışır — harici bağımlılık gerektirmez
Lighthouse tool'ları Chrome'u headless modda başlatıp web sayfası analizi yapar
Sonuçlar AI agent'a gönderilir, agent kullanıcıya özetler ve öneriler sunar
Öğrenme Kaynakları
Available Tools
8 toolscheck_accessibilityA
React/Next.js kodunu erişilebilirlik (a11y) açısından analiz eder. Semantic HTML, heading hiyerarşisi, alt text, ARIA label, keyboard erişimi, form label, renk kontrastı ve daha fazlasını WCAG standartlarına göre denetler.
Inputs: code (required), filename.
check_bundleA
React/Next.js dosyasının JavaScript bundle boyutuna etkisini analiz eder. Ağır kütüphane import'ları, barrel export anti-pattern, gereksiz 'use client', dynamic import fırsatları ve third-party script stratejilerini kontrol eder.
Inputs: code (required), filename, packageJsonContent.
check_component_qualityA
React/Next.js component dosyasının kod kalitesini analiz eder. Satır sayısı, hook yoğunluğu, any kullanımı, console.log, import yapısı, SOLID prensipleri ve daha birçok metriği kontrol edip 0-100 arası skor verir.
Inputs: code (required), filename.
check_metadataA
Next.js page/layout dosyasının SEO metadata eksiksizliğini kontrol eder. Title, description, OpenGraph, Twitter card, canonical URL, robots direktifi, structured data (JSON-LD) ve viewport tanımlarını denetler.
Inputs: code (required), filename, pageType.
compare_lighthouseA
İki URL'yi Google Lighthouse ile analiz edip karşılaştırma raporu çıkarır. Her iki URL için performans, SEO, erişilebilirlik ve best-practices skorlarını yan yana gösterir. Toplam analiz süresi ~20-60 saniye.
Inputs: url1 (required), url2 (required), categories, device.
get_seo_recommendationsA
React ve Next.js projeleri için SEO, performans, erişilebilirlik önerileri döner. Lighthouse analizi yapmadan genel best practice bilgisi sağlar.
Inputs: category.
lighthouse_analyzeA
Belirtilen URL üzerinde Google Lighthouse analizi çalıştırır. Performans, SEO, erişilebilirlik ve best-practices puanlarını döner. Analiz birkaç saniye sürebilir.
Inputs: url (required), categories, device.
nextjs_code_reviewA
Verilen React/Next.js kodunu SEO, performans ve erişilebilirlik açısından analiz eder. Kodda tespit edilen sorunları ve iyileştirme önerilerini döner.
Inputs: code (required), filename.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools have distinct purposes, but there is some overlap between lighthouse_analyze and compare_lighthouse (both Lighthouse), and between get_seo_recommendations and nextjs_code_review (both give recommendations). Descriptions help differentiate, but slight ambiguity remains.
All tools use snake_case and follow a verb_noun pattern. Verbs vary (check, compare, get, lighthouse_analyze, nextjs_code_review) but the structure is consistent and readable.
8 tools is well-scoped for a frontend analyzer. Each tool covers a distinct area (accessibility, bundle, metadata, etc.) without being overwhelming.
The set covers major frontend analysis areas: accessibility, performance, code quality, SEO, and Lighthouse. Minor gaps like security or form analysis exist, but core workflows are covered.
Related MCP Connectors
Free MCP server that audits any public URL: technical SEO, Core Web Vitals, indexing checks.
SEO MCP server for keyword research, SERP analysis, audits, and Search Console workflows.
SEO MCP server for keyword research, live SERPs, backlinks, site audits and AI visibility.
Related MCP Servers
- AlicenseBqualityBmaintenanceMCP server that enables AI agents to perform comprehensive web audits using Google Lighthouse with 13+ tools for performance, accessibility, SEO, and security analysis.111,862 npm75MIT
- -licenseNot gradedqualityNot gradedmaintenanceProvides comprehensive code quality tools including linting, security scanning, TypeScript checking, and testing through a single MCP server. Integrates multiple quality analysis tools like Biome, ESLint, and Playwright for streamlined development workflows.-
- 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 runs parallel AI agents to analyze React components for performance issues, including unnecessary re-renders, memoization errors, bundle size problems, and profiling concerns.2MIT