# @danielsogl/lighthouse-mcp 中文文档

规范地址：https://npmcn.com/package/%40danielsogl/lighthouse-mcp/

版本：2\.0\.1
npm 元数据更新时间：2026-08-15T20:24:33.814Z
中文译文更新时间：2026-11-11T10:39:51.903Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40danielsogl/lighthouse-mcp
原文对照：https://npmcn.com/package/%40danielsogl/lighthouse-mcp/?lang=original
项目主页：https://github.com/danielsogl/lighthouse-mcp-server#readme
源码仓库：https://github.com/danielsogl/lighthouse-mcp-server

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：167 kB，40 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- Node.js 要求：\>=22\.0\.0
- 运行依赖：4 个
- 首次发布：2025-06-01T13:27:46.112Z
- 最新版本发布：2026-08-15T20:24:33.519Z
- 近 30 天下载量：9277（2026-10-12 至 2026-11-10，npm 官方下载统计）
- 已发布版本数：28（近 12 个月 4 个）

## 中文简介

一个全面的"模式背景协议"(MCP)服务器,利用Google灯塔提供网络性能审计,无障碍测试,SEO分析,安全评估,以及核心网络维度监测. 允许 LLMs 和 AI 代理 执行 详细 We

## 安装

```sh
npm install @danielsogl/lighthouse-mcp
```

也可以使用：`pnpm add @danielsogl/lighthouse-mcp`、`yarn add @danielsogl/lighthouse-mcp`、`bun add @danielsogl/lighthouse-mcp`

## README

# 灯塔 MCP 服务器

