Lets agents analyze, compare and optimize web performance with the Google PageSpeed Insights and Chrome UX Report APIs.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add pagespeed-insights --env GOOGLE_API_KEY='<GOOGLE_API_KEY>' -- npx -y pagespeed-insights-mcp~/.codex/config.toml
[mcp_servers.pagespeed-insights]
command = "npx"
args = ["-y", "pagespeed-insights-mcp"]
env = { GOOGLE_API_KEY = "<GOOGLE_API_KEY>" }
# codex mcp add pagespeed-insights --env GOOGLE_API_KEY='<GOOGLE_API_KEY>' -- npx -y pagespeed-insights-mcp~/.cursor/mcp.json
{
"mcpServers": {
"pagespeed-insights": {
"command": "npx",
"args": [
"-y",
"pagespeed-insights-mcp"
],
"env": {
"GOOGLE_API_KEY": "<GOOGLE_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"pagespeed-insights": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"pagespeed-insights-mcp"
],
"env": {
"GOOGLE_API_KEY": "<GOOGLE_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"pagespeed-insights": {
"command": "npx",
"args": [
"-y",
"pagespeed-insights-mcp"
],
"env": {
"GOOGLE_API_KEY": "<GOOGLE_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"pagespeed-insights": {
"command": "npx",
"args": [
"-y",
"pagespeed-insights-mcp"
],
"env": {
"GOOGLE_API_KEY": "<GOOGLE_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"pagespeed-insights": {
"command": "npx",
"args": [
"-y",
"pagespeed-insights-mcp"
],
"env": {
"GOOGLE_API_KEY": "<GOOGLE_API_KEY>"
}
}
}
}Environment variables
GOOGLE_API_KEY
Replace the placeholders with your own credentials and keep them out of version control.