@danielsogl/lighthouse-mcp
Version:
A comprehensive Model Context Protocol (MCP) server that provides web performance auditing, accessibility testing, SEO analysis, security assessment, and Core Web Vitals monitoring using Google Lighthouse. Enables LLMs and AI agents to perform detailed we
122 lines (121 loc) • 3.46 kB
TypeScript
export declare function getPerformanceScore(url: string, device?: "desktop" | "mobile"): Promise<{
url: string;
device: string;
performanceScore: number;
metrics: Record<string, {
title: string;
value: number;
displayValue: string;
score: number | null;
}>;
fetchTime: string;
}>;
export declare function getCoreWebVitals(url: string, device?: "desktop" | "mobile", threshold?: {
lcp?: number;
fid?: number;
cls?: number;
}): Promise<{
url: string;
device: string;
coreWebVitals: {
lcp: {
title: string;
value: number;
displayValue: string;
score: number | null;
};
fcp: {
title: string;
value: number;
displayValue: string;
score: number | null;
};
cls: {
title: string;
value: number;
displayValue: string;
score: number | null;
};
tbt: {
title: string;
value: number;
displayValue: string;
score: number | null;
};
};
thresholdResults: {
lcp: boolean | null;
fid: boolean | null;
cls: boolean | null;
} | null;
fetchTime: string;
}>;
export declare function compareMobileDesktop(url: string, categories?: string[], throttling?: boolean): Promise<{
url: string;
mobile: {
categories: Record<string, {
title: string;
score: number;
description: string;
}>;
metrics: Record<string, {
title: string;
value: number;
displayValue: string;
score: number | null;
}>;
};
desktop: {
categories: Record<string, {
title: string;
score: number;
description: string;
}>;
metrics: Record<string, {
title: string;
value: number;
displayValue: string;
score: number | null;
}>;
};
differences: Record<string, {
mobile: number;
desktop: number;
difference: number;
}>;
}>;
export declare function checkPerformanceBudget(url: string, device: "desktop" | "mobile" | undefined, budget: {
performanceScore?: number;
firstContentfulPaint?: number;
largestContentfulPaint?: number;
totalBlockingTime?: number;
cumulativeLayoutShift?: number;
speedIndex?: number;
}): Promise<{
url: string;
device: string;
fetchTime: string;
results: Record<string, {
actual: number;
budget: number;
passed: boolean;
unit: string;
}>;
overallPassed: boolean;
}>;
export declare function getLcpOpportunities(url: string, device?: "desktop" | "mobile", threshold?: number): Promise<{
url: string;
device: "desktop" | "mobile";
lcpValue: number;
threshold: number;
needsImprovement: boolean;
opportunities: ({
id: "render-blocking-resources" | "unused-css-rules" | "unused-javascript" | "modern-image-formats" | "uses-optimized-images" | "efficient-animated-content" | "preload-lcp-image" | "uses-text-compression";
title: string;
description: string | undefined;
score: number;
displayValue: string | undefined;
numericValue: number | undefined;
} | null)[];
fetchTime: string;
}>;