Configuration¶
API key¶
The server resolves one Google API key in this order:
--api-keyGOOGLE_PSI_API_KEYGOOGLE_PSI_API_KEYin a.envfile in the working directory
The PageSpeed Insights API must be enabled. The direct CrUX tools additionally require the Chrome UX Report API.
When API restrictions are enabled on the key, allow both APIs if both tool
families will be used. A PageSpeed-only restriction causes get_crux_data and
get_crux_history to return PERMISSION_DENIED.
STDIO transport¶
STDIO is the default:
Explicit form:
HTTP transport¶
./psi-mcp-go-linux-amd64 \
--transport http \
--listen-address 127.0.0.1 \
--port 8080 \
--allowed-hosts localhost,127.0.0.1
Both implementations accept:
--listen-address, falling back toMCP_LISTEN_ADDRESSand then127.0.0.1--port, falling back toPORTand then8080
The MCP endpoint is /mcp. The health endpoint is /health.
Go uses the comma-separated --allowed-hosts option. C# uses standard ASP.NET
Core AllowedHosts configuration, whose default is:
The HTTP transport is stateless and includes request-size, host, and cross-origin protections. It does not authenticate callers. Keep the default loopback listener unless an authenticated reverse proxy or private network protects the service.
Analysis limits¶
- Maximum URLs per
analyze_pagescall: 10 - Maximum concurrent PSI requests per process: 4
- Transient attempts: 3
- PSI HTTP timeout: 120 seconds
- CrUX HTTP timeout: 30 seconds
The process-wide limit is shared by every connected HTTP client and every STDIO request handled by that process.