[![NPM Version](https://img.shields.io/npm/v/@danielsogl/lighthouse-mcp?style=flat-square)](https://www.npmjs.com/package/@danielsogl/lighthouse-mcp) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://npmcn.com/package/%40danielsogl/lighthouse-mcp/LICENSE) [![Node Version](https://img.shields.io/node/v/@danielsogl/lighthouse-mcp?style=flat-square)](https://nodejs.org/) [![CI](https://img.shields.io/github/actions/workflow/status/danielsogl/lighthouse-mcp-server/ci.yml?branch=main&style=flat-square)](https://github.com/danielsogl/lighthouse-mcp-server/actions) [![Coverage](https://img.shields.io/codecov/c/github/danielsogl/lighthouse-mcp-server?style=flat-square)](https://codecov.io/gh/danielsogl/lighthouse-mcp-server) [![Sponsor](https://img.shields.io/badge/%F0%9F%92%96_Sponsor-danielsogl-EA4AAA?style=flat-square)](https://github.com/sponsors/danielsogl)

一个模型背景协议(MCP)服务器,利用Google灯塔提供全面的网络性能审计和分析能力. 该服务器使LLMs和AI代理能够进行详细的网站性能评估,访问审核,SEO分析,安全检查和Core Web Virtuals监测.

[![Lighthouse MCP server](https://glama.ai/mcp/servers/@danielsogl/lighthouse-mcp-server/badge)](https://glama.ai/mcp/servers/@danielsogl/lighthouse-mcp-server)

## 关键特性

-   **绩效分析**: 完成灯塔审计,包括核心网络生命、业绩分数和优化建议
-   **QQ 无障碍审计**: WCAG 合规检查和无障碍分数分析
-   **SEO分析**:搜索引擎优化审计和最佳做法建议
-   **安全评估**:HTTPS、CSP和安全脆弱性扫描
-   **资源分析**: JavaScript, CSS, 图像和字体优化机会
-   **移动对桌面**: 使用节流选项对设备进行比较分析
-   **核心网络维度**: LCP、INP、CLS监测并进行阈值检查
-   **绩效预算**: 自定义性能阈值和预算监测
-   **代理浏览**:灯塔13,一个页面如何为AI代理服务的审计(WebMCP工具,代理访问树,llms.txt)
-   **\* 结构化产出**: 每个工具声明一个 `outputSchema` 并验证返回 `structuredContent`,因此客户端可以得到输入的数据,而不是 JSON 字符串来解析
-   **参考资源**:为网络性能、无障碍性、标准环境和安全制定准则和最佳做法

## 所需经费

-   节点.js 22.0.0或更新
-   Chrome/铬浏览器(由灯塔自动管理)
-   VS 代码、 光标、 Windsurf、 Claude 桌面或任何其他 MCP 客户端

## 开始

使用下列配置之一,与您首选的客户端安装灯塔 MCP 服务器:

```json
{
  "mcpServers": {
    "lighthouse": {
      "command": "npx",
      "args": ["@danielsogl/lighthouse-mcp@latest"]
    }
  }
}
```

### 持久性色谱配置文件( Login会话)

需要验证的会话时,以持续Chrome剖面进行发射并运行标题:

```json
{
  "mcpServers": {
    "lighthouse": {
      "command": "npx",
      "args": [
        "@danielsogl/lighthouse-mcp@latest",
        "--profile-path",
        "<profile-path>",
        "--no-headless"
      ]
    }
  }
}
```

您可以通过额外的克罗姆旗 `--chrome-flag`,例如 `--chrome-flag=--disable-gpu`。 。 。 . 如果旗帜值开始于 `--` 并匹配已知选项名, 首选 `--chrome-flag=...` 以避免将其解析为顶级选项. Profile模式禁用灯塔的存储重置,因此饼干和本地存储在运行之间持续存在. 若为 `--user-data-dir` 指向缺失目录,它将被创建并作为新配置处理. 设定 `--profile-path` 路径 `chrome://version` (例如:. `.../Default`) (中文(简体) ). 注意:Chrome远程调试需要非默认用户数据目录,因此重用专用配置目录而不是系统默认. 也可以通过 `--user-data-dir` + 键 `--profile-directory` 如果你愿意的话 分开来. 附随 `--chrome-port` 单靠它不会保存存储; 包含一个保存会话的配置标记 .

### CLI 选项

支持 MCP 服务器运行时旗 :

-   `--profile-path <path>`: 使用来自 `chrome://version` (自动识别用户数据 dir + profile name)
-   `--user-data-dir <path>`: 为持久性会话重新使用 Chrome 配置目录
-   `--profile-directory <name>`: 在用户数据目录中选择配置
-   `--chrome-path <path>`: 通往Chrome/Chrome可执行文件的明确路径(覆盖自动检测;也尊重 `CHROME_PATH` 环境变量)
-   `--chrome-flag <flag>` 或者说 `--chrome-flag=<flag>`:通过外克罗梅旗(可重复)
-   `--chrome-port <port>` 或者说 `--remote-debugging-port <port>`: 附加到已启用远程调试的 Chrome 实例
-   `--headless`: 强制无头模式
-   `--no-headless`: 向导模式

#### 日志

灯塔木来作斯德. 服务器保持这个 `error` 所以它不会淹没你的MCP 客户端日志; 设置 `LIGHTHOUSE_LOG_LEVEL` 改为 `silent`, (中文(简体) ), `info` 或者说 `verbose` 调试时 (例如Chrome未能发射).

```bash
LIGHTHOUSE_LOG_LEVEL=verbose npx @danielsogl/lighthouse-mcp@latest
```

#### WSL2 / 自定义色调路径

如果错误的Chrome 二进制被取出(例如Windows Chrome代替了WSL2上的Linux 二进制),则明确设置路径:

```bash
# 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@latest
```

在您的 MCP 配置中 :

```json
{
  "mcpServers": {
    "lighthouse": {
      "command": "npx",
      "args": ["@danielsogl/lighthouse-mcp@latest", "--chrome-path", "/usr/bin/google-chrome"]
    }
  }
}
```

### E2E 烟雾试验(文件)

使用持续配置文件进行真正的审计( 必要时使用现有配置文件目录并登录一次):

```bash
npm run smoke:profile -- --url https://example.com \
  --profile-path "<profile-path>" \
  --no-headless
```

### E2E 烟雾试验(从现有染色体开始)

启用远程调试启动 Chrome :

```bash
/path/to/GoogleChromeExecutable \
  --remote-debugging-port=9222 \
  --user-data-dir /path/to/chrome-profile
```

替换 `/path/to/GoogleChromeExecutable` 与您的平台的 Chrome / Chromium 二进制路径 .

然后把灯塔放在这个例子上:

```bash
npm run smoke:profile -- --url https://example.com --chrome-port 9222
```

为了保存附加时的存储, 通过配置路径, 灯塔保持 cookie/ 本地存储 :

```bash
npm run smoke:profile -- --url https://example.com \
  --chrome-port 9222 \
  --profile-path "<profile-path>"
```

### 在 VS 代码中安装

[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0078d4?style=for-the-badge&logo=visual-studio-code)](https://code.visualstudio.com/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522lighthouse%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540danielsogl%252Flighthouse-mcp%2540latest%2522%255D%257D)

[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install_Server-1f8b34?style=for-the-badge&logo=visual-studio-code)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522lighthouse%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540danielsogl%252Flighthouse-mcp%2540latest%2522%255D%257D)

**手动 VS 代码安装**

您也可以使用 VS 代码 CLI 安装灯塔 MCP 服务器 :

```bash
# 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"]}'
```

在安装后,灯塔MCP服务器将可用于您在VS代码中的GitHub Copilot代理.

### 在光标中安装

[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=lighthouse&config=eyJjb21tYW5kIjoibnB4IC15IEBkYW5pZWxzb2dsL2xpZ2h0aG91c2UtbWNwQGxhdGVzdCJ9)

**手动光标安装**

转到 `Cursor Settings` → `MCP` → `Add new MCP Server`名称为“灯塔”,使用 `command` 带有命令的类型 `npx @danielsogl/lighthouse-mcp@latest`数字 :

```json
{
  "mcpServers": {
    "lighthouse": {
      "command": "npx",
      "args": ["@danielsogl/lighthouse-mcp@latest"]
    }
  }
}
```

### 在 Windsurf 安装

![Install in Windsurf](https://img.shields.io/badge/Windsurf-Install_Server-00d4aa?style=for-the-badge)

**人工 Windsurf 安装**

跟着风起云起的MCP [文档](https://docs.windsurf.com/windsurf/cascade/mcp)。使用以下配置:

```json
{
  "mcpServers": {
    "lighthouse": {
      "command": "npx",
      "args": ["@danielsogl/lighthouse-mcp@latest"]
    }
  }
}
```

### 在 Claude 桌面中安装

**克劳德桌面安装**

跟随 MCP 安装 [指南](https://modelcontextprotocol.io/quickstart/user),使用以下配置:

```json
{
  "mcpServers": {
    "lighthouse": {
      "command": "npx",
      "args": ["@danielsogl/lighthouse-mcp@latest"]
    }
  }
}
```

## 可用的工具

灯塔MCP服务器提供了下列网络综合分析工具:

### 审计工具

| 工具 | 说明 | 参数 |
| --- | --- | --- |
| `run_audit` | 全面审计灯塔 | `url`, (中文(简体) ), `categories?`, (中文(简体) ), `device?`, (中文(简体) ), `throttling?` |
| `get_accessibility_score` | 获得无障碍分数和建议 | `url`, (中文(简体) ), `device?`, (中文(简体) ), `includeDetails?` |
| `get_seo_analysis` | 获得高级管理办公室的分析和建议 | `url`, (中文(简体) ), `device?`, (中文(简体) ), `includeDetails?` |

### 性能工具

| 工具 | 说明 | 参数 |
| --- | --- | --- |
| `get_performance_score` | 获得总体业绩分数 | `url`, (中文(简体) ), `device?` |
| `get_core_web_vitals` | 获取核心网络维度度度度测量 | `url`, (中文(简体) ), `device?`, (中文(简体) ), `includeDetails?`, (中文(简体) ), `threshold?` |
| `compare_mobile_desktop` | 设备之间的性能比较 | `url`, (中文(简体) ), `categories?`, (中文(简体) ), `throttling?`, (中文(简体) ), `includeDetails?` |
| `check_performance_budget` | 对照执行情况预算进行核对 | `url`, (中文(简体) ), `device?`, (中文(简体) ), `budget` |
| `get_lcp_opportunities` | 找到 LCP 优化机会 | `url`, (中文(简体) ), `device?`, (中文(简体) ), `includeDetails?`, (中文(简体) ), `threshold?` |

### 分析工具

| 工具 | 说明 | 参数 |
| --- | --- | --- |
| `find_unused_javascript` | 查找未使用的 JavaScript 代码 | `url`, (中文(简体) ), `device?`, (中文(简体) ), `minBytes?`, (中文(简体) ), `includeSourceMaps?` |
| `analyze_resources` | 分析所有网站资源 | `url`, (中文(简体) ), `device?`, (中文(简体) ), `resourceTypes?`, (中文(简体) ), `minSize?` |

### QQ 安全工具

| 工具 | 说明 | 参数 |
| --- | --- | --- |
| `get_security_audit` | 进行全面的安全审计 | `url`, (中文(简体) ), `device?`, (中文(简体) ), `checks?` |

## 可用的提示

灯塔MCP服务器包含可重复使用的提示,帮助LLMS提供结构化的分析和建议:

### 分析提示

| 提示 | 说明 | 参数 |
| --- | --- | --- |
| `analyze-audit-results` | 灯塔审计结果分析 | `auditResults`, (中文(简体) ), `focusArea?` |
| `compare-audits` | 审计结果前后的比较 | `beforeAudit`, (中文(简体) ), `afterAudit`, (中文(简体) ), `changesImplemented?` |
| `optimize-core-web-vitals` | 获取核心网络维度优化建议 | `coreWebVitals`, (中文(简体) ), `framework?`, (中文(简体) ), `constraints?` |
| `optimize-resources` | 获取资源优化建议 | `resourceAnalysis`, (中文(简体) ), `loadingStrategy?`, (中文(简体) ), `criticalUserJourneys?` |

### \* 可用资源

灯塔MCP服务器为内置参考资源提供了基本准则和最佳做法:

| 资源 | 说明 | URI 资源 |
| --- | --- | --- |
| `core-web-vitals-thresholds` | 核心网络生命力性能阈值 | `lighthouse://performance/core-web-vitals-thresholds` |
| `optimization-techniques` | 业绩优化技术和影响 | `lighthouse://performance/optimization-techniques` |
| `wcag-guidelines` | WCAG 2.1 无障碍准则和问题 | `lighthouse://accessibility/wcag-guidelines` |
| `seo-best-practices` | SEO最佳做法和优化机会 | `lighthouse://seo/best-practices` |
| `security-best-practices` | 网络安全最佳做法和脆弱性 | `lighthouse://security/best-practices` |
| `budget-guidelines` | 按地点类型分列的执行情况报告建议 | `lighthouse://performance/budget-guidelines` |
| `categories-scoring` | 灯塔审计类别和评分方法 | `lighthouse://audits/categories-scoring` |
| `framework-guides` | 特定框架优化指南 | `lighthouse://frameworks/optimization-guides` |

### 战略提示

| 提示 | 说明 | 参数 |
| --- | --- | --- |
| `create-performance-plan` | 制定全面的绩效改进计划 | `currentMetrics`, (中文(简体) ), `targetGoals?`, (中文(简体) ), `timeframe?` |
| `create-performance-budget` | 创建自定义的绩效预算建议 | `currentMetrics`, (中文(简体) ), `businessGoals?`, (中文(简体) ), `userBase?` |
| `seo-recommendations` | 提出改善机会均等的建议 | `seoAudit`, (中文(简体) ), `websiteType?`, (中文(简体) ), `targetAudience?` |
| `accessibility-guide` | 创建无障碍改进指南 | `accessibilityAudit`, (中文(简体) ), `complianceLevel?`, (中文(简体) ), `userGroups?` |

### 快速参数细节

-   **`auditResults`**: JSON 来自灯塔工具的审计结果
-   **`focusArea`**: 重点(b)的具体类别`"performance"`, (中文(简体) ), `"accessibility"`, (中文(简体) ), `"seo"`, (中文(简体) ), `"best-practices"`, (中文(简体) ), `"agentic-browsing"`(中文(简体) )
-   **`beforeAudit`** 编号 : **`afterAudit`**: 灯塔在变更前后的审计结果
-   **`changesImplemented`**: 说明在审计之间所作的变动
-   **`currentMetrics`**: 审计的现有业绩计量
-   **`targetGoals`**:具体业绩指标或业务目标
-   **`timeframe`**: 实施改进的时间表
-   **`framework`**: 前端框架或技术堆栈
-   **`constraints`**技术或商业制约因素
-   **`websiteType`**:网站类型(如:电子商务,博客,公司)
-   **`targetAudience`**目标受众或市场信息
-   **`complianceLevel`**: 遵守《公约》的情况`"AA"` 或者说 `"AAA"`(中文(简体) )
-   **`userGroups`**: 考虑无障碍的具体用户群体

## 参数细节

### 共同参数

-   **`url`** (必须): 用于分析的网站 URL
-   **`device`**: 目标设备(`"desktop"` 或者说 `"mobile"`,默认值 : `"desktop"`(中文(简体) )
-   **`includeDetails`**: 包含详细的审计信息(默认: `false`(中文(简体) )
-   **`throttling`**: 启用网络/CPU节奏( 默认 ): `false`(中文(简体) )

### 具体参数

-   **`categories`**\- 灯塔类别供审计`["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"]`(中文(简体) )

## 使用实例

### 基本业绩审计

```javascript
// Get overall performance score
{
  "tool": "get_performance_score",
  "arguments": {
    "url": "https://example.com",
    "device": "mobile"
  }
}
```

### 核心网络活性分析

```javascript
// 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
    }
  }
}
```

### 安全评估

```javascript
// Comprehensive security audit
{
  "tool": "get_security_audit",
  "arguments": {
    "url": "https://example.com",
    "checks": ["https", "csp", "hsts"]
  }
}
```

### 资源优化

```javascript
// Find optimization opportunities
{
  "tool": "analyze_resources",
  "arguments": {
    "url": "https://example.com",
    "resourceTypes": ["images", "javascript"],
    "minSize": 1024
  }
}
```

### 使用参考资源

获取内在准则和最佳做法:

```javascript
// 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"
  }
}
```

### 使用分析提示

```javascript
// 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"
  }
}
```

## 使用大小写

-   **业绩监测**: 自动性能跟踪和核心网络生命监测
-   **无障碍遵守**: WCAG 2.1 合规检查和补救指导
-   **SEO 优化**: 技术审计和搜索引擎优化建议
-   **安全评估**:脆弱性扫描和安全最佳做法验证
-   **资源优化**: 组合分析和优化机会识别
-   **预算**:自动执行情况预算监测和警报
-   **CI/CD 一体化**: 自动质量门和性能回归检测

## 建筑

服务器使用 :

-   **[示范背景协议SDK](https://github.com/modelcontextprotocol/typescript-sdk)**:用于 MCP 服务器执行
-   **[谷歌灯塔](https://github.com/GoogleChrome/lighthouse)**:用于网络绩效审计
-   **[Chrome 发射器](https://github.com/GoogleChrome/chrome-launcher)**: 用于浏览器自动化
-   **类型脚本**: 类型安全及更好的开发者经验
-   **佐德语Name**:用于运行时间计划验证

## 测试

```bash
npm run test:run      # unit tests
npm run test:coverage # unit tests with coverage
npm run test:e2e      # end-to-end tests
```

端到端套件会建起服务器,用真实的MCP客户端在stdio上发射 运行实际的灯塔审计 相对于一个固定的页面 循环。 这需要克罗梅 待安装; 设置 `CHROME_PATH` 如果它住的地方不标准.

## 捐款

欢迎捐款! 请读我们的 [贡献指南](https://npmcn.com/package/%40danielsogl/lighthouse-mcp/CONTRIBUTING.md) 详细情况如下:

-   代码样式和标准
-   测试要求
-   请求程序
-   开发设置

## 许可证

这个项目根据麻省理工学院许可证颁发——见 [自由主义](https://npmcn.com/package/%40danielsogl/lighthouse-mcp/LICENSE) 详细文件.

## • 警卫

关于安全问题,请参见我们 [安全政策](https://npmcn.com/package/%40danielsogl/lighthouse-mcp/SECURITY.md)。 。 。 .

## ++ 辅助

-   🐛 **错误报告**数字 : [GitHub 问题](https://github.com/danielsogl/lighthouse-mcp-server/issues)
-   💬 **讨论情况**数字 : [GitHub 讨论](https://github.com/danielsogl/lighthouse-mcp-server/discussions)
-   📧 **电子邮件**数字 : [安全@ 编码规则.ai](mailto:security@codingrules.ai)

## 承认

-   Google灯塔团队的优秀审计引擎
-   示范上下文协议规格
-   持续激励和贡献的开源社区

* * *

由 QQ 创建 [丹尼尔·索格](https://github.com/danielsogl)

## 常见问题

### @danielsogl/lighthouse-mcp 是什么？

一个全面的"模式背景协议"\(MCP\)服务器,利用Google灯塔提供网络性能审计,无障碍测试,SEO分析,安全评估,以及核心网络维度监测\. 允许 LLMs 和 AI 代理 执行 详细 We

### 如何安装 @danielsogl/lighthouse-mcp？

在项目目录运行 npm install @danielsogl/lighthouse-mcp，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 lighthouse-mcp-server，可以用 npx lighthouse-mcp-server 直接运行。

### @danielsogl/lighthouse-mcp 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @danielsogl/lighthouse-mcp 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @danielsogl/lighthouse-mcp 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=22\.0\.0。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @danielsogl/lighthouse-mcp 可以商用吗？

@danielsogl/lighthouse-mcp 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @danielsogl/lighthouse-mcp 的下载量有多少？

根据 npm 官方下载统计，@danielsogl/lighthouse-mcp 在 2026/10/12 – 2026/11/10 这 30 天内被下载 9,277 次，日均约 309 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @danielsogl/lighthouse-mcp 还在维护吗？

最新版本 2\.0\.1 发布于 2026/08/16（2 个月前）；至今共发布 28 个版本，其中过去 12 个月发布了 4 个；首次发布于 2025/06/01。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

