SEO审计MCP服务器
一个模型上下文协议(MCP)服务器,提供全面的技术SEO审计工具,针对招聘网站进行了优化。
特性
- 页面分析 -对单个页面进行深入分析,包括元标签、标题、结构化数据、呈现行为和链接
- 网站爬行 -具有自动页面类型分类的多页面爬行
- 灯塔集成 -核心Web生命周期和性能审计
- 网站地图分析 -Robots.txt和XML站点地图解析,具有特定于作业的见解
- 职位发布架构验证 -根据谷歌的要求进行专门验证
安装
先决条件
- Node.js 18+
- 铬/铬(用于剧作家)
- Lighthouse CLI(可选,用于性能审核)
设置
# Clone or extract the project
cd seo-audit-mcp
# Install dependencies
npm install
# Install Playwright browsers
npx playwright install chromium
# Install Lighthouse globally (optional but recommended)
npm install -g lighthouse
# Build the project
npm run build配置Claude桌面
添加到您的Claude Desktop配置(~/Library/Application Support/Claude/claude_desktop_config.json 在macOS上):
{
"mcpServers": {
"seo-audit": {
"command": "node",
"args": ["/path/to/seo-audit-mcp/dist/index.js"]
}
}
}配置Claude CLI
添加到您的Claude CLI配置或直接使用:
# Using npx (after npm link)
claude --mcp-server "node /path/to/seo-audit-mcp/dist/index.js"可用工具
analyze_page
分析单个网页的SEO因素。
Input:
- url (required): The URL to analyze
- waitForSelector: CSS selector to wait for (for JS-heavy pages)
- timeout: Timeout in milliseconds (default: 30000)
- device: 'desktop' or 'mobile' (default: desktop)
Output:
- Meta tags, headings, structured data
- JobPosting schema validation
- JavaScript rendering analysis
- Link and image analysiscrawl_site
从URL开始抓取多个页面。
Input:
- startUrl (required): Starting URL
- maxPages: Maximum pages to crawl (default: 50)
- maxDepth: Maximum link depth (default: 5)
- includePatterns: Regex patterns to include
- excludePatterns: Regex patterns to exclude
Output:
- Aggregated statistics
- Page type classification (job detail, category, location pages)
- Duplicate detection
- Critical issues and warningsrun_lighthouse
运行Lighthouse性能审计。
Input:
- url (required): URL to audit
- device: 'mobile' or 'desktop' (default: mobile)
- categories: Array of categories to audit
- saveReport: Save HTML report (default: false)
Output:
- Performance, Accessibility, Best Practices, SEO scores
- Core Web Vitals (LCP, CLS, TBT, FCP, TTFB)
- Optimization opportunities
- Diagnosticsanalyze_sitemap
分析robots.txt和XML站点地图。
Input:
- baseUrl (required): Base URL of the site
- includeSitemapUrls: Include full URL list (default: true)
- maxUrls: Max URLs per sitemap (default: 1000)
Output:
- robots.txt rules and issues
- Discovered sitemaps
- Job URL detection
- Recommendationscheck_urls
检查多个URL的HTTP状态代码。
Input:
- urls (required): Array of URLs to check
- timeout: Timeout per URL in milliseconds
Output:
- Status code, redirect destination, response time per URL使用示例
快速页面审核
"Analyze the SEO of https://example.com/jobs/software-engineer"全面现场审核
"Crawl https://example.com and analyze their job board SEO.
Focus on structured data and landing pages."性能检查
"Run a Lighthouse audit on https://example.com/jobs for mobile devices"工作板发现
"Analyze the sitemap for https://example.com and find their job posting pages"工作板特定功能
此工具针对工作板进行了优化,包括:
- 职位发布架构验证
- 验证所有必填字段(标题、描述、发布日期等) - 检查推荐字段(validThrough、baseSalary、employeeType) - 远程作业验证(应用程序位置要求) - 到期日期检查
- 页面类型分类
- 作业详细信息页面 - 职位列表/搜索页面 - 类别登录页面(例如/营销工作/) - 位置登录页面(例如,/纽约的工作/) - 公司简介页面
- 过期作业处理分析
- 检测404、重定向和软404 - 通过架构中的日期检查有效性 - 建议适当的处理策略
- 建议
- Google索引API实现 - 特定工作的网站地图 - 登录页面架构
发展
# Run in development mode
npm run dev
# Run tests
npm test
# Lint code
npm run lint建筑
src/
├── index.ts # Entry point
├── server.ts # MCP server implementation
├── tools/
│ ├── index.ts # Tool registry
│ ├── crawl-page.ts # Single page analysis
│ ├── crawl-site.ts # Multi-page crawler
│ ├── lighthouse.ts # Performance audits
│ └── sitemap.ts # Sitemap/robots analysis
├── types/
│ └── index.ts # TypeScript definitions
└── utils/
├── browser.ts # Playwright helpers
└── http.ts # HTTP utilities故障排除
剧作家问题
# Reinstall browsers
npx playwright install chromium --force
# On Linux, you may need system dependencies
npx playwright install-deps未找到灯塔
# Install globally
npm install -g lighthouse
# Or use npx (slower)
npx lighthouse --version权限错误
服务器需要写入 /tmp 用于临时文件。确保适当的权限。
超时错误
对于速度较慢的站点,增加超时时间:
- 页面分析:使用
timeout参数 - 爬行:减少
maxPages或增加延迟
许可证
麻省理工学院
