Connect Google PageSpeed Insights to Claude Code
Add Sourcelane as an MCP server with one `claude mcp add` command and Claude Code can run Google PageSpeed Insights itself — Lighthouse scores and Core Web Vitals for a list of URLs, mobile or desktop — then fix what it finds in the same session. It works the same way in Cursor and ChatGPT. For a full-site crawl, pair it with the SEO audit API.
From $0.008 per url · no API key · failed calls refunded
What you get
- Lighthouse performance, accessibility, SEO and best-practices scores
- Core Web Vitals: LCP, CLS, INP
- Mobile or desktop strategy
- Batch: many URLs in one call
Just ask your AI
“Run PageSpeed on our homepage and pricing page on mobile, then fix the biggest LCP issue in the code.”
“Check Core Web Vitals for these 20 landing pages and list the ones failing.”
What people use the Connect PageSpeed Insights to Claude Code for
Fix performance in the same session
Ask Claude Code to test your homepage on mobile, find the element behind a slow LCP, change the code and re-run the test to confirm the score went up. No copying reports between tabs.
Check every landing page before launch
Give it the URLs from your sitemap and get a table of performance, accessibility and SEO scores with the pages failing Core Web Vitals at the top.
Regression checks
Run the same URLs before and after a big change and have your agent report which pages got slower and why.
Connectors behind it
Your AI picks the right one for the question. Each is priced per result and refunded if it fails.
urlstatusstrategyperformanceScoreaccessibilityScorebestPracticesScoreWebsite Tech Stack Detector$0.003 per domainDetect the technologies behind any website CMS, ecommerce, JS frameworks, analytics, payments, CDN, web server, and email provider plus DNS and MX records, in one row per domain.inputdomainfinalUrlstatusCodeipAddressserverSitemap URL Extractor$0.0003 per urlExtract every URL from a website's sitemap.xml. Recursively walks nested sitemap indexes and returns loc, lastmod, changefreq, and priority for each page.loclastmodchangefreqprioritysourceSitemapUse the Connect PageSpeed Insights to Claude Code from Claude, ChatGPT or Cursor
Pick your tool and connect in under a minute. Then just ask — for example: “Run PageSpeed on our homepage and pricing page on mobile, then fix the biggest LCP issue in the code.”
Connect Claude
Web, desktop and mobile. One click, then confirm.
- 1Click Add to Claude — claude.ai opens with Sourcelane filled in
- 2Click Continue to confirm — it then works in Claude desktop and mobile too
Manual setup (config files, REST, Python) +
Claude Code
Adds the Sourcelane MCP server with your key as a header.
claude mcp add --transport http sourcelane https://api.usesourcelane.com/mcp \
--header "Authorization: Bearer sl_live_your_agent_key"Claude Desktop (config file)
Alternative to the connector URL: add to claude_desktop_config.json, then restart Claude.
{
"mcpServers": {
"sourcelane": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.usesourcelane.com/mcp",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer sl_live_your_agent_key"
}
}
}
}Cursor & Windsurf
Add to ~/.cursor/mcp.json (or Windsurf's mcp_config.json).
{
"mcpServers": {
"sourcelane": {
"url": "https://api.usesourcelane.com/mcp",
"headers": {
"Authorization": "Bearer sl_live_your_agent_key"
}
}
}
}VS Code
Save as .vscode/mcp.json. VS Code prompts for your key once.
{
"servers": {
"sourcelane": {
"type": "http",
"url": "https://api.usesourcelane.com/mcp",
"headers": {
"Authorization": "Bearer ${input:sourcelane-key}"
}
}
},
"inputs": [
{
"type": "promptString",
"id": "sourcelane-key",
"description": "Sourcelane agent key",
"password": true
}
]
}ChatGPT Custom GPT (Actions)
Create a GPT → Actions → Import from URL, then Authentication: API Key, Bearer.
https://usesourcelane.com/openapi.jsonREST
One POST. Pass maxResults to cap cost.
curl -X POST https://api.usesourcelane.com/v1/call \
-H "Authorization: Bearer sl_live_your_agent_key" \
-H "Content-Type: application/json" \
-d '{"listing":"google-pagespeed-insights","params":{"urls":["https://www.stripe.com","https://www.google.com"]},"maxResults":10}'Python, LangChain, CrewAI, OpenAI Agents SDK…
Wrap the REST call as a tool, or point an MCP client at the endpoint.
import requests
res = requests.post(
"https://api.usesourcelane.com/v1/call",
headers={"Authorization": "Bearer sl_live_your_agent_key"},
json={
"listing": "google-pagespeed-insights",
"params": {"urls":["https://www.stripe.com","https://www.google.com"]},
"maxResults": 10,
},
timeout=300,
)
body = res.json()
print(body["receipt"]["chargedMicros"], "micro-USD for", body["receipt"]["results"], "results")
print(body["data"])Connect PageSpeed Insights to Claude Code — FAQ
How do I connect it to Claude Code?+
Run the one-line `claude mcp add` command shown below with your Sourcelane agent key. Claude Code can then call PageSpeed Insights as a tool.
Do I need a Google API key?+
No. Sourcelane makes the PageSpeed calls; you pay per URL tested.
Does it work in Cursor and ChatGPT too?+
Yes. The same connection works in Claude Code, Claude, Cursor, ChatGPT and any MCP client. The setup steps for each are below.
Can it test pages on localhost?+
No. PageSpeed Insights needs a public URL, so test a preview or production deployment.
Do I need a Web & SEO API key or developer account?+
No. Sourcelane runs the connectors for you. You top up a balance with a card, create an agent key, and your agent calls the connector — there is no Web & SEO app review, OAuth setup or rate-limit juggling on your side.
Which AI tools can use it?+
Anything that speaks MCP (Claude Desktop, Claude Code, Cursor, VS Code, Windsurf) can connect to the Sourcelane MCP server with one config block. ChatGPT can use it through a Custom GPT Action, and any agent framework can call the REST endpoint directly.
Can I stop an agent from overspending?+
Yes. Every agent key has its own per-call cap, daily and monthly limits, an optional lifetime budget, an allowlist of connectors, and a kill switch.

