GTmetrix MCP connector
OAuth 2.1/DCRDeveloper ToolsAnalyticsMonitoringConnect to GTmetrix MCP to analyze web page performance, run speed tests, monitor Core Web Vitals, and get actionable optimization recommendations...
GTmetrix MCP connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret> -
Authorize and make your first call
Section titled “Authorize and make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'gtmetrixmcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize GTmetrix MCP:', link)process.stdout.write('Press Enter after authorizing...')await new Promise(r => process.stdin.once('data', r))// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'gtmetrixmcp_get_account_status',toolInput: {},})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "gtmetrixmcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize GTmetrix MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="gtmetrixmcp_get_account_status",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Test start — Start a new GTmetrix page performance test for a URL
- List pages — List GTmetrix pages for the authenticated account
- Get test, report history, report har — Get the current status of a started GTmetrix test
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
gtmetrixmcp_get_account_status#Returns the current GTmetrix account status including plan type, remaining API credits, next refill date, and feature access flags.0 params
Returns the current GTmetrix account status including plan type, remaining API credits, next refill date, and feature access flags.
gtmetrixmcp_get_catalog#Fetch a GTmetrix lookup catalog in JSON format for resolving names to IDs. Available catalogs: browsers, locations, simulated-devices, throttle-connections, lighthouse-audits.1 param
Fetch a GTmetrix lookup catalog in JSON format for resolving names to IDs. Available catalogs: browsers, locations, simulated-devices, throttle-connections, lighthouse-audits.
catalog_idstringrequiredThe catalog to retrieve.gtmetrixmcp_get_guide#Fetch a GTmetrix documentation guide in markdown format. Available guides: har-analysis, test-options, report-analysis, general-test-error, lighthouse-error.1 param
Fetch a GTmetrix documentation guide in markdown format. Available guides: har-analysis, test-options, report-analysis, general-test-error, lighthouse-error.
guide_idstringrequiredThe identifier of the guide to fetch.gtmetrixmcp_get_report#Retrieve the report data using the report ID. Contains GTmetrix scores, Core Web Vitals, top Lighthouse issues, resource summary, and download URLs.1 param
Retrieve the report data using the report ID. Contains GTmetrix scores, Core Web Vitals, top Lighthouse issues, resource summary, and download URLs.
report_idstringrequiredThe 8-character report ID to retrieve.gtmetrixmcp_get_report_har#Fetch the raw HAR (net.har) for a completed GTmetrix report and return it inline. Use when direct download of the HAR URL is not possible.2 params
Fetch the raw HAR (net.har) for a completed GTmetrix report and return it inline. Use when direct download of the HAR URL is not possible.
report_slugstringrequiredThe 8-character report slug identifying the report.forcebooleanoptionalIf true, re-fetches the HAR even if already cached. Defaults to false.gtmetrixmcp_get_report_history#Fetch historical performance data for a GTmetrix page. Returns all reports in reverse chronological order for trend analysis.3 params
Fetch historical performance data for a GTmetrix page. Returns all reports in reverse chronological order for trend analysis.
limitintegeroptionalMaximum number of historical reports to return (1–500).page_slugstringoptional8-character alphanumeric slug identifying the GTmetrix page whose history to fetch.report_slugstringoptional8-character alphanumeric slug identifying a specific report to start history from.gtmetrixmcp_get_test#Get the current status of a started GTmetrix test. Long-polls server-side until the test completes or budget expires.2 params
Get the current status of a started GTmetrix test. Long-polls server-side until the test completes or budget expires.
test_idstringrequiredThe 8-character test ID returned by gtmetrix_start_test.wait_secondsintegeroptionalNumber of seconds to wait for the test to complete (0–30). If omitted, returns immediately with current status.gtmetrixmcp_list_pages#List GTmetrix pages for the authenticated account. A page is a URL and test-settings combination. Returns pages with latest scores, Core Web Vitals, and monitoring status.5 params
List GTmetrix pages for the authenticated account. A page is a URL and test-settings combination. Returns pages with latest scores, Core Web Vitals, and monitoring status.
browserstringoptionalFilter pages by browser name or ID.limitintegeroptionalMaximum number of pages to return (1–2000).locationstringoptionalFilter pages by test location name or ID.monitoringstringoptionalFilter pages by monitoring frequency.urlstringoptionalFilter pages by URL (partial match supported).gtmetrixmcp_start_test#Start a new GTmetrix page performance test for a URL.1 param
Start a new GTmetrix page performance test for a URL.
urlstringrequiredThe fully qualified URL of the page to test.