Audit technical SEO and security headers for any URL via pagespeed-mcp-server (npx)
pagespeed-mcp-server v2.0.1 exposes 7 tools for comprehensive SEO and security auditing over MCP stdio. It uses cheerio + node-fetch internally — no Google API key needed for the local analysis tools (technicalseoaudit, onpageseoaudit, securityheadersaudit, sitemaprobotsaudit, mobileaudit). The runpagespeedtest and performanceaudit tools optionally accept an apiKey for PageSpeed Insights API access but work without one too. Zero config: npx -y [email protected] starts the server on stdio immediately.
Recipe: SEO & Security Auditing via pagespeed-mcp-server
Server: [email protected] (npx) Transport: stdio Auth: none required Tools: 7 total — technical_seo_audit, security_headers_audit, onpage_seo_audit, sitemap_robots_audit, mobile_audit, run_pagespeed_test, performance_audit
Spawn & handshake
npx -y [email protected]Send initialize → notifications/initialized → tools/list → tools/call.
Tool 1: technicalseoaudit
Analyzes meta tags, canonical URLs, hreflang, Open Graph, Twitter Cards, structured data (JSON-LD), and HTML lang. Returns a score out of 100.
Input: {"url": "https://example.com"} Output: Structured JSON with metaTags (title, description, viewport, OG, twitter), canonical, hreflangTags, structuredData, htmlLang, issues, recommendations, and score.total.
Tool 2: securityheadersaudit
Checks HTTPS status and 7 security headers: HSTS, CSP, X-Content-Type-Options, X-Frame-Options, X-XSS-Protection, Referrer-Policy, Permissions-Policy. Also dumps all response headers.
Input: {"url": "https://example.com"} Output: Structured JSON with https.enabled, securityHeaders (each with present/value/description), allHeaders, recommendations, and score (total, headersPresent out of headersTotal).
Observations
- Server starts in ~3s (npx install + launch)
- Both tools return clean, structured JSON — easy to parse
technical_seo_auditscored example.com 65/100 (missing meta description, OG tags, canonical, JSON-LD)security_headers_auditscored example.com 30/100 (HTTPS yes, but 0/7 security headers present)- The 5 local tools (technicalseo, onpageseo, securityheaders, sitemaprobots, mobile) work with zero config — no API key
run_pagespeed_testandperformance_auditoptionally acceptapiKeyfor Google PageSpeed Insights API data
{ "server": "[email protected]", "transport": "stdio", "spawn": "npx -y [email protected]", "handshake": { "initialize": { "protocolVersion": "2024-11-05", "clientInfo": { "name": "pathfinder", "version": "1.0.0" } }, "serverInfo": { "name": "seo-audit-server", "version": "2.1.0" }, "tools_count": 7 }, "tools_list": ["run_pagespeed_test", "technical_seo_audit", "sitemap_robots_audit", "onpage_seo_audit", "security_headers_audit", "performance_audit", "mobile_audit"], "call_1": { "tool": "technical_seo_audit", "input": { "url": "https://example.com" }, "output": { "url": "https://example.com", "metaTags": { "title": "Example Domain", "titleLength": 14, "metaDescription": null, "metaViewport": "width=device-width, initial-scale=1", "ogTitle": null, "twitterCard": null }, "canonical": null, "hreflangTags": [], "structuredData": [], "htmlLang": "en", "issues": ["Missing meta description"], "recommendations": ["Title is too short (14 chars). Aim for 50-60 characters.", "Consider adding a canonical URL to prevent duplicate content issues.", "Missing Open Graph tags - social sharing may not display properly.", "No structured data found. Consider adding JSON-LD schema markup."], "score": { "total": 65, "issuesCount": 1, "recommendationsCount": 4 } }, "isError": false }, "call_2": { "tool": "security_headers_audit", "input": { "url": "https://example.com" }, "output": { "url": "https://example.com", "https": { "enabled": true, "protocol": "https:" }, "securityHeaders": { "strict-transport-security": { "present": false }, "content-security-policy": { "present": false }, "x-content-type-options": { "present": false }, "x-frame-options": { "present": false }, "x-xss-protection": { "present": false }, "referrer-policy": { "present": false }, "permissions-policy": { "present": false } }, "score": { "total": 30, "httpsEnabled": true, "headersPresent": 0, "headersTotal": 7 } }, "isError": false } }